honggfuzz fails to build on Ubuntu 24.04 with `BUILD_OSSFUZZ_STATIC=true`
- Dominant language
- C
- Stars
- 3.4k
- Forks
- 539
- PR merge metrics
- No merged PRs in 30d
Description
It's related to https://github.com/google/oss-fuzz/issues/14243
On Ubuntu 20.04 honggfuzz is built fine there with `BUILD_OSSFUZZ_STATIC=true` but on Ubuntu 24.04 it fails with
```sh
...
ar rcs libhfcommon/libhfcommon.a libhfcommon/files.o libhfcommon/log.o libhfcommon/ns.o libhfcommon/util.o
clang -o honggfuzz cmdline.o display.o fuzz.o honggfuzz.o input.o mangle.o report.o sanitizers.o socketfuzzer.o subproc.o linux/arch.o linux/bfd.o linux/perf.o linux/pt.o linux/trace.o linux/unwind.o libhfcommon/libhfcommon.a -pthread -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lm -L/usr/local/include -Wl,-Bstatic `pkg-config --libs --static libunwind-ptrace libunwind-generic` -lopcodes -lbfd -liberty -lz -Wl,-Bdynamic -lrt -ldl -lm -latomic -Wl,-Bstatic -lBlocksRuntime -Wl,-Bdynamic
/usr/bin/ld: /lib/x86_64-linux-gnu/libunwind-ptrace.a(_UPT_access_fpreg.o): relocation R_X86_64_32S against symbol `_UPT_reg_offset' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: failed to set dynamic section sizes: bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:299: honggfuzz] Error 1
```
It's possible to get it around by switching from the static builds and bringing the dependencies to the runtime environment (and that's what OSS-Fuzz did)
Contributor guide
Assessment
This issue has not been assessed yet.