Configure fails with system clang on macOS with newer command line tools
Categories
(Firefox Build System :: General, defect, P3)
Tracking
(Not tracked)
People
(Reporter: haik, Unassigned)
References
Details
Attachments
(1 file)
|
26.04 KB,
text/plain
|
Details |
On macOS 14.0 beta (23A5286g) with Xcode 15 beta 4.
$ LD_PRINT_OPTIONS=1 clang -Wl,--version
ld: unknown options: --version
clang: error: linker command failed with exit code 1 (use -v to see invocation)
./mach config output attached.
Comment 1•2 years ago
|
||
I guess from some of the other output you pasted on matrix that this is the new Apple linker, which would certainly explain things.
Comment 2•2 years ago
|
||
Can you paste the output from clang -Wl,--help?
| Reporter | ||
Comment 3•2 years ago
|
||
$ clang -Wl,--help
ld: unknown options: --help
clang: error: linker command failed with exit code 1 (use -v to see invocation)
$ clang -v -Wl,--help
Apple clang version 15.0.0 (clang-1500.0.34.3)
Target: arm64-apple-darwin23.0.0
Thread model: posix
InstalledDir: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
"/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch arm64 -platform_version macos 14.0.0 14.0 -syslibroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -o a.out -L/usr/local/lib --help -lSystem /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/lib/darwin/libclang_rt.osx.a
ld: unknown options: --help
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Comment 4•2 years ago
|
||
The severity field is not set for this bug.
:ahochheiden, could you have a look please?
For more information, please visit BugBot documentation.
Updated•2 years ago
|
Comment 7•1 year ago
|
||
Hm. I have need to build ESR 115 on my Sonoma MBP, and I'm hitting this. Is there a workaround to get me going here?
Comment 8•1 year ago
|
||
(In reply to Mike Conley (:mconley) (:⚙️) from comment #7)
Hm. I have need to build ESR 115 on my Sonoma MBP, and I'm hitting this. Is there a workaround to get me going here?
build with --enable-bootstrap
Comment 10•1 year ago
|
||
(In reply to Mike Hommey [:glandium] from comment #8)
build with --enable-bootstrap
This does not fix the issue.
Homebrew performs the following change to be able to build (as of latest ESR 128):
s.sub! '"-Wl,--version"', '"-Wl,-ld_classic,--version"' if DevelopmentTools.clang_build_version >= 1500
Comment 11•10 months ago
|
||
I will revive https://phabricator.services.mozilla.com/D199810
Comment 13•9 months ago
|
||
I'm unable to build ESR115 on macOS Sequoia, even with ./mach bootstrap.
0:02.64 DEBUG: Executing: `/usr/bin/clang -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -mmacosx-version-min=11.0 -std=gnu99 --target=arm64-apple-darwin -Wl,--version`
0:02.64 ERROR: Failed to find an adequate linker
With the patch from comment 11 (or editing -Wl,--version to -Wl,-v), it does not fail at the above step, but still fails shorty after:
0:08.34 checking the wasm C compiler works... no
0:08.34 DEBUG: Creating `/var/folders/wy/8fq43xc970x3wvgqhfqbvhgr0000gn/T/conftest.59q5nrs_.c` with content:
0:08.34 DEBUG: | int
0:08.34 DEBUG: | main(void)
0:08.34 DEBUG: | {
0:08.34 DEBUG: |
0:08.34 DEBUG: | ;
0:08.34 DEBUG: | return 0;
0:08.34 DEBUG: | }
0:08.34 DEBUG: Executing: `/usr/bin/clang -std=gnu99 --target=wasm32-wasi /var/folders/wy/8fq43xc970x3wvgqhfqbvhgr0000gn/T/conftest.59q5nrs_.c -c`
0:08.34 DEBUG: The command returned non-zero exit status 1.
0:08.34 DEBUG: Its error output was:
0:08.34 DEBUG: | error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-wasi"'
0:08.34 DEBUG: | 1 error generated.
0:08.34 ERROR: Failed compiling a simple C source with the wasm C compiler
*** Fix above errors and then restart with "./mach build"
... fortunately, in my case I did not really have to create a compiled build. I looked up the most recent hg revision from https://hg-edge.mozilla.org/releases/mozilla-esr115
and build as follows:
MOZ_ARTIFACT_REVISION=8a77c6bc418640a11727e9ffa6da543bcd84a8bd ./mach build
(I had to manually set the revision because after the migration from hg to git, the artifact cannot be located from a git repo without cinnabar metadata )
Description
•