oss-fuzz build failure in profile mode
oss-fuzz
gets a new coverage mode called profile soon, based on clang coverage, to replace the current sanitizer coverage based mode.
In a trial run the glib
build failed with errors like these.
Step #2: [749/955] Linking target gio/gdbus.
Step #2: FAILED: gio/gdbus
Step #2: clang -o gio/gdbus 'gio/gio@@gdbus@exe/gdbus-tool.c.o' -Wl,--no-undefined -Wl,--as-needed -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fprofile-instr-generate -fcoverage-mapping -pthread -Wl,-ldl -Wno-unused-command-line-argument -Wl,--start-group gio/libgio-2.0.a gio/xdgmime/libxdgmime.a gio/inotify/libinotify.a glib/libglib-2.0.a glib/libcharset/libcharset.a glib/pcre/libpcre.a gobject/libgobject-2.0.a subprojects/libffi/src/libffi.a subprojects/zlib-1.2.11/libz.a gmodule/libgmodule-2.0.a -lresolv -Wl,--end-group
Step #2: gmodule/libgmodule-2.0.a(gmodule.c.o): In function `_g_module_self':
Step #2: /work/meson/../../src/glib/gmodule/gmodule-dl.c:125: undefined reference to `dlopen'
Step #2: gmodule/libgmodule-2.0.a(gmodule.c.o): In function `_g_module_open':
Step #2: /work/meson/../../src/glib/gmodule/gmodule-dl.c:98: undefined reference to `dlopen'
Step #2: gmodule/libgmodule-2.0.a(gmodule.c.o): In function `_g_module_close':
Step #2: /work/meson/../../src/glib/gmodule/gmodule-dl.c:150: undefined reference to `dlclose'
Step #2: gmodule/libgmodule-2.0.a(gmodule.c.o): In function `_g_module_symbol':
Step #2: /work/meson/../../src/glib/gmodule/gmodule-dl.c:163: undefined reference to `dlsym'
Step #2: gmodule/libgmodule-2.0.a(gmodule.c.o): In function `fetch_dlerror':
Step #2: /work/meson/../../src/glib/gmodule/gmodule-dl.c:80: undefined reference to `dlerror'
Step #2: clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
I don't understand why as -Wl,-ldl
is passed. Please take a look at the logs.