wasm-ld error: comparetf2.c.obj: Bad relocation type:
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
People
(Reporter: yizh.zhai, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15
Steps to reproduce:
I applied a research sanitizers for clang to build the Firefox and met the following error:
wasm-ld: error: comparetf2.c.obj: Bad relocation type:
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
The command is :
$CLANGXX -std=gnu++17 -v --target=wasm32-wasi --sysroot=/home/yzhai003/.mozbuild/sysroot-wasm32-wasi -o rlbox.wasm -Wl,--export-all -Wl,--stack-first -Wl,-z,stack-size=262144 -Wl,--no-entry -Wl,--growable-table ogg_alloc.wasm ogg_bitwise.wasm ogg_framing.wasm xmlparse.wasm xmlrole.wasm xmltok.wasm wasm2c_sandbox_wrapper.wasm mozHunspellRLBoxSandbox.wasm affentry.wasm affixmgr.wasm csutil.wasm hashmgr.wasm hunspell.wasm phonet.wasm replist.wasm suggestmgr.wasm GraphiteExtra.wasm CmapCache.wasm Code.wasm Collider.wasm Decompressor.wasm Face.wasm FeatureMap.wasm FileFace.wasm Font.wasm GlyphCache.wasm GlyphFace.wasm Intervals.wasm Justifier.wasm NameTable.wasm Pass.wasm Position.wasm Segment.wasm Silf.wasm Slot.wasm Sparse.wasm TtfUtil.wasm UtfCodec.wasm call_machine.wasm gr_char_info.wasm gr_face.wasm gr_features.wasm gr_font.wasm gr_logging.wasm gr_segment.wasm gr_slot.wasm json.wasm RLBoxWOFF2Sandbox.wasm table_tags.wasm variable_length.wasm woff2_common.wasm woff2_dec.wasm woff2_out.wasm -lwasi-emulated-process-clocks
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox Build System::General' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•3 years ago
|
||
It looks like you're using clang-10, and that appears be too old. I think we bootstrap clang-14. It should work if you upgrade to that.
(In reply to Alex Hochheiden [:ahochheiden] from comment #2)
It looks like you're using
clang-10, and that appears be too old. I think we bootstrapclang-14. It should work if you upgrade to that.
It builds smoothly without the sanitizer, based on this, is it still the version problem?
Comment 4•3 years ago
|
||
Yes, I think the clang version is still the problem.
(In reply to Alex Hochheiden [:ahochheiden] from comment #4)
Yes, I think the clang version is still the problem.
Thanks, I can try llvm14 then, but there are llvm 14, 14.0.1, 14.0.2, 14.0.3, 14.0.4, 14.0.5 and 14.0.6, which one are more recommended?
Comment 6•3 years ago
|
||
./mach boostrap downloads the version of clang we expect. It should be in ~/.mozbuild/clang.
(In reply to Alex Hochheiden [:ahochheiden] from comment #6)
./mach boostrapdownloads the version of clang we expect. It should be in~/.mozbuild/clang.
It looks like this in my machine, I would try 14.0.5then.
$ .mozbuild/clang/bin/clang --version
clang version 14.0.5 (taskcluster-SA_bYfBKQtmPx_DeJfE8gA)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: ~/.mozbuild/clang/bin
Comment 8•3 years ago
|
||
this isn't a bug on our side, please use the clang provided by mach bootstrap
(In reply to Alex Hochheiden [:ahochheiden] from comment #6)
./mach boostrapdownloads the version of clang we expect. It should be in~/.mozbuild/clang.
Have you released the source code of your bootstrapped clang?
Comment 10•3 years ago
|
||
Same as upstream with a few patches
https://searchfox.org/mozilla-central/source/build/build-clang
| Reporter | ||
Comment 11•3 years ago
|
||
(In reply to Sylvestre Ledru [:Sylvestre] from comment #10)
Same as upstream with a few patches
https://searchfox.org/mozilla-central/source/build/build-clang
Thank you so much!
Comment 12•3 years ago
|
||
welcome, a few of Firefox devs are also contributing to clang
Description
•