Building puffin_fuzzer fails during link due to missing -lbz2 symbols |
|||
Issue description
When I try to run:
USE="asan fuzzer" ./build_packages --board=${BOARD} cups-fuzz
I got the following error for puffin_fuzzer (it was the last package to build before cups-fuzz)
puffin-1.0.0-r425: FAILED: puffin_fuzzer
puffin-1.0.0-r425: x86_64-pc-linux-gnu-clang++ -Wl,-O2 -Wl,--as-needed -Wl,-O2 -Wl,--as-needed -fsanitize=address -fsanitize=alignment -fsanitize=shift -Wl,-z,relro -Wl,-z,noexecstack -Wl,-z,now -Wl,--as-needed -pie -fsanitize=address -fsanitize=fuzzer -pthread -o puffin_fuzzer -Wl,--start-group obj/puffin/src/puffin_fuzzer.fuzzer.o libpuffdiff.a libpuffpatch.a -Wl,--end-group -lbase-456626 -lbrillo-456626 -lprotobuf-lite -lpthread -lbsdiff -lbz2 -lbrotlienc -ldivsufsort -ldivsufsort64 -lbspatch -lbrotlidec
puffin-1.0.0-r425: /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/../../../../lib64/libbspatch.a(libbspatch.bz2_decompressor.o): In function `bsdiff::BZ2Decompressor::~BZ2Decompressor()':
puffin-1.0.0-r425: (.text+0x96): undefined reference to `BZ2_bzDecompressEnd'
puffin-1.0.0-r425: /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/../../../../lib64/libbspatch.a(libbspatch.bz2_decompressor.o): In function `bsdiff::BZ2Decompressor::~BZ2Decompressor()':
puffin-1.0.0-r425: (.text+0x1a6): undefined reference to `BZ2_bzDecompressEnd'
puffin-1.0.0-r425: /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/../../../../lib64/libbspatch.a(libbspatch.bz2_decompressor.o): In function `bsdiff::BZ2Decompressor::SetInputData(unsigned char const*, unsigned long)':
puffin-1.0.0-r425: (.text+0x5a3): undefined reference to `BZ2_bzDecompressInit'
puffin-1.0.0-r425: /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/../../../../lib64/libbspatch.a(libbspatch.bz2_decompressor.o): In function `bsdiff::BZ2Decompressor::Read(unsigned char*, unsigned long)':
puffin-1.0.0-r425: (.text+0xbea): undefined reference to `BZ2_bzDecompress'
puffin-1.0.0-r425: /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/../../../../lib64/libbspatch.a(libbspatch.bz2_decompressor.o): In function `bsdiff::BZ2Decompressor::Close()':
puffin-1.0.0-r425: (.text+0x151a): undefined reference to `BZ2_bzDecompressEnd'
puffin-1.0.0-r425: clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
It looks like it could not find bzip2 library. However, after this error I was able to emerge my fuzzer and run it successfully.
What should I do with that?
There is CL with the fuzzer:
https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/1341244
,
Nov 27
Please do not forget to pass the option --skip_chroot_upgrade to build_packages. Otherwise these flags flags will leak in host builds.
,
Nov 27
I am also opening a bug for Build team (bug 908936) to see if USE flags passed to build_packages can be filtered when calling update_chroot from it. That way, there should not be a need to pass --skip_chroot_upgrade explicitly.
,
Nov 27
assuming Manoj's guess is the issue and the failure was in the SDK and not the board building. in which case this is WAI. |
|||
►
Sign in to add a comment |
|||
Comment 1 by vapier@chromium.org
, Nov 27Owner: ahass...@chromium.org
Summary: Building puffin_fuzzer fails during link due to missing -lbz2 symbols (was: Building a fuzzer)