Problems with not finding Framework header files on Mojave 10.14.6
Greg Earle
earle at isolar.DynDNS.ORG
Fri Feb 21 21:59:41 UTC 2020
I'm having problems building software on our Mac dev system at work on
Mojave.
I have Xcode 10.3 installed on it (to ensure it installed the 10.14.6
SDK).
When I build things (in MacPorts or outside of it) that use Framework
header files, I get complaints that the header file is not found.
In MacPorts:
--
mojavemac:/ root# port install mercurial
Warning: The macOS 10.14 SDK does not appear to be installed. Ports may
not build correctly.
Warning: You can install it as part of the Xcode Command Line Tools
package by running `xcode-select --install'.
---> Computing dependencies for mercurial
---> Fetching archive for mercurial
---> Attempting to fetch mercurial-5.3_1.darwin_18.x86_64.tbz2 from
https://packages.macports.org/mercurial
---> Attempting to fetch mercurial-5.3_1.darwin_18.x86_64.tbz2 from
https://ywg.ca.packages.macports.org/mirror/macports/packages/mercurial
---> Attempting to fetch mercurial-5.3_1.darwin_18.x86_64.tbz2 from
http://aus.us.packages.macports.org/macports/packages/mercurial
---> Fetching distfiles for mercurial
---> Verifying checksums for mercurial
---> Extracting mercurial
---> Applying patches to mercurial
---> Configuring mercurial
---> Building mercurial
Error: Failed to build mercurial: command execution failed
Error: See
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_mercurial/mercurial/main.log
for details.
Error: Follow https://guide.macports.org/#project.tickets to report a
bug.
Error: Processing of port mercurial failed
--
I don't understand why I get complaints about the SDK when it's most
definitely installed.
--
mojavemac:/ root# xcode-select --install
xcode-select: error: command line tools are already installed, use
"Software Update" to install updates
--
I verified that both
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
and "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" have a 10.14.6
SDK installed in them.
(I get the same complaints on my office Mac but that has Xcode 11.3.1 on
it. I figured it was because that version installs a Catalina SDK.)
Anyway, the mercurial port install log file says
--
[...]
:info:build building 'mercurial.cext.osutil' extension
:info:build /usr/bin/clang -fno-strict-aliasing -fno-common -dynamic
-pipe -Os
-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64
-isysroot/ -Imercurial
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
-c mercurial/cext/osutil.c -o
build/temp.macosx-10.14-x86_64-2.7/mercurial/cext/osutil.o
-DHAVE_BSD_STATFS
:info:build mercurial/cext/osutil.c:1334:10: fatal error:
'ApplicationServices/ApplicationServices.h' file not found
:info:build #include <ApplicationServices/ApplicationServices.h>
:info:build ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build 1 error generated.
:info:build error: command '/usr/bin/clang' failed with exit status 1
:info:build make: *** [build] Error 1
:info:build make: Leaving directory
`/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_mercurial/mercurial/work/mercurial-5.3'
:info:build Command failed: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_mercurial/mercurial/work/mercurial-5.3"
&& make -j6 -w all
PYTHON=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
:info:build Exit code: 2
:error:build Failed to build mercurial: command execution failed
--
I have the ApplicationServices.h header file, in two different places in
the SDKs:
--
mojavemac:/ root# locate /ApplicationServices.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Headers/ApplicationServices.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Headers/ApplicationServices.h
--
but it's not in an "ApplicationServices" directory.
(This same port installs fine on my Sierra 10.12.6 system at home.)
Outside of MacPorts, I'm trying to build Coin/Coin3D 4.0.0 and get
similar errors:
--
[...]
[ 42%] Building CXX object src/glue/CMakeFiles/glue.dir/dl.cpp.o
/vicar/external/coin/v4.0.0/coin/src/glue/dl.cpp:150:10: fatal error:
'CoreFoundation/CFBundle.h' file not found
#include <CoreFoundation/CFBundle.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [src/glue/CMakeFiles/glue.dir/dl.cpp.o] Error 1
make[2]: Target `src/glue/CMakeFiles/glue.dir/build' not remade because
of errors.
make[1]: *** [src/glue/CMakeFiles/glue.dir/all] Error 2
[ 43%] Built target io
[ 44%] Built target manips
[ 48%] Built target misc
[ 48%] Building CXX object
src/rendering/CMakeFiles/rendering.dir/SoOffscreenCGData.cpp.o
/vicar/external/coin/v4.0.0/coin/src/rendering/SoOffscreenCGData.cpp:40:10:
fatal error:
'ApplicationServices/ApplicationServices.h' file not found
#include <ApplicationServices/ApplicationServices.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: ***
[src/rendering/CMakeFiles/rendering.dir/SoOffscreenCGData.cpp.o] Error 1
make[2]: Target `src/rendering/CMakeFiles/rendering.dir/build' not
remade because of errors.
make[1]: *** [src/rendering/CMakeFiles/rendering.dir/all] Error 2
--
Again, I have the "not found" header files in the 2 MacOSX SDKs:
--
mac:/ root# locate /CFBundle.h | grep -v Prev
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers/CFBundle.h
[...]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers/CFBundle.h
--
it's just not living in a directory called "CoreFoundation".
Am I missing something obvious? 🤷🏼♂️
(Apologies for the length.)
- Greg
More information about the macports-users
mailing list