Skip to contentSkip to conversation

Pull request for branch 2010-05-14-fixes

GIT PULL New Thomas Petazzoni 4 participants 21 messages May 14, 2010 – May 19, 2010

lore
Share & tools
lore
#0 lore raw

Hello,

Here are a few fixes for Buildroot. The two first patches are more invasive than usual fixes, but they are needed to make glibc external toolchains work properly with packages relying on gettext. The proposed solution replaces the ugly "hack" submitted to fix grep a few days ago.

I have tested these changes by compiling a Buildroot configuration with busybox ltrace flex libcgicc avahi gmpc grep hal libglib2 libidn libsoup make libmpd php php_ext_gettext psmisc util-linux (packages affected by the changes), with the four following toolchains:

* External ARM glibc CodeSourcery toolchain

* External ARM Buildroot uClibc no-locale toolchain

* External ARM Crosstool-NG eglibc toolchain

* Internal ARM Buildroot uClibc locale toolchain

Thomas

The following changes since commit 6d1ab151cb4a14a6ca29e692de26fefd2f453d0a:
Peter Korsgaard (1):

        update for 2010.05-rc2

are available in the git repository at:

git://git.busybox.net/~tpetazzoni/git/buildroot 2010-05-14-fixes

Thomas Petazzoni (8):
Add a BR2_NEEDS_GETTEXT option
Make all package using gettext rely on BR2_NEEDS_GETTEXT
libcap: fix build failure
libcgicc: fix package after autotools infrastructure conversion
ltrace: fix build failure
gettext: make only available if BR2_NEEDS_GETTEXT is set
avahi: needs IPv6
external toolchain: check BR2_INSTALL_LIBSTDCPP

 package/avahi/Config.in                            |    5 +++--
 package/avahi/avahi.mk                             |    2 +-
 package/gettext/Config.in                          |    2 ++
 package/gmpc/Config.in                             |    4 ++--
 package/gmpc/gmpc.mk                               |    3 ++-
 package/grep/Config.in                             |    4 ++--
 package/grep/grep.mk                               |    2 +-
 package/hal/Config.in                              |    4 ++--
 package/hal/hal.mk                                 |    2 +-
 package/libcap/libcap.mk                           |    4 ++--
 ...cgicc-3.2.9-disable-documentation-option.patch} |    0
 package/libcgicc/libcgicc.mk                       |    2 ++
 package/libglib2/Config.in                         |    4 ++--
 package/libglib2/libglib2.mk                       |    2 +-
 package/libidn/libidn.mk                           |    2 +-
 package/libsoup/libsoup.mk                         |    2 +-
 package/ltrace/ltrace.mk                           |    3 +--
 package/make/Config.in                             |    4 ++--
 package/make/make.mk                               |    2 +-
 package/multimedia/libmpd/Config.in                |    2 --
 package/pango/pango.mk                             |    2 +-
 package/php/Config.ext                             |    2 +-
 package/php/php.mk                                 |    2 +-
 package/psmisc/Config.in                           |    4 ++--
 package/psmisc/psmisc.mk                           |    8 +-------
 package/sshfs/Config.in                            |    4 ++--
 package/sshfs/sshfs.mk                             |    2 +-
 package/util-linux/Config.in                       |    4 ++--
 package/util-linux/util-linux.mk                   |    4 ++--
 toolchain/Config.in.2                              |    6 ++++++
 toolchain/external-toolchain/ext-tool.mk           |   12 ++++++++++++
 31 files changed, 60 insertions(+), 45 deletions(-)
 rename package/libcgicc/{cgicc-3.2.9-disable-documentation-option.patch => libcgicc-3.2.9-disable-documentation-option.patch} (100%)

Thanks,

Signature · 1 line
Thomas Petazzoni
#1 lore raw

PATCH 1/8 Add a BR2_NEEDS_GETTEXT option

When using an external toolchain that uses the glibc or eglibc C libraries, compiling a separate gettext and libintl is not needed and is even a source of confusion, causing build failures. These build failures are due to the fact that when libintl is compiled, it replaces the C library libintl.h by its own, which does #define gettext libintl_gettext. Then, when packages want to use gettext, autoconf realize that gettext is available in the C library and therefore do not add -lintl to the LDFLAGS, causing the build failure because the program has been compiled to use libintl_gettext but this function is not available.

Therefore, we should use gettext if a uClibc internal toolchain or a uClibc external toolchain. If an external glibc toolchain is used, gettext shouldn't be used.

In order to implement that, we introduce the BR2_NEEDS_GETTEXT option, which is hidden to the user, and whose value is computed automatically from the rest of the configuration.

---
 toolchain/Config.in.2 |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
toolchain/Config.in.2 +6 -0
index f04f18a..1f49e00 100644
@@ -56,6 +56,12 @@ config BR2_ENABLE_LOCALE_WHITELIST
 	  will be available on the target - That purely depends on the
 	  support for that locale in the selected packages.
 
+config BR2_NEEDS_GETTEXT
+	bool
+	default y if BR2_TOOLCHAIN_BUILDROOT
+	default y if BR2_TOOLCHAIN_EXTERNAL_UCLIBC
+	default n if BR2_TOOLCHAIN_EXTERNAL_GLIBC
+
 config BR2_USE_WCHAR
 	bool "Enable WCHAR support"
 	help
Signature · 1 line
1.6.3.3
#3 lore raw

PATCH 1/8 Add a BR2_NEEDS_GETTEXT option

In reply to Thomas Petazzoni
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> When using an external toolchain that uses the glibc or eglibc C Thomas> libraries, compiling a separate gettext and libintl is not needed and Thomas> is even a source of confusion, causing build failures. These build Thomas> failures are due to the fact that when libintl is compiled, it Thomas> replaces the C library libintl.h by its own, which does #define Thomas> gettext libintl_gettext. Then, when packages want to use gettext, Thomas> autoconf realize that gettext is available in the C library and Thomas> therefore do not add -lintl to the LDFLAGS, causing the build failure Thomas> because the program has been compiled to use libintl_gettext but this Thomas> function is not available.

Thomas> Therefore, we should use gettext if a uClibc internal toolchain or a

/should use/should only use/

Thomas> +config BR2_NEEDS_GETTEXT
Thomas> + bool
Thomas> + default y if BR2_TOOLCHAIN_BUILDROOT
Thomas> + default y if BR2_TOOLCHAIN_EXTERNAL_UCLIBC
Thomas> + default n if BR2_TOOLCHAIN_EXTERNAL_GLIBC

You don't really need the 'default n' (as that's default), but ok.

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH 1/8 Add a BR2_NEEDS_GETTEXT option

Quoted 7 lines · On Mon, 17 May 2010 09:47:40 +0200 Peter Korsgaard <[email protected]> wrote:

Thomas> +config BR2_NEEDS_GETTEXT
Thomas> + bool
Thomas> + default y if BR2_TOOLCHAIN_BUILDROOT
Thomas> + default y if BR2_TOOLCHAIN_EXTERNAL_UCLIBC
Thomas> + default n if BR2_TOOLCHAIN_EXTERNAL_GLIBC

You don't really need the 'default n' (as that's default), but ok.

True. But in this particular case, I think it makes it clear in which case it is "y" and in which case it is "n".

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#5 lore raw

PATCH 2/8 Make all package using gettext rely on BR2_NEEDS_GETTEXT

In reply to Thomas Petazzoni
---
 package/avahi/Config.in             |    4 ++--
 package/avahi/avahi.mk              |    2 +-
 package/gmpc/Config.in              |    4 ++--
 package/gmpc/gmpc.mk                |    3 ++-
 package/grep/Config.in              |    4 ++--
 package/grep/grep.mk                |    2 +-
 package/hal/Config.in               |    4 ++--
 package/hal/hal.mk                  |    2 +-
 package/libglib2/Config.in          |    4 ++--
 package/libglib2/libglib2.mk        |    2 +-
 package/libidn/libidn.mk            |    2 +-
 package/libsoup/libsoup.mk          |    2 +-
 package/make/Config.in              |    4 ++--
 package/make/make.mk                |    2 +-
 package/multimedia/libmpd/Config.in |    2 --
 package/pango/pango.mk              |    2 +-
 package/php/Config.ext              |    2 +-
 package/php/php.mk                  |    2 +-
 package/psmisc/Config.in            |    4 ++--
 package/psmisc/psmisc.mk            |    8 +-------
 package/sshfs/Config.in             |    4 ++--
 package/sshfs/sshfs.mk              |    2 +-
 package/util-linux/Config.in        |    4 ++--
 package/util-linux/util-linux.mk    |    4 ++--
 24 files changed, 34 insertions(+), 41 deletions(-)
package/avahi/Config.in +2 -2
index 35b7c27..3386005 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_AVAHI
 	bool "avahi"
-	select BR2_PACKAGE_GETTEXT if BR2_ENABLE_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_ENABLE_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	help
 	  Avahi is a system which facilitates service
 	  discovery on a local network.
package/avahi/avahi.mk +1 -1
index 9940d28..5e64047 100644
@@ -82,7 +82,7 @@ AVAHI_CONF_OPT = --localstatedir=/var \
 		--with-autoipd-user=default \
 		--with-autoipd-group=default
 
-AVAHI_DEPENDENCIES = $(if $(BR2_PACKAGE_GETTEXT),gettext) host-intltool
+AVAHI_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT),gettext libintl) host-intltool
 
 ifneq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_AVAHI_AUTOIPD),)
 AVAHI_DEPENDENCIES += libdaemon
package/gmpc/Config.in +2 -2
index a834361..056f5a0 100644
@@ -2,8 +2,8 @@ config BR2_PACKAGE_GMPC
 	bool "gmpc"
 	depends on BR2_PACKAGE_LIBGTK2
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT
-	select BR2_PACKAGE_LIBINTL
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_LIBMPD
 	select BR2_PACKAGE_LIBCURL
package/gmpc/gmpc.mk +2 -1
index 0db89b9..aa74a2e 100644
@@ -11,7 +11,8 @@ GMPC_CONF_ENV = ac_cv_lib_curl_curl_global_init=yes \
 		ac_cv_path_GOB2=$(GOB2_HOST_BINARY)
 GMPC_CONF_OPT = --disable-mmkeys
 
-GMPC_DEPENDENCIES = libglib2 libgtk2 libglade libcurl libmpd host-gob2 host-intltool
+GMPC_DEPENDENCIES = libglib2 libgtk2 libglade libcurl libmpd host-gob2 host-intltool \
+	$(if $(BR2_NEEDS_GETTEXT),gettext libintl)
 
 ifeq ($(BR2_PACKAGE_XLIB_LIBSM),y)
 GMPC_DEPENENCIES += xlib_libSM
package/grep/Config.in +2 -2
index 3795330..f898fdf 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_GREP
 	bool "grep"
-	select BR2_PACKAGE_GETTEXT if BR2_ENABLE_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_ENABLE_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	help
 	  The GNU regular expression matcher.
 
package/grep/grep.mk +1 -1
index acef6e9..93c6caf 100644
@@ -8,6 +8,6 @@ GREP_SOURCE:=grep-$(GREP_VERSION).tar.bz2
 GREP_SITE:=$(BR2_GNU_MIRROR)/grep
 GREP_CONF_OPT = --disable-perl-regexp --without-included-regex
 
-GREP_DEPENDENCIES = $(if $(BR2_ENABLE_LOCALE),gettext libintl)
+GREP_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT),gettext libintl)
 
 $(eval $(call AUTOTARGETS,package,grep))
package/hal/Config.in +2 -2
index 250e005..9518f13 100644
@@ -2,8 +2,8 @@ config BR2_PACKAGE_HAL
 	bool "hal"
 	select BR2_PACKAGE_EXPAT
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT
-	select BR2_PACKAGE_LIBINTL
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_DBUS
 	select BR2_PACKAGE_DBUS_EXPAT
package/hal/hal.mk +1 -1
index 262fc41..62eca70 100644
@@ -79,7 +79,7 @@ $(TARGET_DIR)/$(HAL_TARGET_BINARY): $(HAL_DIR)/hald/hald
 		rm -f $(TARGET_DIR)/usr/libexec/$$file; \
 	done
 
-hal: host-pkg-config host-libxml-parser-perl dbus-glib hwdata udev $(TARGET_DIR)/$(HAL_TARGET_BINARY)
+hal: host-pkg-config host-libxml-parser-perl dbus-glib hwdata udev $(if $(BR2_NEEDS_GETTEXT),gettext libintl) $(TARGET_DIR)/$(HAL_TARGET_BINARY)
 
 hal-clean:
 	rm -f $(TARGET_DIR)/etc/dbus-1/system.d/hal.conf
package/libglib2/Config.in +2 -2
index d947eb6..cc1d6e2 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_LIBGLIB2
 	bool "libglib2"
-	select BR2_PACKAGE_GETTEXT
-	select BR2_PACKAGE_LIBINTL
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	help
 	  Low-level core library that forms the basis of GTK+ and GNOME.
package/libglib2/libglib2.mk +1 -1
index 72a1396..43b1a89 100644
@@ -55,7 +55,7 @@ HOST_LIBGLIB2_CONF_OPT = \
 		--disable-gtk-doc \
 		--enable-debug=no \
 
-LIBGLIB2_DEPENDENCIES = gettext libintl host-pkg-config host-libglib2
+LIBGLIB2_DEPENDENCIES = host-pkg-config host-libglib2 $(if $(BR2_NEEDS_GETTEXT),gettext libintl)
 
 HOST_LIBGLIB2_DEPENDENCIES = host-pkg-config
 
package/libidn/libidn.mk +1 -1
index 6ee1a96..bc8e001 100644
@@ -10,7 +10,7 @@ LIBIDN_INSTALL_STAGING = YES
 LIBIDN_INSTALL_TARGET = YES
 LIBIDN_CONF_OPT = --enable-shared --disable-java --enable-csharp=no
 LIBIDN_LIBTOOL_PATCH = NO
-LIBIDN_DEPENDENCIES = host-pkg-config gettext $(if $(BR2_PACKAGE_LIBICONV),libiconv)
+LIBIDN_DEPENDENCIES = host-pkg-config $(if $(BR2_NEEDS_GETTEXT),gettext) $(if $(BR2_PACKAGE_LIBICONV),libiconv)
 
 $(eval $(call AUTOTARGETS,package,libidn))
 
package/libsoup/libsoup.mk +1 -1
index 3829a81..45f62e8 100644
@@ -26,6 +26,6 @@ LIBSOUP_CONF_OPT = \
 	--without-gnome		\
 	--disable-gtk-doc
 
-LIBSOUP_DEPENDENCIES = gettext libintl host-pkg-config host-libglib2 libglib2 libxml2
+LIBSOUP_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT),gettext libintl) host-pkg-config host-libglib2 libglib2 libxml2
 
 $(eval $(call AUTOTARGETS,package,libsoup))
package/make/Config.in +2 -2
index 5264005..674e245 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_MAKE
 	bool "make"
-	select BR2_PACKAGE_GETTEXT if BR2_ENABLE_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_ENABLE_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	help
 	  A tool which controls the generation of executables and other
 	  non-source files of a program from the program's source files.
package/make/make.mk +1 -1
index 29c7af4..5dd0637 100644
@@ -56,7 +56,7 @@ $(TARGET_DIR)/$(GNUMAKE_TARGET_BINARY): $(GNUMAKE_DIR)/$(GNUMAKE_BINARY)
 	rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
 		$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
 
-make: $(if $(BR2_PACKAGE_GETTEXT),gettext) $(TARGET_DIR)/$(GNUMAKE_TARGET_BINARY)
+make: $(if $(BR2_NEEDS_GETTEXT),gettext) $(TARGET_DIR)/$(GNUMAKE_TARGET_BINARY)
 
 make-clean:
 	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(GNUMAKE_DIR) uninstall
package/multimedia/libmpd/Config.in +0 -2
index c79203c..4f3a714 100644
@@ -1,8 +1,6 @@
 config BR2_PACKAGE_LIBMPD
 	bool "libmpd"
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT
-	select BR2_PACKAGE_LIBINTL
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	help
 	  High-level client library for accessing Music Player Daemon.
package/pango/pango.mk +1 -1
index 38e163e..812a4c8 100644
@@ -45,7 +45,7 @@ HOST_PANGO_CONF_OPT = \
 		$(if $(BR2_PACKAGE_XORG7),--with-x,--without-x) \
 		--disable-debug \
 
-PANGO_DEPENDENCIES = gettext libintl host-pkg-config host-pango libglib2 cairo
+PANGO_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT),gettext libintl) host-pkg-config host-pango libglib2 cairo
 
 HOST_PANGO_DEPENDENCIES = host-pkg-config host-cairo host-libglib2 host-autoconf host-automake
 
package/php/Config.ext +1 -1
index 9b53e87..2fbd05e 100644
@@ -67,7 +67,7 @@ config BR2_PACKAGE_PHP_EXT_FTP
 
 config BR2_PACKAGE_PHP_EXT_GETTEXT
 	bool "gettext"
-	select BR2_PACKAGE_GETTEXT
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	help
 	  gettext support
 
package/php/php.mk +1 -1
index cd5ed9e..c5f9c14 100644
@@ -84,7 +84,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_PHP_EXT_GETTEXT),y)
 	PHP_CONF_OPT += --with-gettext=$(STAGING_DIR)/usr
-	PHP_DEPENDENCIES += gettext
+	PHP_DEPENDENCIES += $(if $(BR2_NEEDS_GETTEXT),gettext)
 endif
 
 ifeq ($(BR2_PACKAGE_PHP_EXT_GMP),y)
package/psmisc/Config.in +2 -2
index e7ce704..31e982c 100644
@@ -1,8 +1,8 @@
 config BR2_PACKAGE_PSMISC
 	bool "psmisc"
 	select BR2_PACKAGE_NCURSES
-	select BR2_PACKAGE_GETTEXT if BR2_ENABLE_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_ENABLE_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	help
 	  Helpful /proc related utilities such as pstree, fuser, and killall
 
package/psmisc/psmisc.mk +1 -7
index e04923d..b82883f 100644
@@ -7,12 +7,6 @@ PSMISC_VERSION:=22.8
 PSMISC_SOURCE:=psmisc-$(PSMISC_VERSION).tar.gz
 PSMISC_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/psmisc
 PSMISC_AUTORECONF:=NO
-PSMISC_DEPENDENCIES:=ncurses
-
-ifeq ($(BR2_ENABLE_LOCALE),y)
-# psmisc gets confused and forgets to link with libintl
-PSMISC_MAKE_OPT:=LIBS=-lintl
-PSMISC_DEPENDENCIES+= gettext libintl
-endif
+PSMISC_DEPENDENCIES:=ncurses $(if $(BR2_NEEDS_GETTEXT),gettext libintl)
 
 $(eval $(call AUTOTARGETS,package,psmisc))
package/sshfs/Config.in +2 -2
index 12d98f6..7ddd0c1 100644
@@ -2,8 +2,8 @@ config BR2_PACKAGE_SSHFS
 	bool "sshfs (FUSE)"
 	select BR2_PACKAGE_LIBFUSE
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_GETTEXT
-	select BR2_PACKAGE_LIBINTL
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	depends on BR2_PACKAGE_OPENSSH
 	help
package/sshfs/sshfs.mk +1 -1
index 4acc293..d15aa00 100644
@@ -11,6 +11,6 @@ SSHFS_AUTORECONF:=NO
 SSHFS_INSTALL_STAGING:=NO
 SSHFS_INSTALL_TARGET:=YES
 
-SSHFS_DEPENDENCIES = libglib2 libfuse
+SSHFS_DEPENDENCIES = libglib2 libfuse $(if $(BR2_NEEDS_GETTEXT),gettext libintl)
 
 $(eval $(call AUTOTARGETS,package,sshfs))
package/util-linux/Config.in +2 -2
index e21daf6..533ef69 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_UTIL-LINUX
 	bool "util-linux"
-	select BR2_PACKAGE_GETTEXT if BR2_ENABLE_LOCALE
-	select BR2_PACKAGE_LIBINTL if BR2_ENABLE_LOCALE
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	depends on BR2_INET_RPC
 	help
 	  Various useful/essential Linux utilities.
package/util-linux/util-linux.mk +2 -2
index e2135e7..6446d37 100644
@@ -18,8 +18,8 @@ else
 UTIL-LINUX_SCHED_UTILS:=--disable-schedutils
 endif
 
-ifeq ($(BR2_PACKAGE_LIBINTL),y)
-UTIL-LINUX_DEPENDENCIES += libintl
+ifeq ($(BR2_NEEDS_GETTEXT),y)
+UTIL-LINUX_DEPENDENCIES += gettext libintl
 UTIL-LINUX_MAKE_OPT = LIBS=-lintl
 endif
 
Signature · 1 line
1.6.3.3
#6 lore raw

PATCH 2/8 Make all package using gettext rely on BR2_NEEDS_GETTEXT

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Hi,

Thomas> diff --git a/package/avahi/Config.in b/package/avahi/Config.in Thomas> index 35b7c27..3386005 100644
Thomas> --- a/package/avahi/Config.in
Thomas> +++ b/package/avahi/Config.in
Thomas> @@ -1,7 +1,7 @@
Thomas> config BR2_PACKAGE_AVAHI
Thomas> bool "avahi"
Thomas> - select BR2_PACKAGE_GETTEXT if BR2_ENABLE_LOCALE
Thomas> - select BR2_PACKAGE_LIBINTL if BR2_ENABLE_LOCALE
Thomas> + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
Thomas> + select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT

Hmm, I'm using avahi here with an internal toolchain without locale support, and wouldn't want to add gettext/libintl.

Signature · 1 line
Bye, Peter Korsgaard
#7 lore raw

PATCH 3/8 libcap: fix build failure

In reply to Thomas Petazzoni

On a x86-64 host, libcap tried to install things in $(STAGING_DIR)/lib64 and $(TARGET_DIR)/lib64. Therefore, pass lib= and prefix=, as required by the strange build system used by libcap.

---
 package/libcap/libcap.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
package/libcap/libcap.mk +2 -2
index 3ea5e51..301d1b1 100644
@@ -8,7 +8,7 @@ define LIBCAP_BUILD_CMDS
 endef
 
 define LIBCAP_INSTALL_STAGING_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(STAGING_DIR) install
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(STAGING_DIR) prefix=/usr lib=lib install
 endef
 
 define LIBCAP_INSTALL_TARGET_CMDS
@@ -20,7 +20,7 @@ define HOST_LIBCAP_BUILD_CMDS
 endef
 
 define HOST_LIBCAP_INSTALL_CMDS
- $(HOST_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(HOST_DIR) install
+ $(HOST_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(HOST_DIR) prefix=/usr lib=lib install
 endef
 
 $(eval $(call GENTARGETS,package,libcap))
Signature · 1 line
1.6.3.3
#8 lore raw

PATCH 3/8 libcap: fix build failure

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> On a x86-64 host, libcap tried to install things in Thomas> $(STAGING_DIR)/lib64 and $(TARGET_DIR)/lib64. Therefore, pass lib= and Thomas> prefix=, as required by the strange build system used by libcap.

Wouldn't that be /USR/lib64 -> /USR/lib ?

Signature · 1 line
Bye, Peter Korsgaard
#9 lore raw

PATCH 3/8 libcap: fix build failure

Quoted 5 lines · On Mon, 17 May 2010 09:49:45 +0200 Peter Korsgaard <[email protected]> wrote:

Thomas> On a x86-64 host, libcap tried to install things in Thomas> $(STAGING_DIR)/lib64 and $(TARGET_DIR)/lib64. Therefore, pass lib= and Thomas> prefix=, as required by the strange build system used by libcap.

Wouldn't that be /USR/lib64 -> /USR/lib ?

Not sure what you mean here. The problem was that the libcap build system was installing things in $(STAGING_DIR)/lib64 because it was thinking I was building for a 64 bits system (but only my host was 64 bits, not my target).

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#10 lore raw

PATCH 3/8 libcap: fix build failure

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> On a x86-64 host, libcap tried to install things in Thomas> $(STAGING_DIR)/lib64 and $(TARGET_DIR)/lib64. Therefore, pass lib= and Thomas> prefix=, as required by the strange build system used by libcap.

Quoted 2 lines
Quoted 2 lines

Wouldn't that be /USR/lib64 -> /USR/lib ?

Thomas> Not sure what you mean here. The problem was that the libcap Thomas> build system was installing things in $(STAGING_DIR)/lib64 Thomas> because it was thinking I was building for a 64 bits system Thomas> (but only my host was 64 bits, not my target).

Yes, but it should presumably install into /usr/lib rather than /lib(64) (that's atleast where it's installed on my Debian machine).

Signature · 1 line
Bye, Peter Korsgaard
#11 lore raw

PATCH 4/8 libcgicc: fix package after autotools infrastructure conversion

In reply to Thomas Petazzoni

The patch had an incorrect name, and the libtool patch was applied while it shouldn't, and the package wasn't autoreconfed while the patch changes some Makefile.am files.

---
 ...cgicc-3.2.9-disable-documentation-option.patch} |    0
 package/libcgicc/libcgicc.mk                       |    2 ++
 2 files changed, 2 insertions(+), 0 deletions(-)
 rename package/libcgicc/{cgicc-3.2.9-disable-documentation-option.patch => libcgicc-3.2.9-disable-documentation-option.patch} (100%)
package/libcgicc/libcgicc-3.2.9-disable-documentation-option.patch renamed from package/libcgicc/cgicc-3.2.9-disable-documentation-option.patch +0 -0
similarity index 100%
rename from package/libcgicc/cgicc-3.2.9-disable-documentation-option.patch
rename to package/libcgicc/libcgicc-3.2.9-disable-documentation-option.patch
package/libcgicc/libcgicc.mk +2 -0
index c2f80b6..b281eed 100644
@@ -7,6 +7,8 @@ LIBCGICC_VERSION=3.2.9
 LIBCGICC_SITE=$(BR2_GNU_MIRROR)/cgicc
 LIBCGICC_SOURCE=cgicc-$(LIBCGICC_VERSION).tar.gz
 LIBCGICC_INSTALL_STAGING=YES
+LIBCGICC_LIBTOOL_PATCH=NO
+LIBCGICC_AUTORECONF=YES
 
 LIBCGICC_CONF_OPT = \
 	--disable-demos \
Signature · 1 line
1.6.3.3
#12 lore raw

PATCH 5/8 ltrace: fix build failure

In reply to Thomas Petazzoni

ltrace failed to build because of missing arguments to gcc to find the header files. This is due to the fact that the existing ltrace.mk was setting CC and LD at build time to incorrect values. Keeping the values set at configure time is just the right thing to do.

---
 package/ltrace/ltrace.mk |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
package/ltrace/ltrace.mk +1 -2
index c99f223..4a6811d 100644
@@ -54,8 +54,7 @@ $(LTRACE_DIR)/.configured: $(LTRACE_DIR)/.patched
 	touch $@
 
 $(LTRACE_DIR)/$(LTRACE_BINARY): $(LTRACE_DIR)/.configured
-	$(MAKE) CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(LTRACE_ARCH) \
-		-C $(LTRACE_DIR)
+	$(MAKE) ARCH=$(LTRACE_ARCH) -C $(LTRACE_DIR)
 
 $(TARGET_DIR)/$(LTRACE_TARGET_BINARY): $(LTRACE_DIR)/$(LTRACE_BINARY)
 	#$(MAKE) DESTDIR=$(TARGET_DIR) ARCH=$(LTRACE_ARCH)  -C $(LTRACE_DIR) install
Signature · 1 line
1.6.3.3
#13 lore raw

PATCH 5/8 ltrace: fix build failure

Hi Thomas,

Quoted 15 lines · Thomas Petazzoni

ltrace failed to build because of missing arguments to gcc to find the header files. This is due to the fact that the existing ltrace.mk was setting CC and LD at build time to incorrect values. Keeping the values set at configure time is just the right thing to do.

---
 package/ltrace/ltrace.mk |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
package/ltrace/ltrace.mk +0 -0
index c99f223..4a6811d 100644

package/ltrace/ltrace.mk $(LTRACE_DIR)/.configured: $(LTRACE_DIR)/.patched · line 60

Quoted 9 lines
package/ltrace/ltrace.mk +1 -2
@@ -54,8 +54,7 @@ $(LTRACE_DIR)/.configured: $(LTRACE_DIR)/.patched
 	touch $@
 
 $(LTRACE_DIR)/$(LTRACE_BINARY): $(LTRACE_DIR)/.configured
-	$(MAKE) CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(LTRACE_ARCH) \
-		-C $(LTRACE_DIR)
+	$(MAKE) ARCH=$(LTRACE_ARCH) -C $(LTRACE_DIR)
 
 $(TARGET_DIR)/$(LTRACE_TARGET_BINARY): $(LTRACE_DIR)/$(LTRACE_BINARY)
 	#$(MAKE) DESTDIR=$(TARGET_DIR) ARCH=$(LTRACE_ARCH)  -C $(LTRACE_DIR) install

Is this why I also observed this problem with ltrace which I posted on 4/05/10 ? :

Quoted 10 lines

2. ltrace-0.5
the OS path for sysdeps gets set to :
OS := linux-uclibcgnueabi
whereas internal toolchain 2010.02 produces at start of Makefile :
OS = linux-gnu
This results in an unknown path to /sysdeps/
Has anyone come across this behaviour before ?
I can workaround for now by manually changing Makefile and then resuming build.

Quoted 3 lines

I can't find the common denominator - I think it has to do with CC being set --sysroot=...... whereas the internal toolchain produces
--isysroot=...... ?????

TIA

Signature · 2 lines
Best regards,
Kris
#14 lore raw

PATCH 5/8 ltrace: fix build failure

Quoted 2 lines · On Sat, 15 May 2010 21:19:27 +1000 Microbit_Ubuntu…

Is this why I also observed this problem with ltrace which I posted on 4/05/10 ? :

Not sure because you didn't provide enough informations, such as the full build log and the Buildroot configuration file to reproduce.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#15 lore raw

PATCH 6/8 gettext: make only available if BR2_NEEDS_GETTEXT is set

In reply to Thomas Petazzoni

This allows to make sure that an user, or a randpackageconfig, will not select the gettext or libintl package when using an external toolchain based on glibc/eglibc.

---
 package/gettext/Config.in |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
package/gettext/Config.in +2 -0
index bd5950c..c6792ac 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_GETTEXT
 	bool "gettext"
+	depends on BR2_NEEDS_GETTEXT
 	help
 	  The GNU `gettext' utilities are a set of tools that provide a
 	  framework to help other GNU packages produce multi-lingual
@@ -21,6 +22,7 @@ config BR2_PACKAGE_GETTEXT_STATIC
 
 config BR2_PACKAGE_LIBINTL
 	bool "libintl"
+	depends on BR2_NEEDS_GETTEXT
 	help
 	  Selecting this package installs all of gettext in the staging
 	  directory and the shared library for it's use in the target.
Signature · 1 line
1.6.3.3
#17 lore raw

PATCH 7/8 avahi: needs IPv6

In reply to Thomas Petazzoni

Otherwise the build fails with:

socket.c: In function 'avahi_mdns_mcast_join_ipv6':
socket.c:159: error: 'IPV6_DROP_MEMBERSHIP' undeclared (first use in this function) socket.c:159: error: (Each undeclared identifier is reported only once socket.c:159: error: for each function it appears in.)
socket.c:161: error: 'IPV6_ADD_MEMBERSHIP' undeclared (first use in this function)

---
 package/avahi/Config.in |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
package/avahi/Config.in +1 -0
index 3386005..9ac1e55 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_AVAHI
 	bool "avahi"
+	depends on BR2_INET_IPV6
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	help
Signature · 1 line
1.6.3.3
#18 lore raw

PATCH 7/8 avahi: needs IPv6

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> Otherwise the build fails with:
Thomas> socket.c: In function 'avahi_mdns_mcast_join_ipv6':
Thomas> socket.c:159: error: 'IPV6_DROP_MEMBERSHIP' undeclared (first use in this function) Thomas> socket.c:159: error: (Each undeclared identifier is reported only once Thomas> socket.c:159: error: for each function it appears in.)
Thomas> socket.c:161: error: 'IPV6_ADD_MEMBERSHIP' undeclared (first use in this function)

Strange, I'm using it here with an (internal) non-ipv6 / non-locale toolchain.

With what toolchain is this?

Signature · 1 line
Bye, Peter Korsgaard
#19 lore raw

PATCH 7/8 avahi: needs IPv6

In reply to Thomas Petazzoni
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

"Peter" == Peter Korsgaard <[email protected]> writes:

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> Otherwise the build fails with:
Thomas> socket.c: In function 'avahi_mdns_mcast_join_ipv6':
Thomas> socket.c:159: error: 'IPV6_DROP_MEMBERSHIP' undeclared (first use in this function) Thomas> socket.c:159: error: (Each undeclared identifier is reported only once Thomas> socket.c:159: error: for each function it appears in.)
Thomas> socket.c:161: error: 'IPV6_ADD_MEMBERSHIP' undeclared (first use in this function)

Peter> Strange, I'm using it here with a non-ipv6 / non-locale toolchain.

Looking closer I see that's with uclibc 0.9.30 - On 0.9.31 those defines are protected by __UCLIBC_HAS_IPV6__.

I'll add a patch #ifdef'ing those functions out if not available, which should give the same behaviour as with < 0.9.31.

Signature · 1 line
Bye, Peter Korsgaard
#20 lore raw

PATCH 8/8 external toolchain: check BR2_INSTALL_LIBSTDCPP

In reply to Thomas Petazzoni

Verify that the value of BR2_INSTALL_LIBSTDCPP set by the user in the Buildroot configuration really matches the external toolchain capabilities by checking that a C++ cross-compiler is available.

---
 toolchain/external-toolchain/ext-tool.mk |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
toolchain/external-toolchain/ext-tool.mk +12 -0
index 2c2562c..bb4809c 100644
@@ -232,6 +232,15 @@ check_arm_abi = \
 	fi ; \
 
 #
+# Check that the external toolchain supports C++
+#
+check_cplusplus = \
+	if ! test -x $(TARGET_CXX) ; then \
+		echo "BR2_INSTALL_LIBSTDCPP is selected but C++ support not available in external toolchain" ; \
+		exit 1 ; \
+	fi ; \
+
+#
 # Check that the cross-compiler given in the configuration exists
 #
 check_cross_compiler_exists = \
@@ -288,6 +297,9 @@ endif
 ifeq ($(BR2_arm),y)
 	$(Q)$(call check_arm_abi)
 endif
+ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
+	$(Q)$(call check_cplusplus)
+endif
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y)
 	$(Q)$(call check_uclibc,$(SYSROOT_DIR))
 else
Signature · 1 line
1.6.3.3