From: Marc C. <mar...@gm...> - 2021-04-03 18:05:55
|
Hi Kevan, I am using macOS 11.2 for my build. To build for a 10.8 target I run: export CFLAGS="-mmacosx-version-min=10.8" There is no need to specify an sdk, as far as I know. The native SDK should know how to build for any older target systems and I have never used the SDKROOT variable. Unless you have multiple copies of XCode on your system the only choice you have is between XCode and Command Line Tools. And the default value for that choice should work. Please make sure that you completely remove your build directory before compiling. Failure to do that can lead to weird errors like the ones you are seeing. - Marc On Sat, Apr 3, 2021 at 8:53 AM Kevan Hashemi <ha...@br...> wrote: > Marc, thanks for your suggestion: > > > With current tips of core-8-branch and main I do not see these errors > when > > I build Tcl 8.7 and Tk 8.7 using my usual build process: > > > > make -C tcl/macosx > > make -C tk/macosx > > I tried that last night and it failed on the Tk link in the same way, with > this previously-reported error: > > >>> Undefined symbols for architecture x86_64: > >>> "_TclIsSpaceProc", referenced from: > >>> _strtoul in libtclstub8.7.a(strtoul.o) > >>> ld: symbol(s) not found for architecture x86_64 > >>> clang: error: linker command failed with exit code 1 (use -v to see > >> invocation) > > Mansour, thank you for this cool use of xcrun: > > > Try setting these environment variables instead: > > > > export CFLAGS="-arch x86_64" > > export MACOSX_DEPLOYMENT_TARGET="10.8" > > export SDKROOT="$(xcrun --sdk macosx10.8 --show-sdk-path)" > > > > MACOSX_DEPLOYMENT_TARGET and SDKROOT are equivalent to > > -mmacosx-version-min and -isysroot, respectively, but are used by both > > the compiler and linker. > > I tried this and I get a Tk compile error > > /Users/kevan/Desktop/Scratch/TclTk/TclTk8.7a3/tk/unix/../macosx/ttkMacOSXTheme.c:408:12: > error: implicit declaration of > function 'CGPathCreateWithRoundedRect' is invalid in C99 > [-Werror,-Wimplicit-function-declaration] > path = CGPathCreateWithRoundedRect(bounds, radius, radius, NULL); > > Which lookis like a C dialect error. I have gcc version: > > KSH5:TclTk8.7a3 kevan$ gcc --version > Configured with: --prefix=/Library/Developer/CommandLineTools/usr > --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1 > Apple clang version 12.0.0 (clang-1200.0.32.2) > Target: x86_64-apple-darwin19.6.0 > Thread model: posix > InstalledDir: /Library/Developer/CommandLineTools/usr/bin > > What version of MacOS are you both using? Perhaps mine needs to be updated. > > Best, Kevan > > -- > Kevan Hashemi, Electrical Engineer > Physics Department, Brandeis University > http://www.bndhep.net > > > _______________________________________________ > Tcl-mac mailing list > tc...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-mac > |