Bug 207964 - /usr/src/lib/libc/gen/signal.c:(.text+0x0): multiple definition of `signal'
Summary: /usr/src/lib/libc/gen/signal.c:(.text+0x0): multiple definition of `signal'
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.2-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-14 01:21 UTC by anan
Modified: 2016-04-15 06:20 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description anan 2016-03-14 01:21:58 UTC
/usr/lib/libc.a(signal.o): In function `signal':
/usr/src/lib/libc/gen/signal.c:(.text+0x0): multiple definition of `signal'
/usr/lib/libroken.a(signal.o):/usr/src/kerberos5/lib/libroken/../../../crypto/heimdal/lib/roken/signal.c:(.text+0x0): first defined here
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
Comment 1 Jilles Tjoelker freebsd_committer 2016-04-10 13:54:34 UTC
Apparently, libc and libroken can't be both linked statically. I recommend linking at least libc (and libthr and librt if you use them) dynamically. Another reason for this is that external NSS modules only work with dynamic linking of libc.

If you can modify the application's source code, changing it to use sigaction() instead of signal() may help. Note that libroken's signal enables SA_RESTART for all signals except SIGALRM.

Libc could avoid this problem by moving the definition of the _sigintr variable to its own file.