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 <johnbmudd@...il.com>
To: musl <musl@...ts.openwall.com>
Cc: John Mudd <johnbmudd@...il.com>
Subject: Trouble compiling with Postgres library

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

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.