Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGDMk9HBNjZsHGtTW4hSU719QiOOYqvWPPdDGt6ENAnvGmi5Hg@mail.gmail.com>
Date: Wed, 20 May 2015 11:28:50 -0400
From: John Mudd <johnbmudd@...il.com>
To: musl <musl@...ts.openwall.com>
Cc: John Mudd <johnbmudd@...il.com>
Subject: Re: musl xclock?

On Tue, May 19, 2015 at 5:51 PM, John Mudd <johnbmudd@...il.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 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]
$

I'm using musl-gcc. What I listed in original email is what that script
executed. After I cleaned it up to make it easier to read.

Here's the output of the gcc command with "-v". It's referencing the native
libc. But where does that come from?

Using built-in specs.
Reading specs from /home/mudd/musl/musl-1.1.8.install/lib/musl-gcc.specs
rename spec cpp_options to old_cpp_options
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.8/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap
--enable-plugin --with-system-zlib --disable-browser-plugin
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-i386/jre
--enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-i386
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-i386
--with-arch-directory=i386 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-targets=all --enable-multiarch --disable-werror
--with-arch-32=i686 --with-multilib-list=m32,m64,mx32 --with-tune=generic
--enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu
--target=i686-linux-gnu
Thread model: posix
gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
COMPILER_PATH=/usr/lib/gcc/i686-linux-gnu/4.8/:/usr/lib/gcc/i686-linux-gnu/4.8/:/usr/lib/gcc/i686-linux-gnu/:/usr/lib/gcc/i686-linux-gnu/4.8/:/usr/lib/gcc/i686-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/i686-linux-gnu/4.8/:/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/:/usr/lib/gcc/i686-linux-gnu/4.8/../../../../lib/:/home/mudd/musl/musl-1.1.8.install/lib/../lib/:/usr/lib/gcc/i686-linux-gnu/4.8/../../../:/home/mudd/musl/musl-1.1.8.install/lib/
COLLECT_GCC_OPTIONS='-v'
'-specs=/home/mudd/musl/musl-1.1.8.install/lib/musl-gcc.specs' '-O3'
'-fno-stack-protector' '-std=gnu99' '-Wall' '-Wpointer-arith'
'-Wmissing-declarations' '-Wformat=2' '-Wstrict-prototypes'
'-Wmissing-prototypes' '-Wnested-externs' '-Wbad-function-cast'
'-Wold-style-definition' '-Wdeclaration-after-statement' '-Wunused'
'-Wuninitialized' '-Wshadow' '-Wcast-qual' '-Wsuggest-attribute=noreturn'
'-Wsuggest-attribute=format' '-Wredundant-decls' '-Werror=implicit'
'-Werror=nonnull' '-Werror=init-self' '-Werror=main'
'-Werror=missing-braces' '-Werror=sequence-point' '-Werror=return-type'
'-Werror=trigraphs' '-Werror=array-bounds' '-Werror=write-strings'
'-Werror=address' '-Werror=int-to-pointer-cast'
'-Werror=pointer-to-int-cast' '-fno-strict-aliasing' '-I'
'/home/mudd/musl/autoconf-2.69.install/include' '-I'
'/home/mudd/musl/automake-1.15.install/include' '-I'
'/home/mudd/musl/bzip2-1.0.6.install/include' '-I'
'/home/mudd/musl/curl-master.install/include' '-I'
'/home/mudd/musl/fontconfig-2.11.93.install/include' '-I'
'/home/mudd/musl/freetype-2.5.5.install/include' '-I'
'/home/mudd/musl/freetype-2.5.5.install/include/freetype2' '-I'
'/home/mudd/musl/inputproto-2.3.install/include' '-I'
'/home/mudd/musl/kbproto-1.0.6.install/include' '-I'
'/home/mudd/musl/krb5-1.13.1.install/include' '-I'
'/home/mudd/musl/libICE-1.0.9.install/include' '-I'
'/home/mudd/musl/libpthread-stubs-0.1.install/include' '-I'
'/home/mudd/musl/libSM-1.2.2.install/include' '-I'
'/home/mudd/musl/libtool-2.4.install/include' '-I'
'/home/mudd/musl/libX11-1.6.3.install/include' '-I'
'/home/mudd/musl/libXau-1.0.8.install/include' '-I'
'/home/mudd/musl/libXaw-1.0.12.install/include' '-I'
'/home/mudd/musl/libxcb-1.11.install/include' '-I'
'/home/mudd/musl/libXext-1.3.3.install/include' '-I'
'/home/mudd/musl/libXft-2.3.2.install/include' '-I'
'/home/mudd/musl/libxkbfile-1.0.8.install/include' '-I'
'/home/mudd/musl/libxml2-2.9.2.install/include' '-I'
'/home/mudd/musl/libxml2-2.9.2.install/include/libxml2' '-I'
'/home/mudd/musl/libxml2-2.9.2.install/include/libxml2/' '-I'
'/home/mudd/musl/libXmu-1.1.2.install/include' '-I'
'/home/mudd/musl/libXpm-3.5.11.install/include' '-I'
'/home/mudd/musl/libXrender-0.9.8.install/include' '-I'
'/home/mudd/musl/libxslt-1.1.28.install/include' '-I'
'/home/mudd/musl/libXt-1.1.4.install/include' '-I'
'/home/mudd/musl/musl-1.1.8.install/include' '-I'
'/home/mudd/musl/ncurses-5.9.install/include' '-I'
'/home/mudd/musl/ncurses-5.9.install/include/ncurses/' '-I'
'/home/mudd/musl/openssl-1.0.2a.install/include' '-I'
'/home/mudd/musl/postgresql-9.4.1.install/include' '-I'
'/home/mudd/musl/Python-2.7.9.install/include' '-I'
'/home/mudd/musl/Python-2.7.9.install/include/python2.7/' '-I'
'/home/mudd/musl/readline-6.3.install/include' '-I'
'/home/mudd/musl/renderproto-0.11.install/include' '-I'
'/home/mudd/musl/sqlite-autoconf-3080803.install/include' '-I'
'/home/mudd/musl/util-macros-1.19.0.install/include' '-I'
'/home/mudd/musl/xcb-proto-1.11.install/include' '-I'
'/home/mudd/musl/xextproto-7.3.0.install/include' '-I'
'/home/mudd/musl/xproto-7.0.27.install/include' '-I'
'/home/mudd/musl/xtrans-1.3.5.install/include' '-I'
'/home/mudd/musl/zlib-1.2.8.install/include'
'-L/home/mudd/musl/autoconf-2.69.install/lib'
'-L/home/mudd/musl/automake-1.15.install/lib'
'-L/home/mudd/musl/bzip2-1.0.6.install/lib'
'-L/home/mudd/musl/curl-master.install/lib'
'-L/home/mudd/musl/fontconfig-2.11.93.install/lib'
'-L/home/mudd/musl/freetype-2.5.5.install/lib'
'-L/home/mudd/musl/inputproto-2.3.install/lib'
'-L/home/mudd/musl/kbproto-1.0.6.install/lib'
'-L/home/mudd/musl/krb5-1.13.1.install/lib'
'-L/home/mudd/musl/libICE-1.0.9.install/lib'
'-L/home/mudd/musl/libpthread-stubs-0.1.install/lib'
'-L/home/mudd/musl/libSM-1.2.2.install/lib'
'-L/home/mudd/musl/libtool-2.4.install/lib'
'-L/home/mudd/musl/libX11-1.6.3.install/lib'
'-L/home/mudd/musl/libXau-1.0.8.install/lib'
'-L/home/mudd/musl/libXaw-1.0.12.install/lib'
'-L/home/mudd/musl/libxcb-1.11.install/lib'
'-L/home/mudd/musl/libXext-1.3.3.install/lib'
'-L/home/mudd/musl/libXft-2.3.2.install/lib'
'-L/home/mudd/musl/libxkbfile-1.0.8.install/lib'
'-L/home/mudd/musl/libxml2-2.9.2.install/lib'
'-L/home/mudd/musl/libXmu-1.1.2.install/lib'
'-L/home/mudd/musl/libXpm-3.5.11.install/lib'
'-L/home/mudd/musl/libXrender-0.9.8.install/lib'
'-L/home/mudd/musl/libxslt-1.1.28.install/lib'
'-L/home/mudd/musl/libXt-1.1.4.install/lib'
'-L/home/mudd/musl/musl-1.1.8.install/lib'
'-L/home/mudd/musl/ncurses-5.9.install/lib'
'-L/home/mudd/musl/openssl-1.0.2a.install/lib'
'-L/home/mudd/musl/postgresql-9.4.1.install/lib'
'-L/home/mudd/musl/Python-2.7.9.install/lib'
'-L/home/mudd/musl/readline-6.3.install/lib'
'-L/home/mudd/musl/renderproto-0.11.install/lib'
'-L/home/mudd/musl/sqlite-autoconf-3080803.install/lib'
'-L/home/mudd/musl/util-macros-1.19.0.install/lib'
'-L/home/mudd/musl/xcb-proto-1.11.install/lib'
'-L/home/mudd/musl/xextproto-7.3.0.install/lib'
'-L/home/mudd/musl/xproto-7.0.27.install/lib'
'-L/home/mudd/musl/xtrans-1.3.5.install/lib'
'-L/home/mudd/musl/zlib-1.2.8.install/lib' '-o' 'xclock' '-mtune=generic'
'-march=i686'

 /usr/lib/gcc/i686-linux-gnu/4.8/collect2 -dynamic-linker
/usr/rx30/musl/lib/ld-musl-i386.so.1 -nostdlib -z relro -o xclock
/home/mudd/musl/musl-1.1.8.install/lib/crt1.o
/home/mudd/musl/musl-1.1.8.install/lib/crti.o
/usr/lib/gcc/i686-linux-gnu/4.8/crtbegin.o
-L/home/mudd/musl/autoconf-2.69.install/lib
-L/home/mudd/musl/automake-1.15.install/lib
-L/home/mudd/musl/bzip2-1.0.6.install/lib
-L/home/mudd/musl/curl-master.install/lib
-L/home/mudd/musl/fontconfig-2.11.93.install/lib
-L/home/mudd/musl/freetype-2.5.5.install/lib
-L/home/mudd/musl/inputproto-2.3.install/lib
-L/home/mudd/musl/kbproto-1.0.6.install/lib
-L/home/mudd/musl/krb5-1.13.1.install/lib
-L/home/mudd/musl/libICE-1.0.9.install/lib
-L/home/mudd/musl/libpthread-stubs-0.1.install/lib
-L/home/mudd/musl/libSM-1.2.2.install/lib
-L/home/mudd/musl/libtool-2.4.install/lib
-L/home/mudd/musl/libX11-1.6.3.install/lib
-L/home/mudd/musl/libXau-1.0.8.install/lib
-L/home/mudd/musl/libXaw-1.0.12.install/lib
-L/home/mudd/musl/libxcb-1.11.install/lib
-L/home/mudd/musl/libXext-1.3.3.install/lib
-L/home/mudd/musl/libXft-2.3.2.install/lib
-L/home/mudd/musl/libxkbfile-1.0.8.install/lib
-L/home/mudd/musl/libxml2-2.9.2.install/lib
-L/home/mudd/musl/libXmu-1.1.2.install/lib
-L/home/mudd/musl/libXpm-3.5.11.install/lib
-L/home/mudd/musl/libXrender-0.9.8.install/lib
-L/home/mudd/musl/libxslt-1.1.28.install/lib
-L/home/mudd/musl/libXt-1.1.4.install/lib
-L/home/mudd/musl/musl-1.1.8.install/lib
-L/home/mudd/musl/ncurses-5.9.install/lib
-L/home/mudd/musl/openssl-1.0.2a.install/lib
-L/home/mudd/musl/postgresql-9.4.1.install/lib
-L/home/mudd/musl/Python-2.7.9.install/lib
-L/home/mudd/musl/readline-6.3.install/lib
-L/home/mudd/musl/renderproto-0.11.install/lib
-L/home/mudd/musl/sqlite-autoconf-3080803.install/lib
-L/home/mudd/musl/util-macros-1.19.0.install/lib
-L/home/mudd/musl/xcb-proto-1.11.install/lib
-L/home/mudd/musl/xextproto-7.3.0.install/lib
-L/home/mudd/musl/xproto-7.0.27.install/lib
-L/home/mudd/musl/xtrans-1.3.5.install/lib
-L/home/mudd/musl/zlib-1.2.8.install/lib
-L/home/mudd/musl/musl-1.1.8.install/lib -L
/usr/lib/gcc/i686-linux-gnu/4.8/. Clock.o xclock.o -lX11 -lXaw7 -lXft
-lxkbfile -lXmu -lXrender -lXt /usr/lib/gcc/i686-linux-gnu/4.8/libgcc.a
/usr/lib/gcc/i686-linux-gnu/4.8/libgcc_eh.a -lc
/usr/lib/gcc/i686-linux-gnu/4.8/libgcc.a
/usr/lib/gcc/i686-linux-gnu/4.8/libgcc_eh.a
/usr/lib/gcc/i686-linux-gnu/4.8/crtend.o
/home/mudd/musl/musl-1.1.8.install/lib/crtn.o
/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
//lib/i386-linux-gnu/libc.so.6: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

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.