Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] intltool: fix build
@ 2014-10-17 18:48 Francois Perrad
  2014-10-19 10:40 ` Bernd Kuhls
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Francois Perrad @ 2014-10-17 18:48 UTC (permalink / raw)
  To: buildroot

fix various build failures caused by host-perl serie

Currently, the variables PERL & PERL2LIB are available
only during the configure step of host-intltool.
There are also needed when running host-intltool,
in all package which depends on host-intltool.

So, there are now global, but in the perl infrastructure,
we cannot use them.

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/Makefile.in          | 9 +++++++--
 package/intltool/intltool.mk | 3 ---
 package/pkg-perl.mk          | 2 +-
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/package/Makefile.in b/package/Makefile.in
index ab59b54..b5d407c 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -232,6 +232,9 @@ HOST_LDFLAGS  += -L$(HOST_DIR)/lib -L$(HOST_DIR)/usr/lib -Wl,-rpath,$(HOST_DIR)/
 HOSTCC_VERSION := $(shell $(HOSTCC_NOCCACHE) --version | \
 	sed -n 's/^.* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)[ ]*.*$$/\1\2\3/p')
 
+export PERL=$(shell which perl)
+export PERL5LIB=$(HOST_DIR)/usr/lib/perl
+
 TARGET_CONFIGURE_OPTS = PATH=$(BR_PATH) \
 		AR="$(TARGET_AR)" \
 		AS="$(TARGET_AS)" \
@@ -267,7 +270,8 @@ TARGET_CONFIGURE_OPTS = PATH=$(BR_PATH) \
 		LDFLAGS="$(TARGET_LDFLAGS)" \
 		FCFLAGS="$(TARGET_FCFLAGS)" \
 		PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
-		STAGING_DIR="$(STAGING_DIR)"
+		STAGING_DIR="$(STAGING_DIR)" \
+		INTLTOOL_PERL=$(PERL)
 
 TARGET_MAKE_ENV = PATH=$(BR_PATH)
 
@@ -292,7 +296,8 @@ HOST_CONFIGURE_OPTS = PATH=$(BR_PATH) \
 		PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
 		PKG_CONFIG_SYSROOT_DIR="/" \
 		PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig:$(HOST_DIR)/usr/share/pkgconfig" \
-		LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)"
+		LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)" \
+		INTLTOOL_PERL=$(PERL)
 
 HOST_MAKE_ENV = PATH=$(BR_PATH) \
 		LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)" \
diff --git a/package/intltool/intltool.mk b/package/intltool/intltool.mk
index a7afe0d..549cb3b 100644
--- a/package/intltool/intltool.mk
+++ b/package/intltool/intltool.mk
@@ -10,9 +10,6 @@ INTLTOOL_LICENSE = GPLv2+
 INTLTOOL_LICENSE_FILES = COPYING
 
 HOST_INTLTOOL_DEPENDENCIES = host-gettext host-libxml-parser-perl
-HOST_INTLTOOL_CONF_OPTS = \
-	PERL=`which perl` \
-	PERL5LIB=$(HOST_DIR)/usr/lib/perl
 
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
diff --git a/package/pkg-perl.mk b/package/pkg-perl.mk
index f41a2f9..6577588 100644
--- a/package/pkg-perl.mk
+++ b/package/pkg-perl.mk
@@ -20,7 +20,7 @@
 ################################################################################
 
 PERL_ARCHNAME = $(ARCH)-linux
-PERL_RUN = $(HOST_DIR)/usr/bin/perl
+PERL_RUN = PERL5LIB= $(HOST_DIR)/usr/bin/perl
 
 ################################################################################
 # inner-perl-package -- defines how the configuration, compilation and
-- 
1.9.1

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

* [Buildroot] [PATCH] intltool: fix build
  2014-10-17 18:48 [Buildroot] [PATCH] intltool: fix build Francois Perrad
@ 2014-10-19 10:40 ` Bernd Kuhls
  2014-10-19 22:50 ` Arnout Vandecappelle
  2014-10-22 16:03 ` Thomas Petazzoni
  2 siblings, 0 replies; 6+ messages in thread
From: Bernd Kuhls @ 2014-10-19 10:40 UTC (permalink / raw)
  To: buildroot

Francois Perrad <fperrad@gmail.com> wrote in 
news:1413571681-27963-1-git-send-email-francois.perrad at gadz.org:

> fix various build failures caused by host-perl serie

Hi,

please add some links to the autobuilder errors fixed by your patch,
apart from that:

Reviewed-by: Bernd Kuhls <bernd.kuhls@t-online.de>

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

* [Buildroot] [PATCH] intltool: fix build
  2014-10-17 18:48 [Buildroot] [PATCH] intltool: fix build Francois Perrad
  2014-10-19 10:40 ` Bernd Kuhls
@ 2014-10-19 22:50 ` Arnout Vandecappelle
  2014-10-22 16:03 ` Thomas Petazzoni
  2 siblings, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2014-10-19 22:50 UTC (permalink / raw)
  To: buildroot

On 17/10/14 20:48, Francois Perrad wrote:
> fix various build failures caused by host-perl serie
> 
> Currently, the variables PERL & PERL2LIB are available
> only during the configure step of host-intltool.
> There are also needed when running host-intltool,
> in all package which depends on host-intltool.
> 
> So, there are now global, but in the perl infrastructure,
> we cannot use them.
> 
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  package/Makefile.in          | 9 +++++++--
>  package/intltool/intltool.mk | 3 ---
>  package/pkg-perl.mk          | 2 +-
>  3 files changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/package/Makefile.in b/package/Makefile.in
> index ab59b54..b5d407c 100644
> --- a/package/Makefile.in
> +++ b/package/Makefile.in
> @@ -232,6 +232,9 @@ HOST_LDFLAGS  += -L$(HOST_DIR)/lib -L$(HOST_DIR)/usr/lib -Wl,-rpath,$(HOST_DIR)/
>  HOSTCC_VERSION := $(shell $(HOSTCC_NOCCACHE) --version | \
>  	sed -n 's/^.* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)[ ]*.*$$/\1\2\3/p')
>  
> +export PERL=$(shell which perl)

 Isn't this the default, i.e. redundant?

> +export PERL5LIB=$(HOST_DIR)/usr/lib/perl

 This one is probably needed indeed.

> +
>  TARGET_CONFIGURE_OPTS = PATH=$(BR_PATH) \
>  		AR="$(TARGET_AR)" \
>  		AS="$(TARGET_AS)" \
> @@ -267,7 +270,8 @@ TARGET_CONFIGURE_OPTS = PATH=$(BR_PATH) \
>  		LDFLAGS="$(TARGET_LDFLAGS)" \
>  		FCFLAGS="$(TARGET_FCFLAGS)" \
>  		PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
> -		STAGING_DIR="$(STAGING_DIR)"
> +		STAGING_DIR="$(STAGING_DIR)" \
> +		INTLTOOL_PERL=$(PERL)

 This will only be used by intltool itself (to replace the @INTLTOOL_PERL@
stanza in the intltool-*.in files), so it should move to the host-intltool package.

 Actually, I even think that it's quite wrong for the TARGET_CONFIGURE_OPTS
because it would only be used by the target intltool, which shouldn't use
whatever path the system's perl is in.

>  
>  TARGET_MAKE_ENV = PATH=$(BR_PATH)
>  
> @@ -292,7 +296,8 @@ HOST_CONFIGURE_OPTS = PATH=$(BR_PATH) \
>  		PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
>  		PKG_CONFIG_SYSROOT_DIR="/" \
>  		PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig:$(HOST_DIR)/usr/share/pkgconfig" \
> -		LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)"
> +		LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)" \
> +		INTLTOOL_PERL=$(PERL)

 So it's this one that should move to intltool


 Regards,
 Arnout.

>  
>  HOST_MAKE_ENV = PATH=$(BR_PATH) \
>  		LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)" \
> diff --git a/package/intltool/intltool.mk b/package/intltool/intltool.mk
> index a7afe0d..549cb3b 100644
> --- a/package/intltool/intltool.mk
> +++ b/package/intltool/intltool.mk
> @@ -10,9 +10,6 @@ INTLTOOL_LICENSE = GPLv2+
>  INTLTOOL_LICENSE_FILES = COPYING
>  
>  HOST_INTLTOOL_DEPENDENCIES = host-gettext host-libxml-parser-perl
> -HOST_INTLTOOL_CONF_OPTS = \
> -	PERL=`which perl` \
> -	PERL5LIB=$(HOST_DIR)/usr/lib/perl
>  
>  $(eval $(autotools-package))
>  $(eval $(host-autotools-package))
> diff --git a/package/pkg-perl.mk b/package/pkg-perl.mk
> index f41a2f9..6577588 100644
> --- a/package/pkg-perl.mk
> +++ b/package/pkg-perl.mk
> @@ -20,7 +20,7 @@
>  ################################################################################
>  
>  PERL_ARCHNAME = $(ARCH)-linux
> -PERL_RUN = $(HOST_DIR)/usr/bin/perl
> +PERL_RUN = PERL5LIB= $(HOST_DIR)/usr/bin/perl
>  
>  ################################################################################
>  # inner-perl-package -- defines how the configuration, compilation and
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH] intltool: fix build
  2014-10-17 18:48 [Buildroot] [PATCH] intltool: fix build Francois Perrad
  2014-10-19 10:40 ` Bernd Kuhls
  2014-10-19 22:50 ` Arnout Vandecappelle
@ 2014-10-22 16:03 ` Thomas Petazzoni
  2014-10-22 17:15   ` François Perrad
  2 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2014-10-22 16:03 UTC (permalink / raw)
  To: buildroot

Dear Francois Perrad,

On Fri, 17 Oct 2014 20:48:01 +0200, Francois Perrad wrote:
> fix various build failures caused by host-perl serie
> 
> Currently, the variables PERL & PERL2LIB are available
> only during the configure step of host-intltool.
> There are also needed when running host-intltool,
> in all package which depends on host-intltool.
> 
> So, there are now global, but in the perl infrastructure,
> we cannot use them.
> 
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  package/Makefile.in          | 9 +++++++--
>  package/intltool/intltool.mk | 3 ---
>  package/pkg-perl.mk          | 2 +-
>  3 files changed, 8 insertions(+), 6 deletions(-)

Can you cook an updated version of this patch that takes into account
the comment you have received? It would help us fix a number of Perl
related autobuilder issues.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] intltool: fix build
  2014-10-22 16:03 ` Thomas Petazzoni
@ 2014-10-22 17:15   ` François Perrad
  2014-10-23 20:08     ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: François Perrad @ 2014-10-22 17:15 UTC (permalink / raw)
  To: buildroot

2014-10-22 18:03 GMT+02:00 Thomas Petazzoni
<thomas.petazzoni@free-electrons.com>:
> Dear Francois Perrad,
>
> On Fri, 17 Oct 2014 20:48:01 +0200, Francois Perrad wrote:
>> fix various build failures caused by host-perl serie
>>
>> Currently, the variables PERL & PERL2LIB are available
>> only during the configure step of host-intltool.
>> There are also needed when running host-intltool,
>> in all package which depends on host-intltool.
>>
>> So, there are now global, but in the perl infrastructure,
>> we cannot use them.
>>
>> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
>> ---
>>  package/Makefile.in          | 9 +++++++--
>>  package/intltool/intltool.mk | 3 ---
>>  package/pkg-perl.mk          | 2 +-
>>  3 files changed, 8 insertions(+), 6 deletions(-)
>
> Can you cook an updated version of this patch that takes into account
> the comment you have received? It would help us fix a number of Perl
> related autobuilder issues.
>

When I try to do that you suggest, I only obtain no working result.

I think that comments from Arnout, come from a pure review but no from
testing or experiment.

This patch doesn't try to fix the package host-intltool, it fixes the
packages which depend on host-intltool.
Currently, this kind of package is broken in the configure step
because they can not find the correct perl.
So, the variable INTLTOOL_PERL=$(PERL) in *_CONFIGURE_OPTS is mandatory.

When PATH=$(BR_PATH), `which perl` find the system perl when host-perl
is not yet installed, after it find the host-perl.
So, it is important to save the result of `which perl` with the
original PATH (ie. without $(HOST_DIR)/usr/bin).

The current patch stay the best that I can do (the commit message can
always be improved).

Fran?ois

> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH] intltool: fix build
  2014-10-22 17:15   ` François Perrad
@ 2014-10-23 20:08     ` Thomas Petazzoni
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2014-10-23 20:08 UTC (permalink / raw)
  To: buildroot

Dear Fran?ois Perrad,

On Wed, 22 Oct 2014 19:15:36 +0200, Fran?ois Perrad wrote:

> > Can you cook an updated version of this patch that takes into account
> > the comment you have received? It would help us fix a number of Perl
> > related autobuilder issues.
> 
> When I try to do that you suggest, I only obtain no working result.
> 
> I think that comments from Arnout, come from a pure review but no from
> testing or experiment.
> 
> This patch doesn't try to fix the package host-intltool, it fixes the
> packages which depend on host-intltool.
> Currently, this kind of package is broken in the configure step
> because they can not find the correct perl.
> So, the variable INTLTOOL_PERL=$(PERL) in *_CONFIGURE_OPTS is mandatory.
> 
> When PATH=$(BR_PATH), `which perl` find the system perl when host-perl
> is not yet installed, after it find the host-perl.
> So, it is important to save the result of `which perl` with the
> original PATH (ie. without $(HOST_DIR)/usr/bin).
> 
> The current patch stay the best that I can do (the commit message can
> always be improved).

Hum, right, ok. I'm not a big fan of how we handle intltool, but I
admit that the main reason for this mess is me asking you to not make
intltool and libxml-parser-perl depend on host-perl.

I've applied your patch (after slightly rewording the commit log), it
indeed seems to fix the issue. We'll see how things go, but I'm not
very happy with our intltool handling :/

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2014-10-23 20:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-17 18:48 [Buildroot] [PATCH] intltool: fix build Francois Perrad
2014-10-19 10:40 ` Bernd Kuhls
2014-10-19 22:50 ` Arnout Vandecappelle
2014-10-22 16:03 ` Thomas Petazzoni
2014-10-22 17:15   ` François Perrad
2014-10-23 20:08     ` Thomas Petazzoni

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