From: Waldemar Brodkorb <wbx@openadk.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] berkeleydb: fix static linking issues
Date: Mon, 5 Dec 2016 04:46:15 +0100 [thread overview]
Message-ID: <20161205034615.GA8584@waldemar-brodkorb.de> (raw)
In-Reply-To: <20161204215605.680c9070@free-electrons.com>
Hi Thomas,
Thomas Petazzoni wrote,
> Hello,
>
> On Sun, 4 Dec 2016 18:39:24 +0100, Waldemar Brodkorb wrote:
> > Libtool by default drops -static, so force libtool with -all-static
> > to do static linking.
>
> This needs a little bit more details, because libtool is used by a
> large fraction of our packages, we pass -static only, and it just works.
>
> Why do we have a different situation here? I thought this undefined
> reference to `dl_iterate_phdr' issue was more a toolchain problem.
It is not a toolchain problem, it is more likely a change in
toolchain behaviour with uClibc-ng >= 1.0.18.
We can not avoid the circular dependency between libc and libgcc, so
every static compiled package must use -static while linking.
> It's affecting a number of different packages, and is apparently a new
> problem, so a fix at the package level looks a bit odd.
In this case it is similar to autossh a package level problem.
All the libtool packages are working out-of-the box in buildroot with
-static, because LIBTOOL_PATCH_HOOK patches libtool to behave like
-all-static.
In this case the hook isn't working correctly, because ltmain.sh
isn't found:
ESC[3m>>> berkeleydb 5.3.28 Patching libtoolESC[23m
for i in `find /home/wbx/buildroot/output/build/berkeleydb-5.3.28/build_unix -name
ltmain.sh`; do ltmain_version=`sed -n '/^[ \t]*VERSION=/{s/^[
\t]*VERSION=//;p;q;}' $i | sed -e 's/\([0-9]*\.[0-9]*\).*/\1/' -e
's/\"//'`; ltmain_patchlevel=`sed -n '/^[ \t]*VERSION=/{s/^[
\t]*VERSION=//;p;q;}' $i | sed -e
's/\([0-9]*\.[0-9]*\.*\)\([0-9]*\).*/\2/' -e 's/\"//'`; if test
${ltmain_version} = '1.5'; then patch -i
support/libtool/buildroot-libtool-v1.5.patch ${i}; elif test
${ltmain_version} = "2.2"; then patch -i
support/libtool/buildroot-libtool-v2.2.patch ${i}; elif test
${ltmain_version} = "2.4"; then if test ${ltmain_patchlevel:-0} -gt
2; then patch -i support/libtool/buildroot-libtool-v2.4.4.patch
${i}; else patch -i support/libtool/buildroot-libtool-v2.4.patch
${i}; fi fi done
touch
wbx at helium:~/buildroot $ find /home/wbx/buildroot/output/build/berkeleydb-5.3.28/ -name ltmain.sh
/home/wbx/buildroot/output/build/berkeleydb-5.3.28/dist/ltmain.sh
/home/wbx/buildroot/output/build/berkeleydb-5.3.28/lang/sql/jdbc/ltmain.sh
/home/wbx/buildroot/output/build/berkeleydb-5.3.28/lang/sql/odbc/ltmain.sh
/home/wbx/buildroot/output/build/berkeleydb-5.3.28/lang/sql/sqlite/ltmain.sh
The hook searches in
/home/wbx/buildroot/output/build/berkeleydb-5.3.28/build_unix, but
it seems berkeley db provides ltmain.sh in
/home/wbx/buildroot/output/build/berkeleydb-5.3.28/dist/.
best regards
Waldemar
next prev parent reply other threads:[~2016-12-05 3:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-04 17:39 [Buildroot] [PATCH] berkeleydb: fix static linking issues Waldemar Brodkorb
2016-12-04 20:56 ` Thomas Petazzoni
2016-12-05 3:46 ` Waldemar Brodkorb [this message]
2016-12-05 18:22 ` Arnout Vandecappelle
2016-12-05 21:21 ` Thomas Petazzoni
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=20161205034615.GA8584@waldemar-brodkorb.de \
--to=wbx@openadk.org \
--cc=buildroot@busybox.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox