On 18.05.2014 20:48, Cedric Roux wrote: > Hi Ubuntu, > > you have a problem with tap-plugins. > > Your version provides the .so files *without* linking to the libm. > (I'm speaking of http://packages.ubuntu.com/trusty/tap-plugins) > > This is wrong.
Correct. In this case, the upstream Makefile seems incorrect: LDFLAGS += -nostartfiles -shared -Wl,-Bsymbolic -lc -lm -lrt [...] $(CC) $(LDFLAGS) -o tap_echo.so tap_echo.o Obviously, additional link libraries have no place in LDFLAGS (which should only contain flags to pass to the linker). Putting the libraries after the object file produces a correct result: > /temp/tap-plugins-0.7.2$ gcc -nostartfiles -shared -Wl,-Bsymbolic -lc -lm > -lrt -o tap_echo.so tap_echo.o > /temp/tap-plugins-0.7.2$ ldd tap_echo.so > linux-vdso.so.1 => (0x00007fff86b69000) > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f09d5fb6000) > /lib64/ld-linux-x86-64.so.2 (0x00007f09d65a9000) > /temp/tap-plugins-0.7.2$ gcc -nostartfiles -shared -Wl,-Bsymbolic -o > tap_echo.so tap_echo.o -lc -lm -lrt > /temp/tap-plugins-0.7.2$ ldd tap_echo.so > linux-vdso.so.1 => (0x00007fffc4dfe000) > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007feecb177000) > libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007feecae71000) > /lib64/ld-linux-x86-64.so.2 (0x00007feecb76a000) See https://wiki.debian.org/ToolChain/DSOLinking#Only_link_with_needed_libraries for a explanation. -- PGP-encrypted mails preferred PGP Fingerprint: 74CD D9FE 5BCB FE0D 13EE 8EEA 61F3 4426 74DE 6624
signature.asc
Description: OpenPGP digital signature
-- Ubuntu-motu mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu
