----- Original Message ----- > From: Matthew Seaman <matt...@freebsd.org> > To: freebsd-questions@freebsd.org > Cc: > Sent: Monday, September 9, 2013 2:23 PM > Subject: Re: When statically linked Abort trap: 6 (core dumped) > > On 09/09/13 13:21, Unga wrote: >> This is FreeBSD 9.1 on i386. >> >> My program works well without any issue when all libraries are dynamically > linked. >> >> But when some libraries are statically link and run it develops: >> Abort trap: 6 (core dumped) >> >> How I compile and link: >> cc myprog.c -Wall -O \ >> -L. -ls1 -ls2 \ >> -lz -lm -lmd -lpthread \ >> -o myprog >> >> >> libs1.a and libs2.a are static libs. >> >> Any idea why? > > Not the foggiest, and we aren't going to be able to tell you anything > sensible without a lot more detailed debugging information. I mean, > between us we know a lot, but we are by no means omniscient. > > How about getting a back trace from the core file your program has produced? > > Cheers, > > Matthew > > Hi Matthew
Sorry being not informative enough. 1. gdb ./myprog myprog.core Program terminated with signal 6, Aborted. : Loaded symbols for /libexec/ld-elf.so.1 #0 0x292e6297 in kill () from /lib/libc.so.7 2. truss ./myprog : getpid() = 0 (0x0) _umtx_op(0x2a4044ac,0x15,0x1,0x0,0x0,0x2a4520d0) = 0 (0x0) _umtx_op(0x281b7158,0xf,0x0,0x0,0x0,0x2a407f00) = 0 (0x0) SIGNAL 6 (SIGABRT) kill(4506,SIGABRT) = 0 (0x0) process exit, rval = 0 3. I'm trying to statically link relevant portions from following two libs for my app: /usr/local/lib/libssl.a /usr/local/lib/libcrypto.a Same error (Abort trap: 6) develops even if I use: /usr/lib/libssl.a /usr/lib/libcrypto.a 4. openssl-1.0.1_8 is installed here. 5. Please note, when the libssl.so (either one) dynamically linked no issue. 6. Does it mean libssl.a and libcrypto.a in FreeBSD 9.1 broken or I don't link it right? Please let me know what other info you need. Unga _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"