Date: Tue, 25 Nov 2014 15:18:52 -0500 From: Rich Felker <dalias@...c.org> To: John Mudd <johnbmudd@...il.com> Cc: musl <musl@...ts.openwall.com> Subject: Re: Trouble compiling with Postgres library On Tue, Nov 25, 2014 at 03:13:04PM -0500, John Mudd wrote: > Please cc me on replies. My work network is now blocking access to > http://www.openwall.com/lists/musl/ because "it's located in Russian > Federation". > > First I built Postgres with musl. That works well and I've been > distributing musl Postgres in production. > > Today I'm trying to build a program that will be linked with Postgres libs. > For some reason though it's invoking "ld" and getting confused with the > standard C lib. Any suggestions? > > $ musl-gcc -o hello hello.c > $ hello > Hello! > $ musl-gcc -o test1 test1.o -L/usr/rx30/musl/postgresql-9.3.4.install/lib > -lecpg > /usr/bin/ld: h_errno: TLS definition in //lib/i386-linux-gnu/libc.so.6 > section .tbss mismatches non-TLS definition in > /home/mudd/musl/musl-1.1.0.install/lib/libc.so section .bss > //lib/i386-linux-gnu/libc.so.6: error adding symbols: Bad value > collect2: error: ld returned 1 exit status This definitely means it's trying to link glibc. Adding -v to the gcc command line would show the full command line that's being passed to collect2/ld, which might give a hint as to why this is happening. It's also possible that your postgresql libs have an rpath entry pointing to /lib/i386-linux-gnu that the linker is following. I would inspect libecpg.so and all of its dependencies with readelf to see if they contain anything suspicious. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.