Closed Bug 2010574 Opened 10 months ago Closed 2 months ago

[deb13] xar: /usr/bin/ld: cannot find -lzstd: No such file or directory

Categories

(Firefox Build System :: Toolchains, task)

task

Tracking

(firefox158 fixed)

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: jcristau, Assigned: jcristau)

References

Details

Attachments

(1 external file, 1 obsolete file)

The xar toolchain task fails when moved to the deb13-toolchain-build docker image: libcrypto in debian 13 requires libzstd (pkg-config --static --libs libcrypto returns -lcrypto -lz -lzstd -ldl -pthread), but libzstd-dev is currently missing from the image.

Installing libzstd-dev in turns causes llvm to pick it up and try to build against it, except it's not in the sysroot so things then fail to link.
Adding -DLLVM_ENABLE_ZSTD=OFF to the cmake args in clang and llvm build scripts seems to help.

libcrypto in Debian 13 pulls in libzstd, so xar fails to link without
libzstd-dev in the image.

Installing it in turn makes LLVM and binutils pick up the system zstd,
which isn't in the sysroots they link against, so turn it off explicitly
in both. build-cctools-port.sh already passes -DLLVM_ENABLE_ZSTD=OFF for
the same reason.

LLVM_ENABLE_ZSTD=ON really means autodetect, so this only pins behaviour
we already had: no image shipped libzstd-dev until now.

libcrypto in Debian 13 pulls in libzstd, so xar fails to link without
libzstd-dev in the image.

Installing it in turn makes LLVM and binutils pick up the system zstd,
which isn't in the sysroots they link against, so turn it off explicitly.
This covers both build-clang.py and build-llvm-common.sh; the latter
configures llvm proper for llvm-symbolizer. build-cctools-port.sh already
passes -DLLVM_ENABLE_ZSTD=OFF for the same reason.

LLVM_ENABLE_ZSTD=ON really means autodetect, so this only pins behaviour
we already had: no image shipped libzstd-dev until now.

Attachment #9629011 - Attachment is obsolete: true
Assignee: nobody → jcristau
Attachment #9628960 - Attachment description: WIP: Bug 2010574 - Install libzstd-dev in the toolchain-build image, and don't autodetect zstd when building against a sysroot. → Bug 2010574 - Install libzstd-dev in the toolchain-build image, and don't autodetect zstd when building against a sysroot. r=glandium
Status: NEW → ASSIGNED
Pushed by jcristau@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/b06f4b703488 https://hg.mozilla.org/integration/autoland/rev/a004076c082c Install libzstd-dev in the toolchain-build image, and don't autodetect zstd when building against a sysroot. r=firefox-build-system-reviewers,sergesanspaille

Backed out for causing spidermonkey bustages.

Pushed by jcristau@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/53e0ccfdc36a https://hg.mozilla.org/integration/autoland/rev/a295037c1659 Install libzstd-dev in the toolchain-build image, and don't autodetect zstd when building against a sysroot. r=firefox-build-system-reviewers,sergesanspaille
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: