Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#62018 closed defect (fixed)

fltk-config --cxxflags returns invalid value on macOS Big Sur 11.1

Reported by: markuskimius Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: bigsur Cc:
Port: fltk-devel

Description

On a fresh install of macOS Big Sur 11.1, fltk-config (in fltk-devel package) returns a parameter, -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk which references an SDK that exists in macOS Big Sur 11.0 but not in 11.1. One possible result is that attempting to compile a program with this invalid parameter can result in the following error:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/stdio.h:107:15: fatal error: 'stdio.h' file not found

The parameter in question is returned when fltk-config is run with a few different possible argument, one of which is fltk-config --cxxflags whose output is as follows on my system:

-I/opt/local/include -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT

Yet, on my freshly installed macOS Big Sur 11.1, these are the SDKs in /Library/Developer/CommandLineTools/SDKs, none of which is MacOSX11.0.sdk:

lrwxr-xr-x 1 root wheel  14 Jan  9 12:17 MacOSX.sdk -> MacOSX11.1.sdk/
drwxr-xr-x 8 root wheel 256 Jul  9  2020 MacOSX10.15.sdk/
drwxr-xr-x 7 root wheel 224 Nov 30 07:33 MacOSX11.1.sdk/

Upon review, it was found that /opt/local/bin/fltk-config has MacOSX11.0.sdk hard-coded in the script. Modifying it to reference MacOSX.sdk instead fixed the compilation problems for me.

This is the version of fltk-devel installed on my system:

  fltk-devel @20201213-d8635887_0 (active)

Change History (3)

comment:1 Changed 4 years ago by jmroot (Joshua Root)

Owner: set to michaelld
Status: newassigned

All kinds of -config scripts, .pc files and so on need to be fixed by removing all -isysroot flags. Just changing it to MacOSX.sdk is not correct as that may override a different SDK specified earlier in a client project's flags. Not specifying any SDK will make the toolchain default to using MacOSX.sdk anyway.

comment:2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In c13f8e436b2b4f06b4f842bbfb2c7d60b1f4c458/macports-ports (master):

fltk: Remove SDK path from fltk-config

Closes: #62018

comment:3 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: bigsur added; fltk-devel Big Sur macOS 11.1 SDK removed
Note: See TracTickets for help on using tickets.