All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
To: Arnout Vandecappelle <arnout@mind.be>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>,
	Buildroot Mailing List <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH 1/1] package/fstrcmp: fix musl static build
Date: Fri, 3 Sep 2021 23:42:49 +0200	[thread overview]
Message-ID: <CAPi7W81qk717BmHjc3-bFNei9cnyb+4p8B26GSTcn-rv2bqVQA@mail.gmail.com> (raw)
In-Reply-To: <93396db0-96b3-faa4-2b62-2301b14300df@mind.be>

Le ven. 3 sept. 2021 à 20:53, Arnout Vandecappelle <arnout@mind.be> a écrit :
>
>
>
> On 02/09/2021 18:20, Fabrice Fontaine wrote:
> > 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_INIT which will
>
>  Wouldn'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:

>>> 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]
>
>  Regards,
>  Arnout
>
> > result in lt-main.sh being 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.lo lib/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_user test_user/main.o  lib/.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/fstrcmp fstrcmp/main.o  lib/.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/ffbee12f13e3d6c180d8891a428c6c490163083d
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> >  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.patch
> >
> > diff --git a/package/fstrcmp/0002-add-LT_INIT.patch b/package/fstrcmp/0002-add-LT_INIT.patch
> > new file mode 100644
> > index 0000000000..cc55ae48c9
> > --- /dev/null
> > +++ b/package/fstrcmp/0002-add-LT_INIT.patch
> > @@ -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 <fontaine.fabrice@gmail.com>
> > +
> > +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@
> > +
> > diff --git a/package/fstrcmp/fstrcmp.mk b/package/fstrcmp/fstrcmp.mk
> > index 9c42159afb..9b6419ae3f 100644
> > --- a/package/fstrcmp/fstrcmp.mk
> > +++ b/package/fstrcmp/fstrcmp.mk
> > @@ -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
> >
> >
Best Regards,

Fabrice
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2021-09-03 21:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210902162024.2201056-1-fontaine.fabrice@gmail.com>
2021-09-03 18:52 ` [Buildroot] [PATCH 1/1] package/fstrcmp: fix musl static build Arnout Vandecappelle
2021-09-03 21:42   ` Fabrice Fontaine [this message]
2023-09-16 21:17 Fabrice Fontaine
2023-09-17 12:38 ` Yann E. MORIN
2023-09-24 21:29 ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPi7W81qk717BmHjc3-bFNei9cnyb+4p8B26GSTcn-rv2bqVQA@mail.gmail.com \
    --to=fontaine.fabrice@gmail.com \
    --cc=arnout@mind.be \
    --cc=bernd.kuhls@t-online.de \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.