All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/4] package/bind: enable static build
Date: Wed, 24 Apr 2019 22:34:53 +0200	[thread overview]
Message-ID: <20190424223453.0819e407@windsurf> (raw)
In-Reply-To: <20190423212406.13909-1-fontaine.fabrice@gmail.com>

Hello Fabrice,

On Tue, 23 Apr 2019 23:24:03 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Static build has been disabled in 2014 with commit
> 6045904752b06a8b8e52ba8fc2e49a8548964e8d however bind can be built
> statically thanks to --without-dlopen so enable it back
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  ...n_driver.c-fix-build-without-dlfcn.h.patch | 28 +++++++++++++++++++
>  package/bind/Config.in                        |  5 ++--
>  package/bind/bind.mk                          |  4 ++-
>  3 files changed, 33 insertions(+), 4 deletions(-)
>  create mode 100644 package/bind/0002-dlz_open_driver.c-fix-build-without-dlfcn.h.patch

The series looks good in principle, but sadly the following defconfig:

BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2019.02-rc1.tar.bz2"
BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_DHCP=y
# BR2_TARGET_ROOTFS_TAR is not set

fails to build with:

configure: error: Cannot find static libraries at /home/thomas/projets/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib
make[1]: *** [package/pkg-generic.mk:231: /home/thomas/projets/buildroot/output/build/dhcp-4.4.1/.stamp_configured] Error 1

Looking at configure.ac sheds some light:

AC_ARG_ENABLE(libtool,
        AS_HELP_STRING([--enable-libtool],
[use GNU libtool for dynamic shared libraries (default is no).]),
        want_libtool="$enableval")

if test "$use_libbind" != "no"; then
        if test "$want_libtool" = "yes" -a \
                ! -f "$use_libbind/lib/libisc.la"
        then
                AC_MSG_ERROR([Cannot find dynamic libraries at $use_libbind/lib])
        fi
        if test "$want_libtool" = "no" -a \
                ! -f "$use_libbind/lib/libisc.a"
        then
                AC_MSG_ERROR([Cannot find static libraries at $use_libbind/lib])
        fi
fi

We are not passing --enable-libtool, so the code checks is libisc.a
exists, and it doesn't because a default build is BR2_SHARED_LIBS=y,
and therefore bind doesn't build/install any static library.

I suppose passing --enable-libtool would work, but I haven't tested.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  parent reply	other threads:[~2019-04-24 20:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-23 21:24 [Buildroot] [PATCH 1/4] package/bind: enable static build Fabrice Fontaine
2019-04-23 21:24 ` [Buildroot] [PATCH 2/4] package/bind: remove threads dependency Fabrice Fontaine
2019-04-23 21:24 ` [Buildroot] [PATCH 3/4] package/bind: don't enable server by default Fabrice Fontaine
2019-04-24 20:36   ` Thomas Petazzoni
2019-04-24 20:56     ` Arnout Vandecappelle
2019-04-25 15:56       ` Yann E. MORIN
2019-04-23 21:24 ` [Buildroot] [PATCH 4/4] package/dhcp: use system bind Fabrice Fontaine
2019-04-24 20:34 ` Thomas Petazzoni [this message]
2019-04-24 20:46   ` [Buildroot] [PATCH 1/4] package/bind: enable static build Fabrice Fontaine

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=20190424223453.0819e407@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --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 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.