Skip to contentSkip to conversation

host-autoconf-archive: install to a non-standard location

PATCH New Thomas Petazzoni 3 participants 6 messages May 14, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 host-autoconf-archive: install to a non-standard location

The host-autoconf-archive package was added to provide the necessary autoconf macros for the libsigrok package, and later also used for the thrift package.

However, it installs its autoconf macro in $(HOST_DIR)/usr/share/aclocal, which is part of the include directory of autoconf macros used for all autoreconf invocations. Unfortunately, using those macros for all packages is causing a number of
regressions: one on host-ola fixed in commit 884af65fd5ddc548f19a26162f905a32ef0b53b3, and one in snmpp. Those packages are autoreconf'ed, but if they are autoreconf'ed with the autoconf-archive macros installed, they no longer work.

To solve this problem, this commit implements a simple solution that makes using host-autoconf-archive macros an opt-in mechanism. To achieve this, the autoconf-archive package is modified to install its macros in a special directory, and only the packages that really want to use those macros will have to pass a -I flag pointing to this directory in their <pkg>_AUTORECONF_OPTS variable.

Fixes:

http://autobuild.buildroot.org/results/712/712c8083b9eeafa41b60790961028c40b28f59ad/

---
 package/autoconf-archive/autoconf-archive.mk | 1 +
 package/libsigrok/libsigrok.mk               | 1 +
 package/thrift/thrift.mk                     | 1 +
 3 files changed, 3 insertions(+)
package/autoconf-archive/autoconf-archive.mk +1 -0
index bd3b0c8..673a57f 100644
@@ -9,5 +9,6 @@ AUTOCONF_ARCHIVE_SOURCE = autoconf-archive-$(AUTOCONF_ARCHIVE_VERSION).tar.xz
 AUTOCONF_ARCHIVE_SITE = $(BR2_GNU_MIRROR)/autoconf-archive
 AUTOCONF_ARCHIVE_LICENSE = GPLv3+ with exception
 AUTOCONF_ARCHIVE_LICENSE_FILES = COPYING COPYING.EXCEPTION
+HOST_AUTOCONF_ARCHIVE_INSTALL_OPTS = aclocaldir=$(HOST_DIR)/usr/share/autoconf-archive install
 
 $(eval $(host-autotools-package))
package/libsigrok/libsigrok.mk +1 -0
index 7394f64..21d8259 100644
@@ -48,6 +48,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_LIBSIGROKCXX),y)
 LIBSIGROK_CONF_OPTS += --enable-cxx
+LIBSIGROK_AUTORECONF_OPTS += -I $(HOST_DIR)/usr/share/autoconf-archive
 LIBSIGROK_DEPENDENCIES += \
 	host-autoconf-archive \
 	glibmm \
package/thrift/thrift.mk +1 -0
index b4b3a2c..a40ddad 100644
@@ -21,6 +21,7 @@ HOST_THRIFT_CONF_OPTS = --with-sysroot=$(HOST_DIR) \
 	--disable-tests \
 	--disable-tutorial
 THRIFT_AUTORECONF = YES
+THRIFT_AUTORECONF_OPTS = -I $(HOST_DIR)/usr/share/autoconf-archive
 THRIFT_LICENSE = Apache-2.0
 THRIFT_LICENSE_FILES = LICENSE
 
Signature · 1 line
2.1.0
#1 lore raw

PATCH 2/2 Revert "package/ola: fix autoreconf issue for host-ola"

This reverts commit 884af65fd5ddc548f19a26162f905a32ef0b53b3. Thanks to the change of the installation path of host-autoconf-archive macros, host-ola will no longer see them when doing its autoreconf, so the patch that was added by the commit being reverted here is no longer needed.

---
 ...on-t-overwrite-CC-and-CXX-with-ACX_PTHREA.patch | 51 ----------------------
 1 file changed, 51 deletions(-)
 delete mode 100644 package/ola/0002-autotools-don-t-overwrite-CC-and-CXX-with-ACX_PTHREA.patch
package/ola/0002-autotools-don-t-overwrite-CC-and-CXX-with-ACX_PTHREA.patch deleted +0 -51
deleted file mode 100644
index 80d21bc..0000000
@@ -1,51 +0,0 @@
-From 991eef9f84a5ef58eaab8ea0a85f3b4bce7b00a3 Mon Sep 17 00:00:00 2001
-From: Romain Naour <[email protected]>
-Date: Sat, 2 May 2015 01:50:14 +0200
-Subject: [PATCH] autotools: don't overwrite CC and CXX with ACX_PTHREAD
- success
-
-If ACX_PTHREAD sucess, CC and CXX value are overwriten respectively
-to PTHREAD_CC and PTHREAD_CXX. But ACX_PTHREAD has been hacked to
-set PTHREAD_CXX variable for the C++ compiler and configure.ac has
-been modified accordingly.
-
-If ax_pthread.m4 wich provide standard AX_PTHREAD macro (and it's
-alias ACX_PTHREAD and AX_PTHREAD), is installed on the system by
-autoconf-archive package, then ax_pthread.m4 is used during
-autoreconf instread of acx_pthread.m4 bundled with ola.
-
-AX_PTHREAD macro from ax_pthread.m4 check only the thread support
-with the C compiler. As a result, the C++ compiler variable
-PTHREAD_CXX is not initialized, so CXX become empy and the build
-fail during resolv.h check.
-
-configure:19945: checking for 2-arg pthread_setname_np
-configure:19965:  -o conftest -O2 [snip -I and -L] conftest.cpp  -ldl  >&5
-./configure: line 2037: -o: command not found
-
-In the Buildroot use case, it's safe to remove CC and CXX overwrite
-since only gcc/g++ compiler are used.
-
-Signed-off-by: Romain Naour <[email protected]>
----
- configure.ac | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index b1946b6..ef85af5 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -303,9 +303,7 @@ AM_CONDITIONAL([HAVE_NCURSES], [test "x$have_ncurses" = xyes])
- ACX_PTHREAD([
-              LIBS="$PTHREAD_LIBS $LIBS"
-              CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
--             CXXFLAGS="$CXXFLAGS $PTHREAD_CXXFLAGS"
--             CC="$PTHREAD_CC"
--             CXX="$PTHREAD_CXX"],
-+             CXXFLAGS="$CXXFLAGS $PTHREAD_CXXFLAGS"],
-             [AC_MSG_ERROR([Missing pthread, please install it])])
- 
- # pthread_setname_np can take either 1 or 2 arguments.
--- 
-1.9.3
-
Signature · 1 line
2.1.0
#2 lore raw

PATCH 2/2 Revert "package/ola: fix autoreconf issue for host-ola"

Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

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

This reverts commit 884af65fd5ddc548f19a26162f905a32ef0b53b3. Thanks to the change of the installation path of host-autoconf-archive macros, host-ola will no longer see them when doing its autoreconf, so the patch that was added by the commit being reverted here is no longer needed.

Committed, thanks.

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

PATCH 2/2 Revert "package/ola: fix autoreconf issue for host-ola"

In reply to Thomas Petazzoni

Hi Thomas, all

Le 14/05/2015 22:57, Thomas Petazzoni a ?crit :

Quoted 7 lines

This reverts commit 884af65fd5ddc548f19a26162f905a32ef0b53b3. Thanks to the change of the installation path of host-autoconf-archive macros, host-ola will no longer see them when doing its autoreconf, so the patch that was added by the commit being reverted here is no longer needed.

Best regards,
Romain

Quoted 63 lines
---
 ...on-t-overwrite-CC-and-CXX-with-ACX_PTHREA.patch | 51 ----------------------
 1 file changed, 51 deletions(-)
 delete mode 100644 package/ola/0002-autotools-don-t-overwrite-CC-and-CXX-with-ACX_PTHREA.patch
package/ola/0002-autotools-don-t-overwrite-CC-and-CXX-with-ACX_PTHREA.patch deleted +0 -51
deleted file mode 100644
index 80d21bc..0000000
@@ -1,51 +0,0 @@
-From 991eef9f84a5ef58eaab8ea0a85f3b4bce7b00a3 Mon Sep 17 00:00:00 2001
-From: Romain Naour <[email protected]>
-Date: Sat, 2 May 2015 01:50:14 +0200
-Subject: [PATCH] autotools: don't overwrite CC and CXX with ACX_PTHREAD
- success
-
-If ACX_PTHREAD sucess, CC and CXX value are overwriten respectively
-to PTHREAD_CC and PTHREAD_CXX. But ACX_PTHREAD has been hacked to
-set PTHREAD_CXX variable for the C++ compiler and configure.ac has
-been modified accordingly.
-
-If ax_pthread.m4 wich provide standard AX_PTHREAD macro (and it's
-alias ACX_PTHREAD and AX_PTHREAD), is installed on the system by
-autoconf-archive package, then ax_pthread.m4 is used during
-autoreconf instread of acx_pthread.m4 bundled with ola.
-
-AX_PTHREAD macro from ax_pthread.m4 check only the thread support
-with the C compiler. As a result, the C++ compiler variable
-PTHREAD_CXX is not initialized, so CXX become empy and the build
-fail during resolv.h check.
-
-configure:19945: checking for 2-arg pthread_setname_np
-configure:19965:  -o conftest -O2 [snip -I and -L] conftest.cpp  -ldl  >&5
-./configure: line 2037: -o: command not found
-
-In the Buildroot use case, it's safe to remove CC and CXX overwrite
-since only gcc/g++ compiler are used.
-
-Signed-off-by: Romain Naour <[email protected]>
----
- configure.ac | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index b1946b6..ef85af5 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -303,9 +303,7 @@ AM_CONDITIONAL([HAVE_NCURSES], [test "x$have_ncurses" = xyes])
- ACX_PTHREAD([
-              LIBS="$PTHREAD_LIBS $LIBS"
-              CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
--             CXXFLAGS="$CXXFLAGS $PTHREAD_CXXFLAGS"
--             CC="$PTHREAD_CC"
--             CXX="$PTHREAD_CXX"],
-+             CXXFLAGS="$CXXFLAGS $PTHREAD_CXXFLAGS"],
-             [AC_MSG_ERROR([Missing pthread, please install it])])
- 
- # pthread_setname_np can take either 1 or 2 arguments.
--- 
-1.9.3
-
#4 lore raw

PATCH 1/2 host-autoconf-archive: install to a non-standard location

In reply to Thomas Petazzoni

Hi Thomas, All,

Le 14/05/2015 22:57, Thomas Petazzoni a ?crit :

Quoted 20 lines

The host-autoconf-archive package was added to provide the necessary autoconf macros for the libsigrok package, and later also used for the thrift package.

However, it installs its autoconf macro in $(HOST_DIR)/usr/share/aclocal, which is part of the include directory of autoconf macros used for all autoreconf invocations. Unfortunately, using those macros for all packages is causing a number of
regressions: one on host-ola fixed in commit 884af65fd5ddc548f19a26162f905a32ef0b53b3, and one in snmpp. Those packages are autoreconf'ed, but if they are autoreconf'ed with the autoconf-archive macros installed, they no longer work.

To solve this problem, this commit implements a simple solution that makes using host-autoconf-archive macros an opt-in mechanism. To achieve this, the autoconf-archive package is modified to install its macros in a special directory, and only the packages that really want to use those macros will have to pass a -I flag pointing to this directory in their <pkg>_AUTORECONF_OPTS variable.

Quoted 5 lines

Fixes:

http://autobuild.buildroot.org/results/712/712c8083b9eeafa41b60790961028c40b28f59ad/

[thrift]
Build tested with a thrift config
http://autobuild.buildroot.net/results/21e/21e3fff1e0d714f94ac7e621289d1a59bc02a05f/config
(the toolchain doesn't have C++11 support)

[snmppp]
Build tested with the snmppp config.

Best regards,
Romain

Quoted 42 lines
---
 package/autoconf-archive/autoconf-archive.mk | 1 +
 package/libsigrok/libsigrok.mk               | 1 +
 package/thrift/thrift.mk                     | 1 +
 3 files changed, 3 insertions(+)
package/autoconf-archive/autoconf-archive.mk +1 -0
index bd3b0c8..673a57f 100644
@@ -9,5 +9,6 @@ AUTOCONF_ARCHIVE_SOURCE = autoconf-archive-$(AUTOCONF_ARCHIVE_VERSION).tar.xz
 AUTOCONF_ARCHIVE_SITE = $(BR2_GNU_MIRROR)/autoconf-archive
 AUTOCONF_ARCHIVE_LICENSE = GPLv3+ with exception
 AUTOCONF_ARCHIVE_LICENSE_FILES = COPYING COPYING.EXCEPTION
+HOST_AUTOCONF_ARCHIVE_INSTALL_OPTS = aclocaldir=$(HOST_DIR)/usr/share/autoconf-archive install
 
 $(eval $(host-autotools-package))
package/libsigrok/libsigrok.mk +1 -0
index 7394f64..21d8259 100644
@@ -48,6 +48,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_LIBSIGROKCXX),y)
 LIBSIGROK_CONF_OPTS += --enable-cxx
+LIBSIGROK_AUTORECONF_OPTS += -I $(HOST_DIR)/usr/share/autoconf-archive
 LIBSIGROK_DEPENDENCIES += \
 	host-autoconf-archive \
 	glibmm \
package/thrift/thrift.mk +1 -0
index b4b3a2c..a40ddad 100644
@@ -21,6 +21,7 @@ HOST_THRIFT_CONF_OPTS = --with-sysroot=$(HOST_DIR) \
 	--disable-tests \
 	--disable-tutorial
 THRIFT_AUTORECONF = YES
+THRIFT_AUTORECONF_OPTS = -I $(HOST_DIR)/usr/share/autoconf-archive
 THRIFT_LICENSE = Apache-2.0
 THRIFT_LICENSE_FILES = LICENSE
 
#5 lore raw

PATCH 1/2 host-autoconf-archive: install to a non-standard location

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

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

The host-autoconf-archive package was added to provide the necessary autoconf macros for the libsigrok package, and later also used for the thrift package.

However, it installs its autoconf macro in $(HOST_DIR)/usr/share/aclocal, which is part of the include directory of autoconf macros used for all autoreconf invocations. Unfortunately, using those macros for all packages is causing a number of
regressions: one on host-ola fixed in commit 884af65fd5ddc548f19a26162f905a32ef0b53b3, and one in snmpp. Those packages are autoreconf'ed, but if they are autoreconf'ed with the autoconf-archive macros installed, they no longer work.

To solve this problem, this commit implements a simple solution that makes using host-autoconf-archive macros an opt-in mechanism. To achieve this, the autoconf-archive package is modified to install its macros in a special directory, and only the packages that really want to use those macros will have to pass a -I flag pointing to this directory in their <pkg>_AUTORECONF_OPTS variable.

Quoted 5 lines

Fixes:

http://autobuild.buildroot.org/results/712/712c8083b9eeafa41b60790961028c40b28f59ad/

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard