From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7728 Path: news.gmane.org!not-for-mail From: John Mudd Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl xclock? Date: Wed, 20 May 2015 16:26:43 -0400 Message-ID: References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1141cad6084f0e051689403b X-Trace: ger.gmane.org 1432153658 10905 80.91.229.3 (20 May 2015 20:27:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 May 2015 20:27:38 +0000 (UTC) Cc: John Mudd To: musl Original-X-From: musl-return-7740-gllmg-musl=m.gmane.org@lists.openwall.com Wed May 20 22:27:38 2015 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 1YvAaX-0004He-Lg for gllmg-musl@m.gmane.org; Wed, 20 May 2015 22:27:37 +0200 Original-Received: (qmail 13765 invoked by uid 550); 20 May 2015 20:27:36 -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 13652 invoked from network); 20 May 2015 20:27:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=5S/hg3yWBxPzivv4ZXBNSM3kG0V/040hUr0bK1OOWBQ=; b=UjN3qmgb//xjF7iOp3kByKIg2aCjH6qZeDKwTKClEDXSp0NrQIV7XbFRcVBzOnoqrf cewn1yzASUijQ7UypJWp8itoM0O9xPQngdJQA9WoWf2PoNwoVpA5iUIqKM5igQ1QzwAe Nvp0iOmWOKTzBh9rtS5dXHI+Qz9YlHlPWlBTdNGbdov1r86BOdscVC2tzOo1SUakL/mt 0M63jsOR+DLK/4NndkBj8qz2OxK0GxqRgLL27TgI87552jc+sK+EBQFkaPY84+VOtklB nxSXWzhl67EzAJ1UCKqsoXu0c43bxc4DSjV5Yt26sXUhLEOCnO3zPCcCQcjkt/lY4zh1 7Nag== X-Received: by 10.107.164.196 with SMTP id d65mr29226007ioj.78.1432153624168; Wed, 20 May 2015 13:27:04 -0700 (PDT) In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:7728 Archived-At: --001a1141cad6084f0e051689403b Content-Type: text/plain; charset=ISO-8859-1 On Wed, May 20, 2015 at 11:28 AM, John Mudd wrote: > > > On Tue, May 19, 2015 at 5:51 PM, John Mudd wrote: > >> I'm trying to build a musl version of xclock. If I can build xclock then >> I hope to be able to build my app which is more complicated. I'm getting >> the following error. >> >> /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.8.install/lib/libc.so section .bss >> >> > Rich Felker wrote: > "Yes, you're linking to glibc, or to something that was linked with > glibc. You should look though the X11 .so files you've built using > readelf and see if any of them have dependencies on libc.so.6. It > looks like you're using the host system's gcc and passing the > musl-gcc.specs file to it manually rather than using the musl-gcc > script or a real musl-targetted compiler toolchain, so it might be > something to do with that too. Adding -v to the command line and > seeing what gets passed to the linker command could be helpful." > > > > It doesn't look like any of my musl compiled libs point to libc.so.6. > $ readelf -a ./*.install/lib/lib*.so | grep libc.so.6 > $ > > Here's what the X11 libs point to. I've built and referenced all of these > dependencies using musl. > $ readelf -a ./*.install/lib/libX*.so | grep NEED | sort -u > 0x00000001 (NEEDED) Shared library: [libc.so] > 0x00000001 (NEEDED) Shared library: > [libfontconfig.so.1] > 0x00000001 (NEEDED) Shared library: [libfreetype.so.6] > 0x00000001 (NEEDED) Shared library: [libICE.so.6] > 0x00000001 (NEEDED) Shared library: [libSM.so.6] > 0x00000001 (NEEDED) Shared library: [libX11.so.6] > 0x00000001 (NEEDED) Shared library: [libXau.so.6] > 0x00000001 (NEEDED) Shared library: [libxcb.so.1] > 0x00000001 (NEEDED) Shared library: [libXext.so.6] > 0x00000001 (NEEDED) Shared library: [libxml2.so.2] > 0x00000001 (NEEDED) Shared library: [libXmu.so.6] > 0x00000001 (NEEDED) Shared library: [libXpm.so.4] > 0x00000001 (NEEDED) Shared library: [libXrender.so.1] > 0x00000001 (NEEDED) Shared library: [libXt.so.6] > 0x00000001 (NEEDED) Shared library: [libz.so.1] > $ > > > Yes, it's Ubuntu 14.04 $ uname -a Linux john-Precision-WorkStation-T3400 3.13.0-49-generic #83-Ubuntu SMP Fri Apr 10 20:14:51 UTC 2015 i686 i686 i686 GNU/Linux I tried creating an empty ld-linux.so.2 in /usr/lib/gcc/i686-linux-gnu/4.8/ and also in /home/mudd/musl/musl-1.1.8.install/lib/. I'm not sure if either is what Szabolcs Nagy suggested but neither seemed to make a difference. --001a1141cad6084f0e051689403b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable


On Wed, May 20, 2015 at 11:28 AM, John Mudd <johnbmudd@gmail.com= > wrote:

On Tue, May 19,= 2015 at 5:51 PM, John Mudd <johnbmudd@gmail.com> wrote:
I'm trying to build a musl version = of xclock. If I can build xclock then I hope to be able to build my app whi= ch is more complicated. I'm getting the following error.

=
/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.8.install/lib/libc.so section .bss


Rich Felker = wrote:
"Yes= , you're linking to glibc, or to something that was linked with
glibc. You should look though the X11 .so files yo= u've built using
readelf and see if any= of them have dependencies on libc.so.6. It
looks like you're using the host system's gcc and passing the
musl-gcc.specs file to it manually rather than = using the musl-gcc
script or a real musl-ta= rgetted compiler toolchain, so it might be
= something to do with that too. Adding -v to the command line and
seeing what gets passed to the linker command could b= e helpful."



It doesn't look like any of my musl compiled libs poin= t to libc.so.6.
$ readelf -a ./*.install/lib/lib*.so | grep = libc.so.6
$

Here's what the X11 libs point to. I've built= and referenced all of these dependencies using musl.
$ readelf -a ./*.install/lib/libX*.so | grep NEED | sort -u
=A00x00000001 (NEEDED) =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 Shared library: [libc.so]
= =A00x00000001 (NEEDED) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Shared libra= ry: [libfontconfig.so.1]
=A00x00000001 (NEE= DED) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Shared library: [libfreetype.s= o.6]
=A00x00000001 (NEEDED) =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 Shared library: [libICE.so.6]
=A00x00000001 (NEEDED) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = Shared library: [libSM.so.6]
=A00x00000001 = (NEEDED) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Shared library: [libX11.so= .6]
=A00x00000001 (NEEDED) =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 Shared library: [libXau.so.6]
=A00x00000001 (NEEDED) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 S= hared library: [libxcb.so.1]
=A00x00000001 = (NEEDED) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Shared library: [libXext.s= o.6]
=A00x00000001 (NEEDED) =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 Shared library: [libxml2.so.2]
=A00x00000001 (NEEDED) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= Shared library: [libXmu.so.6]
=A00x0000000= 1 (NEEDED) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Shared library: [libXpm.= so.4]
=A00x00000001 (NEEDED) =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 Shared library: [libXrender.so.1]
=A00x00000001 (NEEDED) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 Shared library: [libXt.so.6]
=A00x0= 0000001 (NEEDED) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Shared library: [l= ibz.so.1]
$



Yes, it's Ubuntu 14.04

<= div>=A0$ uname -a
Linux john-Precision-WorkStation-T3400 3.13.0-4= 9-generic #83-Ubuntu SMP Fri Apr 10 20:14:51 UTC 2015 i686 i686 i686 GNU/Li= nux

I tried creating an empty=A0ld-linux.so.2 in= =A0/usr/lib/gcc/i686-linux-gnu/4.8/ and also in=A0/home/mudd/musl/musl-1.1.= 8.install/lib/. I'm not sure if either is what Szabolcs Nagy suggested = but neither seemed to make a difference.

--001a1141cad6084f0e051689403b--