mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] host-autoconf: hardcoded path to m4
@ 2019-02-18 20:18 Jon Ringle
  2019-02-22  8:14 ` [ptxdist] [PATCH] host-autotools-autoconf: fix m4 path Michael Olbrich
  0 siblings, 1 reply; 5+ messages in thread
From: Jon Ringle @ 2019-02-18 20:18 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 1170 bytes --]

The host-autoconf.make package creates a *-dev.tar.gz package, but the
host-autoconf-2.69/bin/auto4mte script install found in it contains a
hardcoded path to m4 that results in a build failure for future builds that
use the host-autoconf-2.69-arm-*-dev.tar.gz package:
Line 90 of the autom4te in mine has:

my $m4 = $ENV{"M4"} ||
'/srv/bamboo-home/xml-data/build-dir/29261826/GPEC-EC6-JOB1/platform-ec1c/sysroot-host/bin/m4';


Resulting in a build failure of any package that calls autogen.sh in the
extract.post phase:

-------------------------------------
target: host-libfastjson.extract.post
-------------------------------------

pkg_patch_autogen: 'ptxdist-2019.01.0/patches/libfastjson-0.99.8/autogen.sh'

autom4te: need GNU m4 1.4 or later:
/srv/bamboo-home/xml-data/build-dir/29261826/GPEC-EC6-JOB1/platform-ec1c/sysroot-host/bin/m4
aclocal: error: echo failed with exit status: 1
/usr/local/lib/ptxdist-2019.01.0/rules/post/ptxd_make_world_extract.make:38:
recipe for target
'/srv/gpec-build/rootfs/platform-ec1c/state/host-libfastjson.extract.post'
failed
make: ***
[/srv/gpec-build/rootfs/platform-ec1c/state/host-libfastjson.extract.post]
Error 1


-Jon

[-- Attachment #1.2: Type: text/html, Size: 2287 bytes --]

[-- Attachment #2: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ptxdist] [PATCH] host-autotools-autoconf: fix m4 path
  2019-02-18 20:18 [ptxdist] host-autoconf: hardcoded path to m4 Jon Ringle
@ 2019-02-22  8:14 ` Michael Olbrich
  2019-02-22 12:59   ` Michael Olbrich
  2019-02-22 18:08   ` Jon Ringle
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Olbrich @ 2019-02-22  8:14 UTC (permalink / raw)
  To: ptxdist, Jon Ringle; +Cc: Michael Olbrich

Make sure the path for m4 is just /bin/m4 and then fix it correctly in
host-autotools-autoconf.install.post. Otherwise the absolute path to
sysroot-host is part of the dev package.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---

Hi,

Can you check, if you get a correct dev package for host-autotools-autoconf
with this?

Michael

 rules/host-autotools-autoconf.make | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/rules/host-autotools-autoconf.make b/rules/host-autotools-autoconf.make
index 9f9c4de94c4e..9c2f516ddc45 100644
--- a/rules/host-autotools-autoconf.make
+++ b/rules/host-autotools-autoconf.make
@@ -35,6 +35,11 @@ $(STATEDIR)/autogen-tools: $(STATEDIR)/host-autotools-autoconf.install.post
 # Prepare
 # ----------------------------------------------------------------------------
 
+# Note: the path for m4 will be fixed in .install.post
+HOST_AUTOTOOLS_AUTOCONF_CONF_ENV	:= \
+	$(HOST_ENV) \
+	ac_cv_path_M4=/bin/m4
+
 #
 # autoconf
 #
@@ -48,7 +53,7 @@ $(STATEDIR)/host-autotools-autoconf.install.post:
 	@$(call targetinfo)
 	@sed -i \
 		-e "s;'\(/share/autoconf\)';'$(PTXDIST_SYSROOT_HOST)\1';g" \
-		-e "s;'\(/bin/\(m4\)\?\(auto[^']*\)\)';'$(PTXDIST_SYSROOT_HOST)\1';g" \
+		-e "s;'\(/bin/\(m4\|auto[^']*\)\)';'$(PTXDIST_SYSROOT_HOST)\1';g" \
 		$(HOST_AUTOTOOLS_AUTOCONF_PKGDIR)/bin/* \
 		$(HOST_AUTOTOOLS_AUTOCONF_PKGDIR)/share/autoconf/autom4te.cfg
 	@$(call world/install.post, HOST_AUTOTOOLS_AUTOCONF)
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] [PATCH] host-autotools-autoconf: fix m4 path
  2019-02-22  8:14 ` [ptxdist] [PATCH] host-autotools-autoconf: fix m4 path Michael Olbrich
@ 2019-02-22 12:59   ` Michael Olbrich
  2019-02-22 13:19     ` Michael Olbrich
  2019-02-22 18:08   ` Jon Ringle
  1 sibling, 1 reply; 5+ messages in thread
From: Michael Olbrich @ 2019-02-22 12:59 UTC (permalink / raw)
  To: ptxdist

On Fri, Feb 22, 2019 at 09:14:03AM +0100, Michael Olbrich wrote:
> Make sure the path for m4 is just /bin/m4 and then fix it correctly in
> host-autotools-autoconf.install.post. Otherwise the absolute path to
> sysroot-host is part of the dev package.
> 
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> ---
> 
> Hi,
> 
> Can you check, if you get a correct dev package for host-autotools-autoconf
> with this?
> 
> Michael
> 
>  rules/host-autotools-autoconf.make | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/rules/host-autotools-autoconf.make b/rules/host-autotools-autoconf.make
> index 9f9c4de94c4e..9c2f516ddc45 100644
> --- a/rules/host-autotools-autoconf.make
> +++ b/rules/host-autotools-autoconf.make
> @@ -35,6 +35,11 @@ $(STATEDIR)/autogen-tools: $(STATEDIR)/host-autotools-autoconf.install.post
>  # Prepare
>  # ----------------------------------------------------------------------------
>  
> +# Note: the path for m4 will be fixed in .install.post
> +HOST_AUTOTOOLS_AUTOCONF_CONF_ENV	:= \
> +	$(HOST_ENV) \
> +	ac_cv_path_M4=/bin/m4

This does not work. There is an extra check so the path must be usable.
I need to come up with a different solution.

Michael

> +
>  #
>  # autoconf
>  #
> @@ -48,7 +53,7 @@ $(STATEDIR)/host-autotools-autoconf.install.post:
>  	@$(call targetinfo)
>  	@sed -i \
>  		-e "s;'\(/share/autoconf\)';'$(PTXDIST_SYSROOT_HOST)\1';g" \
> -		-e "s;'\(/bin/\(m4\)\?\(auto[^']*\)\)';'$(PTXDIST_SYSROOT_HOST)\1';g" \
> +		-e "s;'\(/bin/\(m4\|auto[^']*\)\)';'$(PTXDIST_SYSROOT_HOST)\1';g" \
>  		$(HOST_AUTOTOOLS_AUTOCONF_PKGDIR)/bin/* \
>  		$(HOST_AUTOTOOLS_AUTOCONF_PKGDIR)/share/autoconf/autom4te.cfg
>  	@$(call world/install.post, HOST_AUTOTOOLS_AUTOCONF)
> -- 
> 2.20.1
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ptxdist] [PATCH] host-autotools-autoconf: fix m4 path
  2019-02-22 12:59   ` Michael Olbrich
@ 2019-02-22 13:19     ` Michael Olbrich
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2019-02-22 13:19 UTC (permalink / raw)
  To: ptxdist, Jon Ringle; +Cc: Michael Olbrich

The path for m4 already is the full path in sysroot-host.
Replace it with the current sysroot-host in case we just extracted a dev
package.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---

Next try, please test this.

Michael

 rules/host-autotools-autoconf.make | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rules/host-autotools-autoconf.make b/rules/host-autotools-autoconf.make
index 9f9c4de94c4e..ab2bb28958e8 100644
--- a/rules/host-autotools-autoconf.make
+++ b/rules/host-autotools-autoconf.make
@@ -48,7 +48,8 @@ $(STATEDIR)/host-autotools-autoconf.install.post:
 	@$(call targetinfo)
 	@sed -i \
 		-e "s;'\(/share/autoconf\)';'$(PTXDIST_SYSROOT_HOST)\1';g" \
-		-e "s;'\(/bin/\(m4\)\?\(auto[^']*\)\)';'$(PTXDIST_SYSROOT_HOST)\1';g" \
+		-e "s;'\(/bin/auto[^']*\)';'$(PTXDIST_SYSROOT_HOST)\1';g" \
+		-e "s;'/[^']*/sysroot-host\(/bin/m4\)';'$(PTXDIST_SYSROOT_HOST)\1';g" \
 		$(HOST_AUTOTOOLS_AUTOCONF_PKGDIR)/bin/* \
 		$(HOST_AUTOTOOLS_AUTOCONF_PKGDIR)/share/autoconf/autom4te.cfg
 	@$(call world/install.post, HOST_AUTOTOOLS_AUTOCONF)
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] [PATCH] host-autotools-autoconf: fix m4 path
  2019-02-22  8:14 ` [ptxdist] [PATCH] host-autotools-autoconf: fix m4 path Michael Olbrich
  2019-02-22 12:59   ` Michael Olbrich
@ 2019-02-22 18:08   ` Jon Ringle
  1 sibling, 0 replies; 5+ messages in thread
From: Jon Ringle @ 2019-02-22 18:08 UTC (permalink / raw)
  To: Michael Olbrich; +Cc: ptxdist


On Fri, 22 Feb 2019, Michael Olbrich wrote:

> Make sure the path for m4 is just /bin/m4 and then fix it correctly in
> host-autotools-autoconf.install.post. Otherwise the absolute path to
> sysroot-host is part of the dev package.
>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> ---
>
> Hi,
>
> Can you check, if you get a correct dev package for host-autotools-autoconf
> with this?

The dev package still has the absolute path to sysroot-host m4 in it from 
the build that created the dev package, but this is getting fixed up 
correctly now when the dev package is being used.

Tested-by: Jon Ringle <jringle@gridpoint.com>


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-02-22 18:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-18 20:18 [ptxdist] host-autoconf: hardcoded path to m4 Jon Ringle
2019-02-22  8:14 ` [ptxdist] [PATCH] host-autotools-autoconf: fix m4 path Michael Olbrich
2019-02-22 12:59   ` Michael Olbrich
2019-02-22 13:19     ` Michael Olbrich
2019-02-22 18:08   ` Jon Ringle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox