forked from facebookincubator/velox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix mononoke linux local cargo build with lld (facebookincubator#6923)
Summary: fix mononoke linux local cargo build with lld During my recent reviewstack changes I noticed that mononoke links fine on macOS, but github PRs are failing on linux with duplicate zstd symbols during linking. To fix this, switch to lld for the final link on linux by setting the cargo options, which needs a getdeps cargo.py change to ensure they aren't overwritten It works locally but looks like its running our of disk space on github. Next change in stack addresses github CI diskspace X-link: facebook/sapling#697 Test Plan: Install the new lld system dep with `sudo ./build/fbcode_builder/getdeps.py install-system-deps --recursive mononoke` Run a build locally with `./build/fbcode_builder/getdeps.py --allow-system-packages build --src-dir=. mononoke` Before, zstd link errors like https://github.com/facebook/sapling/actions/runs/5432912652/jobs/9880272333: ``` /usr/bin/ld: /home/alex/local/tmp/toolbox/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/build/mononoke/debug/deps/libzstd_sys-837ebc89eb1d31b6.rlib(zstd_lazy.o): in function `ZSTD_compressBlock_btlazy2_extDict': zstd_lazy.c:(.text.ZSTD_compressBlock_btlazy2_extDict+0x0): multiple definition of `ZSTD_compressBlock_btlazy2_extDict'; /home/alex/local/tmp/toolbox/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/build/mononoke/debug/deps/libzstd_legacy_mononoke_sys-78a66a56bd363eb2.rlib(zstd_lazy.o):zstd_lazy.c:(.text.ZSTD_compressBlock_btlazy2_extDict+0x0): first defined here collect2: error: ld returned 1 exit status ``` After, works: ``` Compiling mononoke v0.1.0 (/home/alex/local/tmp/toolbox/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/build/mononoke/source/eden/mononoke/server) Finished dev [unoptimized] target(s) in 1m 17s ``` --- Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/697). * facebook/sapling#693 * facebook/sapling#696 * facebook/sapling#692 * facebook/sapling#691 * facebook/sapling#682 * facebook/sapling#689 * __->__ facebook/sapling#697 * facebook/sapling#706 * facebook/sapling#730 Differential Revision: D49875277 Pulled By: genevievehelsel
- Loading branch information
1 parent
0de536f
commit 33bf894
Showing
3 changed files
with
87 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[manifest] | ||
name = lld | ||
|
||
[debs] | ||
lld | ||
|
||
[rpms] | ||
lld | ||
|
||
# We use the system lld where needed on linux and default linker elsewhere | ||
[build] | ||
builder = nop | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters