Opened 2 weeks ago

Last modified 2 weeks ago

#62018 assigned defect

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: fltk-devel, Big Sur, macOS 11.1, SDK Cc:
Port: fltk-devel


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/ 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 (1)

comment:1 Changed 2 weeks 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.

Note: See TracTickets for help on using tickets.