mesonbuild/meson
Auf GitHub ansehenBuilding DLang shared library on MacOS ARM64 fails in the latest version of meson
Open
#10.319 geöffnet am 27. Apr. 2022
buggood first issuelanguage:D
Repository-Metriken
- Stars
- (4.978 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 30T 19h) (63 gemergte PRs in 30 T)
Beschreibung
Describe the bug Using meson versions higher than 0.53.2 the building of DLang shared libraries will fail if you try to cross-compile them for macOS ARM64.
Output with meson > 0.53.2
[2/2] Linking target liblib.so
FAILED: liblib.so
ldc2 -of=liblib.so liblib.so.p/lib.d.o -L=-install_name -L=@rpath/liblib.dylib -L=-headerpad_max_install_names -L=-undefined,dynamic_lookup -link-defaultlib-shared -shared -relocation-model=pic --mtriple=arm64-apple-macos
ld: unknown option: -undefined,dynamic_lookup
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error: /usr/bin/cc failed with status: 1
Output with meson == 0.53.2
[2/2] Linking target liblib.so.
ld: warning: directory not found for option '-L-undefined,dynamic_lookup'
As you can see with meson 0.53.2 we get a warning but the library is successfully compiled, while with more recent meson the compilation fails.
To Reproduce See https://github.com/ErnyTech/MacOS_ARM_Meson_Issue
system parameters
- what operating system: MacOS 11.6.5 in Github Actions