Bug 207964

Summary: /usr/src/lib/libc/gen/signal.c:(.text+0x0): multiple definition of `signal'
Product: Base System Reporter: anan <ananclub>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Only Me CC: amd64, jilles, peter
Priority: ---    
Version: 10.2-STABLE   
Hardware: Any   
OS: Any   

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 freebsd_triage 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.