Summary: | app-emulation/qemu-9999 - ld: tests/plugin/libempty.so.p/empty.c.o: in function `qemu_plugin_install': empty.c:(.text+0x1c): undefined reference to `qemu_plugin_register_vcpu_tb_trans_cb' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Rafael Kitover <rkitover> |
Component: | Current packages | Assignee: | Matthias Maier <tamiko> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | virtualization |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge --info
build log |
Description
Rafael Kitover
2020-09-07 08:10:14 UTC
Created attachment 658944 [details]
emerge --info
Created attachment 658946 [details]
build log
Reproduce locally as well. (In reply to Rafael Kitover from comment #0) > x86_64-pc-linux-gnu-gcc -o tests/plugin/libempty.so > tests/plugin/libempty.so.p/empty.c.o -Wl,--as-needed > -Wl,--allow-shlib-undefined -shared -fPIC -Wl,--start-group > -Wl,-soname,libempty.so -Wl,--warn-common -Wl,- > z,relro -Wl,-z,now -m64 -fstack-protector-strong -fPIE -DPIE -std=gnu99 > -Wall -pie -Wl,-O1 -Wl,--as-needed -Wl,--export-dynamic -pthread > -lgmodule-2.0 -lglib-2.0 -lglib-2.0 -Wl,--end-group > x86_64-pc-linux-gnu-gcc -o tests/plugin/libhotpages.so > tests/plugin/libhotpages.so.p/hotpages.c.o -Wl,--as-needed > -Wl,--allow-shlib-undefined -shared -fPIC -Wl,--start-group > -Wl,-soname,libhotpages.so -Wl,--warn- > common -Wl,-z,relro -Wl,-z,now -m64 -fstack-protector-strong -fPIE -DPIE > -std=gnu99 -Wall -pie -Wl,-O1 -Wl,--as-needed -Wl,--export-dynamic -pthread > -lgmodule-2.0 -lglib-2.0 -lglib-2.0 -Wl,--end-group > /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ > ld: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib64/Scrt1.o: in > function `_start': > (.text+0x20): undefined reference to `main' The result should be a shared library with a few undefined symbols from plugin API. But for some reason the module is linked as an executable (regardless of -shared) and required main(). That is strange. -pie linker flag for shared libs is a probable cause. One of workarounds should be to disable USE=-plugins until -pie passing gets sorted upstream. Thank you, I get a successful build with -plugins. |