Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 25 Nov 2014 15:13:04 -0500
From: John Mudd <>
To: musl <>
Cc: John Mudd <>
Subject: Trouble compiling with Postgres library

Please cc me on replies. My work network is now blocking access to because "it's located in Russian

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
$ musl-gcc -o test1 test1.o -L/usr/rx30/musl/postgresql-9.3.4.install/lib
/usr/bin/ld: h_errno: TLS definition in //lib/i386-linux-gnu/
section .tbss mismatches non-TLS definition in
/home/mudd/musl/musl-1.1.0.install/lib/ section .bss
//lib/i386-linux-gnu/ error adding symbols: Bad value
collect2: error: ld returned 1 exit status
$ which musl-gcc
$ cat /usr/rx30/musl/musl-1.1.0.install/bin/musl-gcc
exec "${REALGCC:-gcc}" "$@" -specs
$ cat /home/mudd/musl/musl-1.1.0.install/lib/musl-gcc.specs
%rename cpp_options old_cpp_options

-nostdinc -isystem /home/mudd/musl/musl-1.1.0.install/include -isystem
include%s %(old_cpp_options)

%(cc1_cpu) -nostdinc -isystem /home/mudd/musl/musl-1.1.0.install/include
-isystem include%s

-L/home/mudd/musl/musl-1.1.0.install/lib -L .%s

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

%{!shared: /home/mudd/musl/musl-1.1.0.install/lib/%{pie:S}crt1.o}


-dynamic-linker /usr/rx30/musl/lib/ -nostdlib
%{shared:-shared} %{static:-static} %{rdynamic:-export-dynamic}






Content of type "text/html" skipped

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.