From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6628 Path: news.gmane.org!not-for-mail From: John Mudd Newsgroups: gmane.linux.lib.musl.general Subject: Trouble compiling with Postgres library Date: Tue, 25 Nov 2014 15:13:04 -0500 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c23dbc286e590508b48b79 X-Trace: ger.gmane.org 1416946423 13065 80.91.229.3 (25 Nov 2014 20:13:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Nov 2014 20:13:43 +0000 (UTC) Cc: John Mudd To: musl Original-X-From: musl-return-6641-gllmg-musl=m.gmane.org@lists.openwall.com Tue Nov 25 21:13:38 2014 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1XtMUU-0005AE-3n for gllmg-musl@m.gmane.org; Tue, 25 Nov 2014 21:13:38 +0100 Original-Received: (qmail 9554 invoked by uid 550); 25 Nov 2014 20:13:37 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 9545 invoked from network); 25 Nov 2014 20:13:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:cc:content-type; bh=HjgSz/jja9oUqs7+bzy1RGcQZ4RV8YGXIh5Zqun7Z44=; b=eOj4rJxMnxkic6LSqKXTqf08M3Eq3CZw+FaLM6PoKKzXRKb2a22GezfwDUlxi1CX7v xXdzDHYgNopql01HpEni2w3K7hcUsKfW/WYCMtg0ISTIpZqKf4gHwQKxozU5NXzRxC6u B6g/Q0W1LX+7uG06qv3LcmVusx4XByrVsxaKHGjUPhgMdjQw/6oo1I0MO85Pj7JMOgXV jjp8dM+rxCcjoZLws+JLBw4+3QirTYr/Jolaw74W+W5s822pCSMaCU/BDGS++mZwi84o lfwxuSIvcWFjTO85ENrgqftZdI3+6Bme56trnzSpXaZXjiOULmeP3+chl26WaK0Svic8 KuZg== X-Received: by 10.152.7.193 with SMTP id l1mr29888101laa.57.1416946405368; Tue, 25 Nov 2014 12:13:25 -0800 (PST) Xref: news.gmane.org gmane.linux.lib.musl.general:6628 Archived-At: --001a11c23dbc286e590508b48b79 Content-Type: text/plain; charset=ISO-8859-1 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 $ $ which musl-gcc /usr/rx30/musl/musl-1.1.0.install/bin/musl-gcc $ cat /usr/rx30/musl/musl-1.1.0.install/bin/musl-gcc #!/bin/sh exec "${REALGCC:-gcc}" "$@" -specs "/home/mudd/musl/musl-1.1.0.install/lib/musl-gcc.specs" $ cat /home/mudd/musl/musl-1.1.0.install/lib/musl-gcc.specs %rename cpp_options old_cpp_options *cpp_options: -nostdinc -isystem /home/mudd/musl/musl-1.1.0.install/include -isystem include%s %(old_cpp_options) *cc1: %(cc1_cpu) -nostdinc -isystem /home/mudd/musl/musl-1.1.0.install/include -isystem include%s *link_libgcc: -L/home/mudd/musl/musl-1.1.0.install/lib -L .%s *libgcc: libgcc.a%s %:if-exists(libgcc_eh.a%s) *startfile: %{!shared: /home/mudd/musl/musl-1.1.0.install/lib/%{pie:S}crt1.o} /home/mudd/musl/musl-1.1.0.install/lib/crti.o %{shared|pie:crtbeginS.o%s;:crtbegin.o%s} *endfile: %{shared|pie:crtendS.o%s;:crtend.o%s} /home/mudd/musl/musl-1.1.0.install/lib/crtn.o *link: -dynamic-linker /usr/rx30/musl/lib/ld-musl-i386.so.1 -nostdlib %{shared:-shared} %{static:-static} %{rdynamic:-export-dynamic} *esp_link: *esp_options: *esp_cpp_options: $ John --001a11c23dbc286e590508b48b79 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Please cc me on replies. My work network is now block= ing access to=A0http://www.= openwall.com/lists/musl/ because "it's located in Russian Fede= ration".=A0

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 i= n /home/mudd/musl/musl-1.1.0.install/lib/libc.so section .bss
//l= ib/i386-linux-gnu/libc.so.6: error adding symbols: Bad value
coll= ect2: error: ld returned 1 exit status
$=A0
= $ which musl-gcc
/usr/rx30/musl/musl-1.1.0.install/bin/musl-gcc
$ cat /usr/rx30/musl/musl-1.1.0.install/bin/musl-gcc
#!/= bin/sh
exec "${REALGCC:-gcc}" "$@" -specs &qu= ot;/home/mudd/musl/musl-1.1.0.install/lib/musl-gcc.specs"
$ = cat /home/mudd/musl/musl-1.1.0.install/lib/musl-gcc.specs
%rename= cpp_options old_cpp_options

*cpp_options:
-nostdinc -isystem /home/mudd/musl/musl-1.1.0.install/include -isystem i= nclude%s %(old_cpp_options)

*cc1:
%(cc1_= cpu) -nostdinc -isystem /home/mudd/musl/musl-1.1.0.install/include -isystem= include%s

*link_libgcc:
-L/home/mudd/mu= sl/musl-1.1.0.install/lib -L .%s

*libgcc:
libgcc.a%s %:if-exists(libgcc_eh.a%s)

*startfile= :
%{!shared: /home/mudd/musl/musl-1.1.0.install/lib/%{pie:S}crt1.= o} /home/mudd/musl/musl-1.1.0.install/lib/crti.o %{shared|pie:crtbeginS.o%s= ;:crtbegin.o%s}

*endfile:
%{shared|pie:c= rtendS.o%s;:crtend.o%s} /home/mudd/musl/musl-1.1.0.install/lib/crtn.o
=

*link:
-dynamic-linker /usr/rx30/musl/lib/ld-= musl-i386.so.1 -nostdlib %{shared:-shared} %{static:-static} %{rdynamic:-ex= port-dynamic}

*esp_link:

=
*esp_options:


*esp_c= pp_options:


$=A0
John


--001a11c23dbc286e590508b48b79--