make && make std_spec
Using /usr/local/opt/llvm/bin/llvm-config [version= 17.0.6]
c++ -c -o src/llvm/ext/llvm_ext.o src/llvm/ext/llvm_ext.cc -I/usr/local/Cellar/llvm/17.0.6/include -std=c++17 -stdlib=libc++ -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
CRYSTAL_CONFIG_BUILD_COMMIT="0b57b6cc8" CRYSTAL_CONFIG_PATH='$ORIGIN/../share/crystal/src' SOURCE_DATE_EPOCH="1704818267" CRYSTAL_CONFIG_LIBRARY_PATH='$ORIGIN/../lib/crystal' ./bin/crystal build -D strict_multi_assign -D preview_overload_order -Dwithout_interpreter -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib -D use_pcre2
ld: warning: dylib (/usr/local/Cellar/llvm/17.0.6/lib/libunwind.dylib) was built for newer macOS version (12.6) than being linked (12.0)
ld: warning: dylib (/usr/local/Cellar/llvm/17.0.6/lib/libunwind.dylib) was built for newer macOS version (12.6) than being linked (12.0)
ld: warning: dylib (/usr/local/Cellar/llvm/17.0.6/lib/libunwind.dylib) was built for newer macOS version (12.6) than being linked (12.0)
ld: warning: dylib (/usr/local/Cellar/llvm/17.0.6/lib/libunwind.dylib) was built for newer macOS version (12.6) than being linked (12.0)
Using /usr/local/opt/llvm/bin/llvm-config [version= 17.0.6]
./bin/crystal build -D strict_multi_assign -D preview_overload_order -Dwithout_interpreter --exclude-warnings spec/std --exclude-warnings spec/compiler --exclude-warnings spec/primitives -o .build/std_spec spec/std_spec.cr
Using compiled compiler at .build/crystal
ld: warning: dylib (/usr/local/Cellar/llvm/17.0.6/lib/libunwind.dylib) was built for newer macOS version (12.6) than being linked (12.0)
ld: warning: dylib (/usr/local/Cellar/llvm/17.0.6/lib/libunwind.dylib) was built for newer macOS version (12.6) than being linked (12.0)
ld: warning: dylib (/usr/local/Cellar/llvm/17.0.6/lib/libunwind.dylib) was built for newer macOS version (12.6) than being linked (12.0)
ld: warning: dylib (/usr/local/Cellar/llvm/17.0.6/lib/libunwind.dylib) was built for newer macOS version (12.6) than being linked (12.0)
.build/std_spec --order=random
0.2.5
Randomized with seed: 24319
Iâm a relatively new crystal user and found a similar thing just running a simple test Kemal app. Iâm on Mac OS 15.5 and upon compiling (for a run) I get loads of ld: warnings like âwas built for newer macOS version (15.0) than being linked (13.3)â, e.g. below.. is there a way to suppress these?
ld: warning: object file (H-T-T-P-5858F-ormD-ata.o0.o) was built for newer macOS version (15.0) than being linked (13.3)
ld: warning: object file (P-ointer40H-ash58-ae15d8163d21c417f1fc491f0bbc15a1.o0.o) was built for newer macOS version (15.0) than being linked (13.3)
ld: warning: object file (H-T-T-P-5858F-ormD-ata5858P-arser.o0.o) was built for newer macOS version (15.0) than being linked (13.3)
ld: warning: ld: warning: object file (M-I-M-E-5858M-ultipart5858P-arser.o0.o) was built for newer macOS version (15.0) than being linked (13.3)
ld: warning: object file (M-I-M-E-5858M-ultipart.o0.o) was built for newer macOS version (15.0) than being linked (13.3)
ld: warning: object file (M-I-M-E-5858M-ultipart5858S-tate.o0.o) was built for newer macOS version (15.0) than being linked (13.3)
ld: warning: object file (H-T-T-P-5858F-ormD-ata5858P-art.o0.o) was built for newer macOS version (15.0) than being linked (13.3)
Letâs try to figure out whatâs happening here. Is $MACOSX_DEPLOYMENT_TARGET defined on your system? Or maybe they renamed it as $MACOS_DEPLOYMENT_TARGET (no X)?
Or maybe the linker defaults to macOS 13.3 but the environment variable isnât set, so we build the objects for the current host triple, which then leads to the mismatch warnings?
Sorry, I wanted to reply to the other post, but being a new user I was limited to 3 replies on that topic, so Iâve raised a new one to reply.
In that other post I was reporting why when doing âcrystal run ..â I would see so many of the following warnings:
ld: warning: object file (âŚo0.o) was built for newer macOS version (15.0) than being linked (11.0)
it was suggested by @ysbaddaden that I might need to set the env var $MACOSX_DEPLOYMENT_TARGET and I did set it to â15.5â, and reran, and found that the warnings were suppressed, which is great. However as a new crystal user, I think this is not very intuitive and wonder about the need to see those messages. Why would it be necessary to set this var? Is it possible to invert the situation so those are suppressed by default and enable a var or flag to show those? Thanks.
I wasnât asking to export the variable. Iâm trying to understand why the linker is complaining on your mac, and figure out what we should do to determine the linkerâs default deployment target⌠or maybe we should tell the linker to target the current target, for example by setting $MACOSX_DEPLOYMENT_TARGET or through an argument?
I assume echo $MACOSX_DEPLOYMENT_TARGET doesnât print anything by default?
Apologies. Yes, echo $MACOSX_DEPLOYMENT_TARGET prints nothing by default. Iâve just tested it again on a brand new MacBook (MacOS 15.3.1) and after installing Crystal 1.17.1 via homebrew, and there is no $MACOSX_DEPLOYMENT_TARGET or $MACOS_DEPLOYMENT_TARGET variables.
I realise this is pretty minor, so feel free to ignore - but as someone coming into Crystal from scratch (and coming from Windows also), perhaps this should be documented. Thereâs no mention of the env variable on the Mac install page, nor this doc page about env vars, though it seems from the above reply having this env var available may be an assumed thing for general development, so apologies if Iâm just ignorant to that
Do not apologize, we just thought the warnings got finally fixed, but they were not
Maybe we should do the opposite, like define the env variable from the target triplet given by, and maybe have some safe fallback? The Rust cc crate does that for example⌠and Rust itself does it too; it falls back to these defaults:
Thanks. I tried setting to 10.12, and still see warnings, e.g. the following for a simple âhello worldâ kemal app.
ld: warning: dylib (/opt/homebrew/lib/libgc.dylib) was built for newer macOS version (15.0) than being linked (11.0) ld: warning: dylib (/opt/homebrew/lib/libpcre2-8.dylib) was built for newer macOS version (13.0) than being linked (11.0) ld: warning: dylib (/opt/homebrew/lib/libssl.dylib) was built for newer macOS version (15.0) than being linked (11.0) ld: warning: dylib (/opt/homebrew/lib/libcrypto.dylib) was built for newer macOS version (15.0) than being linked (11.0)
I also tried 11.0 and 13.0 with same result, but setting to 15.0 was good (no warnings). Thanks again.