* Issues with the 1.1.2 pre-built musl toolchains
@ 2014-06-28 10:53 Thomas Petazzoni
2014-06-28 11:06 ` Luca Barbato
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni @ 2014-06-28 10:53 UTC (permalink / raw)
To: musl
Hello,
In Buildroot, we do have support for the pre-built musl toolchains
available from http://musl.codu.org/. Up until the musl 1.1.1
toolchains, everything was working fine, but unfortunately the musl
1.1.2 toolchains are no longer working correctly, for two reasons:
* The first reason is that the sysroot support has been disabled,
while this sysroot support was initially requested by us to be able
to use those pre-built toolchains in Buildroot. Buildroot simply
cannot support non-sysroot capable pre-built toolchains. Moreover,
the commit that indicates why sysroot support is not desirable
(https://bitbucket.org/GregorR/musl-cross/commits/16ccdedb5fae1fbf72fe61ceec35025e3b6a1557)
indicates that it's related to a path issue in the libstdc++.la
file, but I fail to see any difference between the libstdc++.la file
of the 1.1.1 musl toolchains (which do have sysroot support), and
the libstdc++.la file of the 1.1.2 musl toolchains (which no longer
have sysroot support) :
=== musl 1.1.1 toolchains ===
thomas@skate:~/dl/arm-linux-musleabi-1.1.1$ ./bin/arm-musl-linuxeabi-gcc -v
[...]
Configured with: ../configure --prefix=/opt/cross/musl/arm-linux-musleabi --target=arm-linux-musleabi --with-sysroot=/opt/cross/musl/arm-linux-musleabi/arm-linux-musleabi --enable-languages=c,c++ --disable-libmudflap --disable-libsanitizer --disable-multilib --disable-lto-plugin --with-arch=armv4t
[...]
thomas@skate:~/dl/arm-linux-musleabi-1.1.1$ cat arm-linux-musleabi/lib/libstdc++.la
# libstdc++.la - a libtool library file
# Generated by libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname='libstdc++.so.6'
# Names of this library.
library_names='libstdc++.so.6.0.19 libstdc++.so.6 libstdc++.so'
# The name of the static archive.
old_library='libstdc++.a'
# Linker flags that can not go in dependency_libs.
inherited_linker_flags=''
# Libraries that this one depends upon.
dependency_libs=' -lm'
# Names of additional weak libraries provided by this library
weak_library_names=''
# Version information for libstdc++.
current=6
age=0
revision=19
# Is this an already installed library?
installed=yes
# Should we warn about portability when linking against -modules?
shouldnotlink=no
# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/opt/cross/musl/arm-linux-musleabi/arm-linux-musleabi/lib'
=== musl 1.1.2 toolchains ===
thomas@skate:~/dl/arm-linux-musleabi-1.1.2$ ./bin/arm-linux-musleabi-gcc -v
[...]
Configured with: ../configure --prefix=/opt/cross/musl/arm-linux-musleabi --target=arm-linux-musleabi --enable-languages=c,c++ --disable-libmudflap --disable-libsanitizer --disable-nls --disable-multilib --disable-lto-plugin --with-arch=armv4t
[...]
thomas@skate:~/dl/arm-linux-musleabi-1.1.2$ cat arm-linux-musleabi/lib/libstdc++.la
# libstdc++.la - a libtool library file
# Generated by libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname='libstdc++.so.6'
# Names of this library.
library_names='libstdc++.so.6.0.19 libstdc++.so.6 libstdc++.so'
# The name of the static archive.
old_library='libstdc++.a'
# Linker flags that can not go in dependency_libs.
inherited_linker_flags=''
# Libraries that this one depends upon.
dependency_libs=' -lm'
# Names of additional weak libraries provided by this library
weak_library_names=''
# Version information for libstdc++.
current=6
age=0
revision=19
# Is this an already installed library?
installed=yes
# Should we warn about portability when linking against -modules?
shouldnotlink=no
# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/opt/cross/musl/arm-linux-musleabi/arm-linux-musleabi/lib'
As you can see, the libdir is identical in both .la files, so
disabling the sysroot support hasn't changed anything, so I believe
some incorrect assumption was made in commit
https://bitbucket.org/GregorR/musl-cross/commits/16ccdedb5fae1fbf72fe61ceec35025e3b6a1557.
* The second problem is that the kernel headers seem to no longer be
present in the toolchains. I've seen that musl-cross has switched to
using the sanitized kernel headers from Sabotage but the end result
is that there are no longer any headers in usr/include/linux. For
example, Buildroot looks at <linux/version.h> to see the kernel
version of the headers, and uses that to ensure the user doesn't use
kernel headers that are too old to build certain
applications/libraries that need recent kernel headers. The
disappearance of <linux/version.h> is problematic for this specific
usage, but I believe the disappearance of *all* <linux/foo.h>
headers is probably going to cause build issues as well. See:
thomas@skate:~/dl/arm-linux-musleabi-1.1.1$ LANG=C cat arm-linux-musleabi/usr/include/linux/version.h
#define LINUX_VERSION_CODE 199686
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
thomas@skate:~/dl/arm-linux-musleabi-1.1.2$ LANG=C cat arm-linux-musleabi/usr/include/linux/version.h
cat: arm-linux-musleabi/usr/include/linux/version.h: No such file or directory
Would it be possible to revert back to the build process of the 1.1.1
musl toolchains, which were working perfectly fine?
Thanks a lot,
Thomas Petazzoni
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Issues with the 1.1.2 pre-built musl toolchains
2014-06-28 10:53 Issues with the 1.1.2 pre-built musl toolchains Thomas Petazzoni
@ 2014-06-28 11:06 ` Luca Barbato
0 siblings, 0 replies; 2+ messages in thread
From: Luca Barbato @ 2014-06-28 11:06 UTC (permalink / raw)
To: musl
On 28/06/14 12:53, Thomas Petazzoni wrote:
If the problem is the .la file, what about removing it?
.la files cause more problems than what they supposedly solve (linking
deps for .a files, superceeded by pkgconf almost completely).
lu
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-28 11:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-28 10:53 Issues with the 1.1.2 pre-built musl toolchains Thomas Petazzoni
2014-06-28 11:06 ` Luca Barbato
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).