package/fstrcmp: fix musl static build
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 3 lines · Fabrice Fontaine
Fix the following musl static build failure raised because host libtool is not patched to manage "-static" as "-all-static". So instead of using host libtool, patch configure.ac to add a call to
LT_INITwhich will
Wouldn't it make more sense to just apply our buildroot-libtool-v2.4.4.patch to
host-libtool?
Regards,
Arnout
Quoted 60 lines
result in
lt-main.shbeing copied (and so libtool patch being applied):
/home/buildroot/autobuild/instance-2/output-1/host/bin/libtool--mode=link --tag=CC/home/buildroot/autobuild/instance-2/output-1/host/bin/arm-buildroot-linux-musleabihf-gcc-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -static -Wall -Wextra -Wshadow -o bin/test_user \
test_user/main.lolib/libfstrcmp.la-static
chmod a+rx bin/test_prelude
libtool: link:/home/buildroot/autobuild/instance-2/output-1/host/bin/arm-buildroot-linux-musleabihf-gcc-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -Wall -Wextra -Wshadow -o bin/test_usertest_user/main.olib/.libs/libfstrcmp.a
libtool: link:/home/buildroot/autobuild/instance-2/output-1/host/bin/arm-buildroot-linux-musleabihf-gcc-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -Wall -Wextra -Wshadow -o bin/fstrcmpfstrcmp/main.olib/.libs/libfstrcmp.a/home/buildroot/autobuild/instance-2/output-1/host/lib/gcc/arm-buildroot-linux-musleabihf/10.3.0/../../../../arm-buildroot-linux-musleabihf/bin/ld: /home/buildroot/autobuild/instance-2/output-1/host/lib/gcc/arm-buildroot-linux-musleabihf/10.3.0/libgcc.a(_dvmd_lnx.o): in function `__aeabi_ldiv0':/home/buildroot/autobuild/instance-2/output-1/build/host-gcc-final-10.3.0/build/arm-buildroot-linux-musleabihf/libgcc/../../../libgcc/config/arm/lib1funcs.S:1499: undefined reference to `raise'Fixes:
- http://autobuild.buildroot.org/results/ffbee12f13e3d6c180d8891a428c6c490163083dSigned-off-by Fabrice Fontaine <[email protected]>--- package/fstrcmp/0002-add-LT_INIT.patch | 28 ++++++++++++++++++++++++++ package/fstrcmp/fstrcmp.mk | 4 ++-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 package/fstrcmp/0002-add-LT_INIT.patchpackage/fstrcmp/0002-add-LT_INIT.patch new file +28
-0@@ -0,0 +1,28 @@ +add LT_INIT + +Add LT_INIT so lt-main.sh will be copied and patched to fix musl static build + +Signed-off-by: Fabrice Fontaine <[email protected]> + +diff -Nura fstrcmp-0.7.D001.orig/configure.ac fstrcmp-0.7.D001/configure.ac +--- fstrcmp-0.7.D001.orig/configure.ac 2021-09-02 15:20:38.033208084 +0200 ++++ fstrcmp-0.7.D001/configure.ac 2021-09-02 15:37:08.625837688 +0200 +@@ -53,6 +53,7 @@ + dnl! AC_ADD_CFLAGS(-Werror) + dnl! AC_ADD_CFLAGS([-Wl,--as-needed]) + ++LT_INIT + AC_CHECK_PROGS(LIBTOOL, libtool) + + if test -z "$LIBTOOL" +diff -Nura fstrcmp-0.7.D001.orig/Makefile.in fstrcmp-0.7.D001/Makefile.in +--- fstrcmp-0.7.D001.orig/Makefile.in 2021-09-02 15:20:38.033208084 +0200 ++++ fstrcmp-0.7.D001/Makefile.in 2021-09-02 15:38:38.622832929 +0200 +@@ -34,6 +34,7 @@ + # + # directory containing the source + # ++top_builddir = @srcdir@ + srcdir = @srcdir@ + VPATH = @srcdir@ +package/fstrcmp/fstrcmp.mk +0
-0
package/fstrcmp/fstrcmp.mk FSTRCMP_SITE = https://sourceforge.net/projects/fstrcmp/files/fstrcmp/$(FSTRCMP_ · line 17
Quoted 10 lines
package/fstrcmp/fstrcmp.mk +2
-2@@ -10,8 +10,8 @@ FSTRCMP_SITE = https://sourceforge.net/projects/fstrcmp/files/fstrcmp/$(FSTRCMP_ FSTRCMP_LICENSE = GPL-3.0+ FSTRCMP_LICENSE_FILES = LICENSE FSTRCMP_INSTALL_STAGING = YES -FSTRCMP_DEPENDENCIES = host-libtool -FSTRCMP_CONF_ENV = LIBTOOL="$(HOST_DIR)/bin/libtool" +# We're patching configure.ac +FSTRCMP_AUTORECONF = YES FSTRCMP_MAKE_OPTS = all-bin libdir/pkgconfig/fstrcmp.pc
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 10 lines · Arnout Vandecappelle
Quoted 3 lines · Fabrice Fontaine
Fix the following musl static build failure raised because host libtool is not patched to manage "-static" as "-all-static". So instead of using host libtool, patch configure.ac to add a call to
LT_INITwhich willWouldn't it make more sense to just apply our buildroot-libtool-v2.4.4.patch to
host-libtool?
I tried this approach but this result in build failures for all host packages such as host-libffi on:
Quoted 1 line
Quoted 1 line
Quoted 1 line
host-libffi 3.4.2 Patching libtool
patching file /home/fabrice/buildroot/output/build/host-libffi-3.4.2/ltmain.sh Reversed (or previously applied) patch detected! Assume -R? [n]
Quoted 71 lines
Regards,
ArnoutQuoted 67 lines
result in
lt-main.shbeing copied (and so libtool patch being applied):
/home/buildroot/autobuild/instance-2/output-1/host/bin/libtool--mode=link --tag=CC/home/buildroot/autobuild/instance-2/output-1/host/bin/arm-buildroot-linux-musleabihf-gcc-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -static -Wall -Wextra -Wshadow -o bin/test_user \
test_user/main.lolib/libfstrcmp.la-static
chmod a+rx bin/test_prelude
libtool: link:/home/buildroot/autobuild/instance-2/output-1/host/bin/arm-buildroot-linux-musleabihf-gcc-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -Wall -Wextra -Wshadow -o bin/test_usertest_user/main.olib/.libs/libfstrcmp.a
libtool: link:/home/buildroot/autobuild/instance-2/output-1/host/bin/arm-buildroot-linux-musleabihf-gcc-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -Wall -Wextra -Wshadow -o bin/fstrcmpfstrcmp/main.olib/.libs/libfstrcmp.a/home/buildroot/autobuild/instance-2/output-1/host/lib/gcc/arm-buildroot-linux-musleabihf/10.3.0/../../../../arm-buildroot-linux-musleabihf/bin/ld: /home/buildroot/autobuild/instance-2/output-1/host/lib/gcc/arm-buildroot-linux-musleabihf/10.3.0/libgcc.a(_dvmd_lnx.o): in function `__aeabi_ldiv0':/home/buildroot/autobuild/instance-2/output-1/build/host-gcc-final-10.3.0/build/arm-buildroot-linux-musleabihf/libgcc/../../../libgcc/config/arm/lib1funcs.S:1499: undefined reference to `raise'Fixes:
- http://autobuild.buildroot.org/results/ffbee12f13e3d6c180d8891a428c6c490163083dSigned-off-by Fabrice Fontaine <[email protected]>--- package/fstrcmp/0002-add-LT_INIT.patch | 28 ++++++++++++++++++++++++++ package/fstrcmp/fstrcmp.mk | 4 ++-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 package/fstrcmp/0002-add-LT_INIT.patchpackage/fstrcmp/0002-add-LT_INIT.patch new file +28
-0@@ -0,0 +1,28 @@ +add LT_INIT + +Add LT_INIT so lt-main.sh will be copied and patched to fix musl static build + +Signed-off-by: Fabrice Fontaine <[email protected]> + +diff -Nura fstrcmp-0.7.D001.orig/configure.ac fstrcmp-0.7.D001/configure.ac +--- fstrcmp-0.7.D001.orig/configure.ac 2021-09-02 15:20:38.033208084 +0200 ++++ fstrcmp-0.7.D001/configure.ac 2021-09-02 15:37:08.625837688 +0200 +@@ -53,6 +53,7 @@ + dnl! AC_ADD_CFLAGS(-Werror) + dnl! AC_ADD_CFLAGS([-Wl,--as-needed]) + ++LT_INIT + AC_CHECK_PROGS(LIBTOOL, libtool) + + if test -z "$LIBTOOL" +diff -Nura fstrcmp-0.7.D001.orig/Makefile.in fstrcmp-0.7.D001/Makefile.in +--- fstrcmp-0.7.D001.orig/Makefile.in 2021-09-02 15:20:38.033208084 +0200 ++++ fstrcmp-0.7.D001/Makefile.in 2021-09-02 15:38:38.622832929 +0200 +@@ -34,6 +34,7 @@ + # + # directory containing the source + # ++top_builddir = @srcdir@ + srcdir = @srcdir@ + VPATH = @srcdir@ +package/fstrcmp/fstrcmp.mk +2
-2@@ -10,8 +10,8 @@ FSTRCMP_SITE = https://sourceforge.net/projects/fstrcmp/files/fstrcmp/$(FSTRCMP_ FSTRCMP_LICENSE = GPL-3.0+ FSTRCMP_LICENSE_FILES = LICENSE FSTRCMP_INSTALL_STAGING = YES -FSTRCMP_DEPENDENCIES = host-libtool -FSTRCMP_CONF_ENV = LIBTOOL="$(HOST_DIR)/bin/libtool" +# We're patching configure.ac +FSTRCMP_AUTORECONF = YES
Quoted 3 lines
package/fstrcmp/fstrcmp.mk FSTRCMP_SITE = https://sourceforge.net/projects/fstrcmp/files/fstrcmp/$(FSTRCMP_ · line 17
Quoted 3 lines
package/fstrcmp/fstrcmp.mk +0
-0FSTRCMP_MAKE_OPTS = all-bin libdir/pkgconfig/fstrcmp.pc
Best Regards,
Fabrice
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot