Date: Mon, 9 Sep 2013 09:03:10 -0700 (PDT) From: Unga <unga888@yahoo.com> To: Matthew Seaman <matthew@freebsd.org>, "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Subject: Re: When statically linked Abort trap: 6 (core dumped) Message-ID: <1378742590.26892.YahooMailNeo@web161906.mail.bf1.yahoo.com> In-Reply-To: <522DD9FB.1050205@freebsd.org> References: <1378729305.77647.YahooMailNeo@web161906.mail.bf1.yahoo.com> <522DD9FB.1050205@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message -----=0A=0A> From: Matthew Seaman <matthew@freebsd.o= rg>=0A> To: freebsd-questions@freebsd.org=0A> Cc: =0A> Sent: Monday, Septem= ber 9, 2013 2:23 PM=0A> Subject: Re: When statically linked Abort trap: 6 (= core dumped)=0A> =0A> On 09/09/13 13:21, Unga wrote:=0A>> This is FreeBSD = 9.1 on i386.=0A>> =0A>> My program works well without any issue when all l= ibraries are dynamically =0A> linked.=0A>> =0A>> But when some libraries a= re statically link and run it develops:=0A>> Abort trap: 6 (core dumped)= =0A>> =0A>> How I compile and link:=0A>> cc myprog.c -Wall -O \=0A>> -L.= -ls1 -ls2 \=0A>> -lz -lm -lmd -lpthread \=0A>> -o myprog=0A>> =0A>> =0A>= > libs1.a and libs2.a are static libs.=0A>> =0A>> Any idea why? =0A> =0A>= Not the foggiest, and we aren't going to be able to tell you anything=0A> = sensible without a lot more detailed debugging information.=A0 I mean,=0A> = between us we know a lot, but we are by no means omniscient.=0A> =0A> How a= bout getting a back trace from the core file your program has produced?=0A>= =0A> =A0=A0=A0 Cheers,=0A> =0A> =A0=A0=A0 Matthew=0A> =0A> =0AHi Matthew= =0A=0ASorry being not informative enough.=0A=0A1. gdb ./myprog myprog.core= =0A=0AProgram terminated with signal 6, Aborted.=0A:=0ALoaded symbols for /= libexec/ld-elf.so.1=0A#0=A0 0x292e6297 in kill () from /lib/libc.so.7=0A=0A= =0A2. truss ./myprog=0A:=0Agetpid()=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 =3D 0 (0x0)=0A_umtx_op(0x2a4044ac,0x15,0x1,0x0,0x0,0x2a4520d0) =3D 0= (0x0)=0A_umtx_op(0x281b7158,0xf,0x0,0x0,0x0,0x2a407f00)=A0 =3D 0 (0x0)=0AS= IGNAL 6 (SIGABRT)=0Akill(4506,SIGABRT)=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D 0 (0x0)=0Aproces= s exit, rval =3D 0=0A=0A=0A3. I'm trying to statically link relevant portio= ns from following two libs for my app:=0A/usr/local/lib/libssl.a=0A/usr/loc= al/lib/libcrypto.a=0A=0ASame error (Abort trap: 6) develops even if I use:= =0A/usr/lib/libssl.a=0A/usr/lib/libcrypto.a=0A=0A=0A4. openssl-1.0.1_8 is i= nstalled here.=0A=0A=0A5. Please note, when the libssl.so (either one) dyna= mically linked no issue.=0A=0A=0A6. Does it mean libssl.a and libcrypto.a i= n FreeBSD 9.1 broken or I don't link it right?=0A=0A=0APlease let me know w= hat other info you need.=0A=0AUnga
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1378742590.26892.YahooMailNeo>