Skip to contentSkip to conversation

package: drop fallout of aclocal innclude directory revamp (branch yem/autoconf-archive)

PATCH New Yann E. MORIN 6 participants 15 messages Feb 9, 2020 – Mar 15, 2020

lore
Share & tools
lore
#0 lore raw

cover package: drop fallout of aclocal innclude directory revamp (branch yem/autoconf-archive)

Hello All!

This small series provides a bit of cleanup after the aclocal include directory revamp, adressing one big problem for a single package that uses autoconf archive.

Regards,
Yann E. MORIN.

The following changes since commit 81a4940d2527ff4c5ad16848ee0154610937c641

package/libexif: add post-0.6.21 upstream security fixes (2020-02-09 12:33:05 +0100)

are available in the git repository at:

git://git.buildroot.org/~ymorin/git/buildroot.git

for you to fetch changes up to d829177dd62464e09391482db381f7eb5416b6ac

package/sdbusplus: drop broken autoreconf include directive (2020-02-09 16:10:19 +0100)

----------------------------------------------------------------
Yann E. MORIN (3):
package/libsigrok: drop remnants of autoreconf package/automake: also include autoconf-archive in search paths package/sdbusplus: drop broken autoreconf include directive

 package/automake/automake.mk   | 8 +++++++-
 package/libsigrok/libsigrok.mk | 2 --
 package/sdbusplus/sdbusplus.mk | 1 -
 3 files changed, 7 insertions(+), 4 deletions(-)
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH 1/3 package/libsigrok: drop remnants of autoreconf

libsigrok has not needed autoreconf since b428801934 (package/libsigrok:
bump version to 0.4.0), 4 years ago now.

As such, we no longer need the autoreconf options, nor the dependency on the autoconf archive.

Cc Bartosz Golaszewski <[email protected]>
Cc Bernd Kuhls <[email protected]>
---
 package/libsigrok/libsigrok.mk | 2 --
 1 file changed, 2 deletions(-)
package/libsigrok/libsigrok.mk +0 -2
index 7a128e8dfa..4c1f31ea6e 100644
@@ -53,9 +53,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_LIBSIGROKCXX),y)
 LIBSIGROK_CONF_OPTS += --enable-cxx
-LIBSIGROK_AUTORECONF_OPTS += -I $(HOST_DIR)/share/autoconf-archive
 LIBSIGROK_DEPENDENCIES += \
-	host-autoconf-archive \
 	glibmm \
 	host-doxygen \
 	$(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python)
Signature · 1 line
2.20.1
#2 lore raw

PATCH 1/3 package/libsigrok: drop remnants of autoreconf

Hi Yann,

Am So., 9. Feb. 2020 um 16:12 Uhr schrieb Yann E. MORIN <[email protected]>:

Quoted 10 lines

libsigrok has not needed autoreconf since b428801934 (package/libsigrok:
bump version to 0.4.0), 4 years ago now.

As such, we no longer need the autoreconf options, nor the dependency on the autoconf archive.

Cc Bartosz Golaszewski <[email protected]>
Cc Bernd Kuhls <[email protected]>
Quoted 25 lines
---
 package/libsigrok/libsigrok.mk | 2 --
 1 file changed, 2 deletions(-)
package/libsigrok/libsigrok.mk +0 -3
index 7a128e8dfa..4c1f31ea6e 100644
@@ -53,9 +53,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_LIBSIGROKCXX),y)
 LIBSIGROK_CONF_OPTS += --enable-cxx
-LIBSIGROK_AUTORECONF_OPTS += -I $(HOST_DIR)/share/autoconf-archive
 LIBSIGROK_DEPENDENCIES += \
-       host-autoconf-archive \
        glibmm \
        host-doxygen \
        $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python)
--

2.20.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#3 lore raw

PATCH 1/3 package/libsigrok: drop remnants of autoreconf

In reply to Yann E. MORIN
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

libsigrok has not needed autoreconf since b428801934 (package/libsigrok:
bump version to 0.4.0), 4 years ago now.

As such, we no longer need the autoreconf options, nor the dependency on the autoconf archive.

Cc Bartosz Golaszewski <[email protected]>
Cc Bernd Kuhls <[email protected]>

Committed, thanks.

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

PATCH 2/3 package/automake: also include autoconf-archive in search paths

In reply to Yann E. MORIN

Since d255b67972 (autotools: do not overwrite first include path), the ordering of include paths has changed: the system directories are specified with explicit options passed to autoreconf, which means that any directory specified in the package _AUTORECONF_OPTS are no longer first:

- in package/autoconf/autoconf.mk, we define AUTORECONF as:

    AUTOCONF = $(HOST_DIR)/bin/autoconf -I "$(ACLOCAL_DIR)" -I "$(ACLOCAL_HOST_DIR)"

- in package/pkg-autotools.mk, we call AUTORECONF with:

    $($(PKG)_AUTORECONF_ENV) $(AUTORECONF) $($(PKG)_AUTORECONF_OPTS)

For a package that needs autoconf-archive, this means that it has to provide a custom include directive, in its own _AUTORECONF_OPTS. This in turn means that this directory becomes the first, and goes directly opposite to what d255b67972 was supposed to accomplish.

However, the path to the autoconf archive macro directory is mnot searched by default either, so a package has no way to add such an aclocal include directive.

We can only add it in the global search directory, and we do so only for those packages that have autoconf-archive in their dependencies.

Cc Michael Walle <[email protected]>
Cc Heiko Thiery <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Peter Korsgaard <[email protected]>
---
 package/automake/automake.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
package/automake/automake.mk +7 -1
index 89dcaa1293..238116cb94 100644
@@ -33,5 +33,11 @@ $(eval $(host-autotools-package))
 AUTOMAKE = $(HOST_DIR)/bin/automake
 ACLOCAL_DIR = $(STAGING_DIR)/usr/share/aclocal
 ACLOCAL = $(HOST_DIR)/bin/aclocal
-ACLOCAL_PATH = $(ACLOCAL_DIR):$(ACLOCAL_HOST_DIR)
+ACLOCAL_PATH = $(subst $(space),:,$(strip \
+	$(ACLOCAL_DIR) \
+	$(ACLOCAL_HOST_DIR) \
+	$(if $(filter host-autoconf-archive,$($(PKG)_FINAL_ALL_DEPENDENCIES)),\
+		$(HOST_DIR)/share/autoconf-archive \
+	) \
+))
 export ACLOCAL_PATH
Signature · 1 line
2.20.1
#5 lore raw

PATCH 2/3 package/automake: also include autoconf-archive in search paths

All,

On 2020-02-09 16:12 +0100, Yann E. MORIN spake thusly:

Quoted 40 lines

Since d255b67972 (autotools: do not overwrite first include path), the ordering of include paths has changed: the system directories are specified with explicit options passed to autoreconf, which means that any directory specified in the package _AUTORECONF_OPTS are no longer first:

- in package/autoconf/autoconf.mk, we define AUTORECONF as:

    AUTOCONF = $(HOST_DIR)/bin/autoconf -I "$(ACLOCAL_DIR)" -I "$(ACLOCAL_HOST_DIR)"

- in package/pkg-autotools.mk, we call AUTORECONF with:

    $($(PKG)_AUTORECONF_ENV) $(AUTORECONF) $($(PKG)_AUTORECONF_OPTS)

For a package that needs autoconf-archive, this means that it has to provide a custom include directive, in its own _AUTORECONF_OPTS. This in turn means that this directory becomes the first, and goes directly opposite to what d255b67972 was supposed to accomplish.

However, the path to the autoconf archive macro directory is mnot searched by default either, so a package has no way to add such an aclocal include directive.

We can only add it in the global search directory, and we do so only for those packages that have autoconf-archive in their dependencies.

Cc Michael Walle <[email protected]>
Cc Heiko Thiery <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Peter Korsgaard <[email protected]>
---
 package/automake/automake.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
package/automake/automake.mk +0 -0
index 89dcaa1293..238116cb94 100644
@@ -33,5 +33,11 @@ $(eval $(host-autotools-package))
 AUTOMAKE = $(HOST_DIR)/bin/automake

package/automake/automake.mk $(eval $(host-autotools-package)) · line 42

Quoted 10 lines
package/automake/automake.mk +7 -1
 ACLOCAL_DIR = $(STAGING_DIR)/usr/share/aclocal
 ACLOCAL = $(HOST_DIR)/bin/aclocal
-ACLOCAL_PATH = $(ACLOCAL_DIR):$(ACLOCAL_HOST_DIR)
+ACLOCAL_PATH = $(subst $(space),:,$(strip \
+	$(ACLOCAL_DIR) \
+	$(ACLOCAL_HOST_DIR) \
+	$(if $(filter host-autoconf-archive,$($(PKG)_FINAL_ALL_DEPENDENCIES)),\
+		$(HOST_DIR)/share/autoconf-archive \
+	) \
+))

This makes check-package whine because it is not indented. Sigh... Indenting with a TAB fixes the check-package error, and is still a working fix.

Regards,
Yann E. MORIN.

Quoted 4 lines
package/automake/automake.mk +0 -0
 export ACLOCAL_PATH
Signature · 1 line
2.20.1
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw

PATCH 2/3 package/automake: also include autoconf-archive in search paths

Hi Yann,

Am 2020-02-09 16:24, schrieb Yann E. MORIN:

Quoted 54 lines

All,

On 2020-02-09 16:12 +0100, Yann E. MORIN spake thusly:

Quoted 51 lines

Since d255b67972 (autotools: do not overwrite first include path), the ordering of include paths has changed: the system directories are specified with explicit options passed to autoreconf, which means that any directory specified in the package _AUTORECONF_OPTS are no longer first:

- in package/autoconf/autoconf.mk, we define AUTORECONF as:

    AUTOCONF = $(HOST_DIR)/bin/autoconf -I "$(ACLOCAL_DIR)" -I 

"$(ACLOCAL_HOST_DIR)"

- in package/pkg-autotools.mk, we call AUTORECONF with:

    $($(PKG)_AUTORECONF_ENV) $(AUTORECONF) $($(PKG)_AUTORECONF_OPTS)

For a package that needs autoconf-archive, this means that it has to provide a custom include directive, in its own _AUTORECONF_OPTS. This in
turn means that this directory becomes the first, and goes directly opposite to what d255b67972 was supposed to accomplish.

However, the path to the autoconf archive macro directory is mnot searched by default either, so a package has no way to add such an aclocal include directive.

We can only add it in the global search directory, and we do so only for
those packages that have autoconf-archive in their dependencies.

Cc Michael Walle <[email protected]>
Cc Heiko Thiery <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Peter Korsgaard <[email protected]>
---
 package/automake/automake.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
package/automake/automake.mk +4 -1
index 89dcaa1293..238116cb94 100644
@@ -33,5 +33,11 @@ $(eval $(host-autotools-package))
 AUTOMAKE = $(HOST_DIR)/bin/automake
 ACLOCAL_DIR = $(STAGING_DIR)/usr/share/aclocal
 ACLOCAL = $(HOST_DIR)/bin/aclocal
-ACLOCAL_PATH = $(ACLOCAL_DIR):$(ACLOCAL_HOST_DIR)
+ACLOCAL_PATH = $(subst $(space),:,$(strip \
+	$(ACLOCAL_DIR) \
+	$(ACLOCAL_HOST_DIR) \
+	$(if $(filter 
Quoted 8 lines

package/automake/automake.mk $(eval $(host-autotools-package)) · line 42

Quoted 4 lines
package/automake/automake.mk +3 -0
 host-autoconf-archive,$($(PKG)_FINAL_ALL_DEPENDENCIES)),\
+		$(HOST_DIR)/share/autoconf-archive \
+	) \
+))

This makes check-package whine because it is not indented. Sigh... Indenting with a TAB fixes the check-package error, and is still a working fix.

This makes me wonder why these are installed into share/autoconf-archive instead of $(ACLOCAL_HOST_DIR) in the first place. Eg. on my debian system
all the macros of autoconf-archive are installed to /usr/share/aclocal.

-michael

#7 lore raw

PATCH 2/3 package/automake: also include autoconf-archive in search paths

Am 2020-02-10 14:06, schrieb Michael Walle:

Quoted 68 lines

Hi Yann,

Am 2020-02-09 16:24, schrieb Yann E. MORIN:

Quoted 56 lines

All,

On 2020-02-09 16:12 +0100, Yann E. MORIN spake thusly:

Quoted 53 lines

Since d255b67972 (autotools: do not overwrite first include path), the
ordering of include paths has changed: the system directories are specified with explicit options passed to autoreconf, which means that
any directory specified in the package _AUTORECONF_OPTS are no longer first:

- in package/autoconf/autoconf.mk, we define AUTORECONF as:

    AUTOCONF = $(HOST_DIR)/bin/autoconf -I "$(ACLOCAL_DIR)" -I 

"$(ACLOCAL_HOST_DIR)"

- in package/pkg-autotools.mk, we call AUTORECONF with:

    $($(PKG)_AUTORECONF_ENV) $(AUTORECONF) $($(PKG)_AUTORECONF_OPTS)

For a package that needs autoconf-archive, this means that it has to provide a custom include directive, in its own _AUTORECONF_OPTS. This in
turn means that this directory becomes the first, and goes directly opposite to what d255b67972 was supposed to accomplish.

However, the path to the autoconf archive macro directory is mnot searched by default either, so a package has no way to add such an aclocal include directive.

We can only add it in the global search directory, and we do so only for
those packages that have autoconf-archive in their dependencies.

Cc Michael Walle <[email protected]>
Cc Heiko Thiery <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Peter Korsgaard <[email protected]>
---
 package/automake/automake.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
package/automake/automake.mk +4 -1
index 89dcaa1293..238116cb94 100644
@@ -33,5 +33,11 @@ $(eval $(host-autotools-package))
 AUTOMAKE = $(HOST_DIR)/bin/automake
 ACLOCAL_DIR = $(STAGING_DIR)/usr/share/aclocal
 ACLOCAL = $(HOST_DIR)/bin/aclocal
-ACLOCAL_PATH = $(ACLOCAL_DIR):$(ACLOCAL_HOST_DIR)
+ACLOCAL_PATH = $(subst $(space),:,$(strip \
+	$(ACLOCAL_DIR) \
+	$(ACLOCAL_HOST_DIR) \
+	$(if $(filter 
Quoted 8 lines

package/automake/automake.mk $(eval $(host-autotools-package)) · line 42

Quoted 4 lines
package/automake/automake.mk +3 -0
 host-autoconf-archive,$($(PKG)_FINAL_ALL_DEPENDENCIES)),\
+		$(HOST_DIR)/share/autoconf-archive \
+	) \
+))

This makes check-package whine because it is not indented. Sigh... Indenting with a TAB fixes the check-package error, and is still a working fix.

Quoted 5 lines

This makes me wonder why these are installed into share/autoconf-archive
instead of $(ACLOCAL_HOST_DIR) in the first place. Eg. on my debian system
all the macros of autoconf-archive are installed to /usr/share/aclocal.

Ok, to answer this myself:

https://git.buildroot.net/buildroot/commit/?id=2c490f00c8d8a7d34ed6da9130cef8a5e97cef56

Still, maybe this has changed over time and there is no such bug anymore?

-michael

#8 lore raw

PATCH 2/3 package/automake: also include autoconf-archive in search paths

Quoted 67 lines · Michael Walle

Am 2020-02-10 14:06, schrieb Michael Walle:

Quoted 62 lines

Hi Yann,

Am 2020-02-09 16:24, schrieb Yann E. MORIN:

Quoted 50 lines

All,

On 2020-02-09 16:12 +0100, Yann E. MORIN spake thusly:

Quoted 47 lines

Since d255b67972 (autotools: do not overwrite first include path), the ordering of include paths has changed: the system directories are specified with explicit options passed to autoreconf, which means that any directory specified in the package _AUTORECONF_OPTS are no longer first:

? - in package/autoconf/autoconf.mk, we define AUTORECONF as:
??? AUTOCONF = $(HOST_DIR)/bin/autoconf -I "$(ACLOCAL_DIR)" -I "$(ACLOCAL_HOST_DIR)"

? - in package/pkg-autotools.mk, we call AUTORECONF with:
??? $($(PKG)_AUTORECONF_ENV) $(AUTORECONF) $($(PKG)_AUTORECONF_OPTS)

For a package that needs autoconf-archive, this means that it has to provide a custom include directive, in its own _AUTORECONF_OPTS. This in turn means that this directory becomes the first, and goes directly opposite to what d255b67972 was supposed to accomplish.

However, the path to the autoconf archive macro directory is mnot searched by default either, so a package has no way to add such an aclocal include directive.

We can only add it in the global search directory, and we do so only for those packages that have autoconf-archive in their dependencies.

Cc Michael Walle <[email protected]>
Cc Heiko Thiery <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Peter Korsgaard <[email protected]>

---
?package/automake/automake.mk | 8 +++++++-
?1 file changed, 7 insertions(+), 1 deletion(-)

package/automake/automake.mk +0 -0
index 89dcaa1293..238116cb94 100644
@@ -33,5 +33,11 @@ $(eval $(host-autotools-package))

?AUTOMAKE = $(HOST_DIR)/bin/automake
?ACLOCAL_DIR = $(STAGING_DIR)/usr/share/aclocal
?ACLOCAL = $(HOST_DIR)/bin/aclocal

package/automake/automake.mk +3 -1
-ACLOCAL_PATH = $(ACLOCAL_DIR):$(ACLOCAL_HOST_DIR)
+ACLOCAL_PATH = $(subst $(space),:,$(strip \
+??? $(ACLOCAL_DIR) \
+??? $(ACLOCAL_HOST_DIR) \
Quoted 8 lines
Quoted 4 lines

+??? $(if $(filter host-autoconf-archive,$($(PKG)_FINAL_ALL_DEPENDENCIES)),\
+??????? $(HOST_DIR)/share/autoconf-archive \
+??? ) \
+))

This makes check-package whine because it is not indented. Sigh... Indenting with a TAB fixes the check-package error, and is still a working fix.

Quoted 3 lines

This makes me wonder why these are installed into share/autoconf-archive instead of $(ACLOCAL_HOST_DIR) in the first place. Eg. on my debian system all the macros of autoconf-archive are installed to /usr/share/aclocal.

Quoted 6 lines

Ok, to answer this myself:
?
https://git.buildroot.net/buildroot/commit/?id=2c490f00c8d8a7d34ed6da9130cef8a5e97cef56

Still, maybe this has changed over time and there is no such bug anymore?

No, such issues in packages are unavoidable. autoconf-macros routinely breaks
"API", which is OK because it's assumed to be vendored into the package source code.

I believe Debian never uses it when a package is built, so they don't have that
problem.

Regards,
Arnout

#9 lore raw

PATCH 2/3 package/automake: also include autoconf-archive in search paths

Am 2020-02-10 14:14, schrieb Arnout Vandecappelle:

Quoted 88 lines · Michael Walle
Quoted 79 lines

Am 2020-02-10 14:06, schrieb Michael Walle:

Quoted 71 lines

Hi Yann,

Am 2020-02-09 16:24, schrieb Yann E. MORIN:

Quoted 59 lines

All,

On 2020-02-09 16:12 +0100, Yann E. MORIN spake thusly:

Quoted 56 lines

Since d255b67972 (autotools: do not overwrite first include path), the
ordering of include paths has changed: the system directories are specified with explicit options passed to autoreconf, which means that
any directory specified in the package _AUTORECONF_OPTS are no longer
first:

? - in package/autoconf/autoconf.mk, we define AUTORECONF as:
??? AUTOCONF = $(HOST_DIR)/bin/autoconf -I "$(ACLOCAL_DIR)" -I "$(ACLOCAL_HOST_DIR)"

? - in package/pkg-autotools.mk, we call AUTORECONF with:
??? $($(PKG)_AUTORECONF_ENV) $(AUTORECONF) $($(PKG)_AUTORECONF_OPTS)

For a package that needs autoconf-archive, this means that it has to
provide a custom include directive, in its own _AUTORECONF_OPTS. This in
turn means that this directory becomes the first, and goes directly opposite to what d255b67972 was supposed to accomplish.

However, the path to the autoconf archive macro directory is mnot searched by default either, so a package has no way to add such an aclocal include directive.

We can only add it in the global search directory, and we do so only for
those packages that have autoconf-archive in their dependencies.

Cc Michael Walle <[email protected]>
Cc Heiko Thiery <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Peter Korsgaard <[email protected]>

---
?package/automake/automake.mk | 8 +++++++-
?1 file changed, 7 insertions(+), 1 deletion(-)

package/automake/automake.mk +0 -0
index 89dcaa1293..238116cb94 100644
@@ -33,5 +33,11 @@ $(eval $(host-autotools-package))

?AUTOMAKE = $(HOST_DIR)/bin/automake
?ACLOCAL_DIR = $(STAGING_DIR)/usr/share/aclocal
?ACLOCAL = $(HOST_DIR)/bin/aclocal

package/automake/automake.mk +4 -1
-ACLOCAL_PATH = $(ACLOCAL_DIR):$(ACLOCAL_HOST_DIR)
+ACLOCAL_PATH = $(subst $(space),:,$(strip \
+??? $(ACLOCAL_DIR) \
+??? $(ACLOCAL_HOST_DIR) \
+??? $(if $(filter 
Quoted 8 lines
Quoted 4 lines

host-autoconf-archive,$($(PKG)_FINAL_ALL_DEPENDENCIES)),\
+??????? $(HOST_DIR)/share/autoconf-archive \
+??? ) \
+))

This makes check-package whine because it is not indented. Sigh... Indenting with a TAB fixes the check-package error, and is still a working fix.

Quoted 6 lines

This makes me wonder why these are installed into share/autoconf-archive
instead of $(ACLOCAL_HOST_DIR) in the first place. Eg. on my debian system
all the macros of autoconf-archive are installed to /usr/share/aclocal.

Quoted 7 lines

Ok, to answer this myself:
?
https://git.buildroot.net/buildroot/commit/?id=2c490f00c8d8a7d34ed6da9130cef8a5e97cef56

Still, maybe this has changed over time and there is no such bug anymore?

Quoted 8 lines

No, such issues in packages are unavoidable. autoconf-macros routinely
breaks
"API", which is OK because it's assumed to be vendored into the package source code.

I believe Debian never uses it when a package is built, so they don't
have that
problem.

I see, so actually the package should be fixed, correct? OTOH, it might also be
useful to support the building of bare packages (eg ones without the autoconf
macros inside the package). Wouldn't it then make more sense to have some kind of
variable which additional macros a package needs? and according to that variable,
the ACLOCAL_PATH is extended? I guess autoconf-archive isn't the only package which
can provide additional macros.

-michael

#10 lore raw

PATCH 2/3 package/automake: also include autoconf-archive in search paths

In reply to Yann E. MORIN

Hi Yann,

Am So., 9. Feb. 2020 um 16:12 Uhr schrieb Yann E. MORIN <[email protected]>:

Quoted 25 lines

Since d255b67972 (autotools: do not overwrite first include path), the ordering of include paths has changed: the system directories are specified with explicit options passed to autoreconf, which means that any directory specified in the package _AUTORECONF_OPTS are no longer first:

- in package/autoconf/autoconf.mk, we define AUTORECONF as:

    AUTOCONF = $(HOST_DIR)/bin/autoconf -I "$(ACLOCAL_DIR)" -I "$(ACLOCAL_HOST_DIR)"

- in package/pkg-autotools.mk, we call AUTORECONF with:

    $($(PKG)_AUTORECONF_ENV) $(AUTORECONF) $($(PKG)_AUTORECONF_OPTS)

For a package that needs autoconf-archive, this means that it has to provide a custom include directive, in its own _AUTORECONF_OPTS. This in turn means that this directory becomes the first, and goes directly opposite to what d255b67972 was supposed to accomplish.

However, the path to the autoconf archive macro directory is mnot searched by default either, so a package has no way to add such an aclocal include directive.

We can only add it in the global search directory, and we do so only for those packages that have autoconf-archive in their dependencies.

Quoted 6 lines
Cc Michael Walle <[email protected]>
Cc Heiko Thiery <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Peter Korsgaard <[email protected]>
Quoted 24 lines
---
 package/automake/automake.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
package/automake/automake.mk +7 -2
index 89dcaa1293..238116cb94 100644
@@ -33,5 +33,11 @@ $(eval $(host-autotools-package))
 AUTOMAKE = $(HOST_DIR)/bin/automake
 ACLOCAL_DIR = $(STAGING_DIR)/usr/share/aclocal
 ACLOCAL = $(HOST_DIR)/bin/aclocal
-ACLOCAL_PATH = $(ACLOCAL_DIR):$(ACLOCAL_HOST_DIR)
+ACLOCAL_PATH = $(subst $(space),:,$(strip \
+       $(ACLOCAL_DIR) \
+       $(ACLOCAL_HOST_DIR) \
+       $(if $(filter host-autoconf-archive,$($(PKG)_FINAL_ALL_DEPENDENCIES)),\
+               $(HOST_DIR)/share/autoconf-archive \
+       ) \
+))
 export ACLOCAL_PATH
--

2.20.1

#11 lore raw

PATCH 2/3 package/automake: also include autoconf-archive in search paths

In reply to Yann E. MORIN
Quoted 6 lines · On Sun, 9 Feb 2020 16:12:41 +0100 "Yann E. MORIN" <[email protected]>…
package/automake/automake.mk +0 -0
index 89dcaa1293..238116cb94 100644
@@ -33,5 +33,11 @@ $(eval $(host-autotools-package))
 AUTOMAKE = $(HOST_DIR)/bin/automake

package/automake/automake.mk $(eval $(host-autotools-package)) · line 42

Quoted 10 lines
package/automake/automake.mk +7 -1
 ACLOCAL_DIR = $(STAGING_DIR)/usr/share/aclocal
 ACLOCAL = $(HOST_DIR)/bin/aclocal
-ACLOCAL_PATH = $(ACLOCAL_DIR):$(ACLOCAL_HOST_DIR)
+ACLOCAL_PATH = $(subst $(space),:,$(strip \
+	$(ACLOCAL_DIR) \
+	$(ACLOCAL_HOST_DIR) \
+	$(if $(filter host-autoconf-archive,$($(PKG)_FINAL_ALL_DEPENDENCIES)),\
+		$(HOST_DIR)/share/autoconf-archive \
+	) \
+))

Meh :-/ Can we add something more explicit than that in the infrastructure? Poking around in the package dependencies like this to second guess which path should be added to ACLOCAL_PATH is not really great :-/

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#12 lore raw

PATCH 2/3 package/automake: also include autoconf-archive in search paths

Quoted 16 lines · On Mon, 10 Feb 2020 14:27:21 +0100 Thomas Petazzoni…
Quoted 13 lines · On Sun, 9 Feb 2020 16:12:41 +0100 "Yann E. MORIN" <[email protected]>…
package/automake/automake.mk +4 -1
index 89dcaa1293..238116cb94 100644
@@ -33,5 +33,11 @@ $(eval $(host-autotools-package))
 AUTOMAKE = $(HOST_DIR)/bin/automake
 ACLOCAL_DIR = $(STAGING_DIR)/usr/share/aclocal
 ACLOCAL = $(HOST_DIR)/bin/aclocal
-ACLOCAL_PATH = $(ACLOCAL_DIR):$(ACLOCAL_HOST_DIR)
+ACLOCAL_PATH = $(subst $(space),:,$(strip \
+	$(ACLOCAL_DIR) \
+	$(ACLOCAL_HOST_DIR) \
+	$(if $(filter host-autoconf-archive,$($(PKG)_FINAL_ALL_DEPENDENCIES)),\
Quoted 8 lines

package/automake/automake.mk $(eval $(host-autotools-package)) · line 42

Quoted 3 lines
package/automake/automake.mk +3 -0
+		$(HOST_DIR)/share/autoconf-archive \
+	) \
+))  

Meh :-/ Can we add something more explicit than that in the infrastructure? Poking around in the package dependencies like this to second guess which path should be added to ACLOCAL_PATH is not really great :-/

So I've marked PATCH 2/3 and 3/3 as Rejected. We fixed the sdbusplus issue by re-adding the hook creating the m4 directory. I understand the idea of having more "automatic", but this approach of looking at the dependencies of the package felt really odd.

We can always revisit this of course.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#13 lore raw

PATCH 3/3 package/sdbusplus: drop broken autoreconf include directive

In reply to Yann E. MORIN

Since d255b67972 (autotools: do not overwrite first include path), specifying an include directive as autoreconf options will break the build, as this would change the ordering of include directories (the first one is treated specially by aclocal).

Now that the infra takes care of adding the autoconf archive macro directory to the glocal search path, we can remove the offending include directive from sdbusplus autoreconf options (dropping the whole variable now that it is unused).

Cc Michael Walle <[email protected]>
Cc Heiko Thiery <[email protected]>
Cc John Faith <[email protected]>
---
 package/sdbusplus/sdbusplus.mk | 1 -
 1 file changed, 1 deletion(-)
package/sdbusplus/sdbusplus.mk +0 -1
index 9d3d1e8cf4..2bb7a30cfd 100644
@@ -17,7 +17,6 @@ HOST_SDBUSPLUS_DEPENDENCIES = \
 SDBUSPLUS_CONF_OPTS = --disable-sdbuspp
 HOST_SDBUSPLUS_CONF_OPTS = --disable-libsdbusplus
 SDBUSPLUS_AUTORECONF = YES
-SDBUSPLUS_AUTORECONF_OPTS = --include=$(HOST_DIR)/share/autoconf-archive
 SDBUSPLUS_INSTALL_STAGING = YES
 SDBUSPLUS_LICENSE = Apache-2.0
 SDBUSPLUS_LICENSE_FILES = LICENSE
Signature · 1 line
2.20.1
#14 lore raw

PATCH 3/3 package/sdbusplus: drop broken autoreconf include directive

Hi Yann,

Am So., 9. Feb. 2020 um 16:12 Uhr schrieb Yann E. MORIN <[email protected]>:

Quoted 11 lines

Since d255b67972 (autotools: do not overwrite first include path), specifying an include directive as autoreconf options will break the build, as this would change the ordering of include directories (the first one is treated specially by aclocal).

Now that the infra takes care of adding the autoconf archive macro directory to the glocal search path, we can remove the offending include directive from sdbusplus autoreconf options (dropping the whole variable now that it is unused).

Quoted 4 lines
Cc Michael Walle <[email protected]>
Cc Heiko Thiery <[email protected]>
Cc John Faith <[email protected]>
Quoted 19 lines
---
 package/sdbusplus/sdbusplus.mk | 1 -
 1 file changed, 1 deletion(-)
package/sdbusplus/sdbusplus.mk +0 -2
index 9d3d1e8cf4..2bb7a30cfd 100644
@@ -17,7 +17,6 @@ HOST_SDBUSPLUS_DEPENDENCIES = \
 SDBUSPLUS_CONF_OPTS = --disable-sdbuspp
 HOST_SDBUSPLUS_CONF_OPTS = --disable-libsdbusplus
 SDBUSPLUS_AUTORECONF = YES
-SDBUSPLUS_AUTORECONF_OPTS = --include=$(HOST_DIR)/share/autoconf-archive
 SDBUSPLUS_INSTALL_STAGING = YES
 SDBUSPLUS_LICENSE = Apache-2.0
 SDBUSPLUS_LICENSE_FILES = LICENSE
--

2.20.1