Building subsurface on Mac OS 11.x (Big sur)

Ryan Gardner ryebrye at gmail.com
Mon May 17 09:13:32 PDT 2021


I was able to build fine on OS X before I upgraded to Big Sur - when
running the build scripts now it fails very quickly with two errors:

Run Build Command(s):/usr/bin/make -f Makefile cmTC_f8dee/fast &&
/Library/Developer/CommandLineTools/usr/bin/make  -f
CMakeFiles/cmTC_f8dee.dir/build.make CMakeFiles/cmTC_f8dee.dir/build
Building C object CMakeFiles/cmTC_f8dee.dir/testCCompiler.c.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
  -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk
-mmacosx-version-min=
-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/
-MD -MT CMakeFiles/cmTC_f8dee.dir/testCCompiler.c.o -MF
CMakeFiles/cmTC_f8dee.dir/testCCompiler.c.o.d -o
CMakeFiles/cmTC_f8dee.dir/testCCompiler.c.o -c
/Users/ryan/git/libz/build/CMakeFiles/CMakeTmp/testCCompiler.c
clang: error: invalid version number in '-mmacosx-version-min='
make[1]: *** [CMakeFiles/cmTC_f8dee.dir/testCCompiler.c.o] Error 1
make: *** [cmTC_f8dee/fast] Error 2



Compiling the C compiler identification source file "CMakeCCompilerId.c"
failed.
Compiler:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc

Build flags:
Id flags:

The output was:
1
ld: library not found for -lSystem
clang: error: linker command failed with exit code 1 (use -v to see
invocation)

Looking into it more, it seems that Apple changed how they handle dynamic
library linking, and it might need some different LDFLAGS ( see
https://developer.apple.com/forums/thread/655588?answerId=665804022#665804022
)

I saw the github actions were using "macOS-latest", but that uses Mac OS
10.15 while they work on getting Mac OS 11 supported - (
https://github.com/actions/virtual-environments/issues/2486 )

I'm guessing it will take some adjustments to get things to build on Mac OS
11 - before I start trying to make those I figured I'd check in here first
to see if there is something simple that I am missing, or if this work was
already done by somebody else.

Ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20210517/68fd7d2a/attachment.htm>


More information about the subsurface mailing list