Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] perl: fix configure step
@ 2012-11-10 14:41 Francois Perrad
  2012-11-10 14:41 ` [Buildroot] [PATCH 2/2] cpanminus: fix paths Francois Perrad
  2012-11-10 16:07 ` [Buildroot] [PATCH 1/2] perl: fix configure step Thomas Petazzoni
  0 siblings, 2 replies; 5+ messages in thread
From: Francois Perrad @ 2012-11-10 14:41 UTC (permalink / raw)
  To: buildroot

Configure -A symbol=val generates a extra space in config.sh,
which causes failure like this :
    Building Module-Runtime-0.013
    Unknown OS type ' linux' - using default settings

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/perl/perl.mk |   27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/package/perl/perl.mk b/package/perl/perl.mk
index 0893eb5..cbfeeab 100644
--- a/package/perl/perl.mk
+++ b/package/perl/perl.mk
@@ -55,14 +55,8 @@ PERL_CONF_OPT = \
 	--target-tools-prefix=$(TARGET_CROSS) \
 	--prefix=/usr \
 	-Dld="$(TARGET_CC_NOCCACHE)" \
-	-A ccflags="$(TARGET_CFLAGS)" \
-	-A ldflags="$(TARGET_LDFLAGS) -lm" \
-	-A mydomain="" \
-	-A myhostname="$(BR2_TARGET_GENERIC_HOSTNAME)" \
-	-A myuname="Buildroot $(BR2_VERSION_FULL)" \
-	-A osname=linux \
-	-A osvers=$(LINUX_VERSION) \
-	-A perladmin=root
+	-Dccflags="$(TARGET_CFLAGS)" \
+	-Dldflags="$(TARGET_LDFLAGS) -lm"
 
 ifeq ($(shell expr $(PERL_VERSION_MAJOR) % 2), 1)
     PERL_CONF_OPT += -Dusedevel
@@ -79,6 +73,23 @@ endif
 
 define PERL_CONFIGURE_CMDS
 	(cd $(@D); HOSTCC='$(HOSTCC_NOCACHE)' ./configure $(PERL_CONF_OPT))
+	echo "# patched values" >>$(@D)/config.sh
+	$(SED) '/^myarchname=/d' \
+		-e '/^mydomain=/d' \
+		-e '/^myhostname=/d' \
+		-e '/^myuname=/d' \
+		-e '/^osname=/d' \
+		-e '/^osvers=/d' \
+		-e '/^perladmin=/d' \
+		$(@D)/config.sh
+	echo "myarchname='$(GNU_TARGET_NAME)'"                  >>$(@D)/config.sh
+	echo "mydomain=''"                                      >>$(@D)/config.sh
+	echo "myhostname='$(BR2_TARGET_GENERIC_HOSTNAME)'"      >>$(@D)/config.sh
+	echo "myuname='Buildroot $(BR2_VERSION_FULL)'"          >>$(@D)/config.sh
+	echo "osname='linux'"                                   >>$(@D)/config.sh
+	echo "osvers='$(BR2_LINUX_KERNEL_VERSION)'"             >>$(@D)/config.sh
+	echo "perladmin='root'"                                 >>$(@D)/config.sh
+	(cd $(@D); ./Configure -S)
 	$(SED) 's/UNKNOWN-/Buildroot $(BR2_VERSION_FULL) /' $(@D)/patchlevel.h
 endef
 
-- 
1.7.9.5

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

* [Buildroot] [PATCH 2/2] cpanminus: fix paths
  2012-11-10 14:41 [Buildroot] [PATCH 1/2] perl: fix configure step Francois Perrad
@ 2012-11-10 14:41 ` Francois Perrad
  2012-11-13  8:10   ` Arnout Vandecappelle
  2012-11-10 16:07 ` [Buildroot] [PATCH 1/2] perl: fix configure step Thomas Petazzoni
  1 sibling, 1 reply; 5+ messages in thread
From: Francois Perrad @ 2012-11-10 14:41 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/cpanminus/cpanminus.mk |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/cpanminus/cpanminus.mk b/package/cpanminus/cpanminus.mk
index af35e93..e07ef38 100644
--- a/package/cpanminus/cpanminus.mk
+++ b/package/cpanminus/cpanminus.mk
@@ -11,8 +11,8 @@ CPANMINUS_DEPENDENCIES = host-qemu perl $(call qstrip,$(BR2_PACKAGE_CPANMINUS_NA
 
 CPANMINUS_RUN_PERL = $(QEMU_USER) $(STAGING_DIR)/usr/bin/perl
 CPANMINUS_ARCHNAME = $(shell $(CPANMINUS_RUN_PERL) -MConfig -e "print Config->{archname}")
-CPANMINUS_PERL_LIB      = $(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION)
-CPANMINUS_PERL_SITELIB  = $(TARGET_DIR)/usr/lib/perl5/site_perl/$(PERL_VERSION)
+CPANMINUS_PERL_LIB      = $(STAGING_DIR)/usr/lib/perl
+CPANMINUS_PERL_SITELIB  = $(TARGET_DIR)/usr/lib/perl
 CPANMINUS_PERL_ARCHLIB  = $(CPANMINUS_PERL_LIB)/$(CPANMINUS_ARCHNAME)
 CPANMINUS_PERL_SITEARCH = $(CPANMINUS_PERL_SITELIB)/$(CPANMINUS_ARCHNAME)
 CPANMINUS_PERL5LIB = $(CPANMINUS_PERL_SITEARCH):$(CPANMINUS_PERL_SITELIB):$(CPANMINUS_PERL_ARCHLIB):$(CPANMINUS_PERL_LIB)
@@ -27,8 +27,8 @@ define CPANMINUS_INSTALL_TARGET_CMDS
 	echo "PERL5LIB=$(CPANMINUS_PERL5LIB) $(CPANMINUS_RUN_PERL) \"\$$@\""    >>$(@D)/run_perl
 	chmod +x $(@D)/run_perl
 	PERL5LIB=$(CPANMINUS_PERL5LIB) \
-	PERL_MM_OPT="DESTDIR=$(TARGET_DIR) PERL=$(@D)/run_perl PERL_LIB=$(CPANMINUS_PERL_LIB) PERL_ARCHLIB=$(CPANMINUS_PERL_ARCHLIB)" \
-	PERL_MB_OPT="--destdir $(TARGET_DIR)" \
+	PERL_MM_OPT="DESTDIR=$(CPANMINUS_PERL_SITELIB) PERL=$(@D)/run_perl PERL_LIB=$(CPANMINUS_PERL_LIB) PERL_ARCHLIB=$(CPANMINUS_PERL_ARCHLIB)" \
+	PERL_MB_OPT="--destdir $(CPANMINUS_PERL_SITELIB)" \
 	RUN_PERL="$(@D)/run_perl" \
 	$(CPANMINUS_RUN_PERL) $(@D)/cpanm \
 		--perl=$(@D)/run_perl \
-- 
1.7.9.5

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

* [Buildroot] [PATCH 1/2] perl: fix configure step
  2012-11-10 14:41 [Buildroot] [PATCH 1/2] perl: fix configure step Francois Perrad
  2012-11-10 14:41 ` [Buildroot] [PATCH 2/2] cpanminus: fix paths Francois Perrad
@ 2012-11-10 16:07 ` Thomas Petazzoni
  2012-11-13  7:06   ` Arnout Vandecappelle
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2012-11-10 16:07 UTC (permalink / raw)
  To: buildroot

Dear Francois Perrad,

On Sat, 10 Nov 2012 15:41:07 +0100, Francois Perrad wrote:
> Configure -A symbol=val generates a extra space in config.sh,
> which causes failure like this :
>     Building Module-Runtime-0.013
>     Unknown OS type ' linux' - using default settings
> 
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>

Instead of doing what the patch does below, wouldn't it be better to
fix this -A option so that it doesn't add inappropriate spaces?

Thanks,

Thomas

> ---
>  package/perl/perl.mk |   27 +++++++++++++++++++--------
>  1 file changed, 19 insertions(+), 8 deletions(-)
> 
> diff --git a/package/perl/perl.mk b/package/perl/perl.mk
> index 0893eb5..cbfeeab 100644
> --- a/package/perl/perl.mk
> +++ b/package/perl/perl.mk
> @@ -55,14 +55,8 @@ PERL_CONF_OPT = \
>  	--target-tools-prefix=$(TARGET_CROSS) \
>  	--prefix=/usr \
>  	-Dld="$(TARGET_CC_NOCCACHE)" \
> -	-A ccflags="$(TARGET_CFLAGS)" \
> -	-A ldflags="$(TARGET_LDFLAGS) -lm" \
> -	-A mydomain="" \
> -	-A myhostname="$(BR2_TARGET_GENERIC_HOSTNAME)" \
> -	-A myuname="Buildroot $(BR2_VERSION_FULL)" \
> -	-A osname=linux \
> -	-A osvers=$(LINUX_VERSION) \
> -	-A perladmin=root
> +	-Dccflags="$(TARGET_CFLAGS)" \
> +	-Dldflags="$(TARGET_LDFLAGS) -lm"
>  
>  ifeq ($(shell expr $(PERL_VERSION_MAJOR) % 2), 1)
>      PERL_CONF_OPT += -Dusedevel
> @@ -79,6 +73,23 @@ endif
>  
>  define PERL_CONFIGURE_CMDS
>  	(cd $(@D); HOSTCC='$(HOSTCC_NOCACHE)' ./configure $(PERL_CONF_OPT))
> +	echo "# patched values" >>$(@D)/config.sh
> +	$(SED) '/^myarchname=/d' \
> +		-e '/^mydomain=/d' \
> +		-e '/^myhostname=/d' \
> +		-e '/^myuname=/d' \
> +		-e '/^osname=/d' \
> +		-e '/^osvers=/d' \
> +		-e '/^perladmin=/d' \
> +		$(@D)/config.sh
> +	echo "myarchname='$(GNU_TARGET_NAME)'"                  >>$(@D)/config.sh
> +	echo "mydomain=''"                                      >>$(@D)/config.sh
> +	echo "myhostname='$(BR2_TARGET_GENERIC_HOSTNAME)'"      >>$(@D)/config.sh
> +	echo "myuname='Buildroot $(BR2_VERSION_FULL)'"          >>$(@D)/config.sh
> +	echo "osname='linux'"                                   >>$(@D)/config.sh
> +	echo "osvers='$(BR2_LINUX_KERNEL_VERSION)'"             >>$(@D)/config.sh
> +	echo "perladmin='root'"                                 >>$(@D)/config.sh
> +	(cd $(@D); ./Configure -S)
>  	$(SED) 's/UNKNOWN-/Buildroot $(BR2_VERSION_FULL) /' $(@D)/patchlevel.h
>  endef
>  



-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH 1/2] perl: fix configure step
  2012-11-10 16:07 ` [Buildroot] [PATCH 1/2] perl: fix configure step Thomas Petazzoni
@ 2012-11-13  7:06   ` Arnout Vandecappelle
  0 siblings, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2012-11-13  7:06 UTC (permalink / raw)
  To: buildroot

On 10/11/12 17:07, Thomas Petazzoni wrote:
> Dear Francois Perrad,
>
> On Sat, 10 Nov 2012 15:41:07 +0100, Francois Perrad wrote:
>> >  Configure -A symbol=val generates a extra space in config.sh,
>> >  which causes failure like this :
>> >       Building Module-Runtime-0.013
>> >       Unknown OS type ' linux' - using default settings
>> >
>> >  Signed-off-by: Francois Perrad<francois.perrad@gadz.org>
> Instead of doing what the patch does below, wouldn't it be better to
> fix this -A option so that it doesn't add inappropriate spaces?

  I've adapted the patch accordingly and added it to my perl-fixes series (which
I'll repost in a moment).


  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
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] 5+ messages in thread

* [Buildroot] [PATCH 2/2] cpanminus: fix paths
  2012-11-10 14:41 ` [Buildroot] [PATCH 2/2] cpanminus: fix paths Francois Perrad
@ 2012-11-13  8:10   ` Arnout Vandecappelle
  0 siblings, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2012-11-13  8:10 UTC (permalink / raw)
  To: buildroot

On 10/11/12 15:41, Francois Perrad wrote:
> Signed-off-by: Francois Perrad<francois.perrad@gadz.org>
> ---
>   package/cpanminus/cpanminus.mk |    8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/package/cpanminus/cpanminus.mk b/package/cpanminus/cpanminus.mk
> index af35e93..e07ef38 100644
> --- a/package/cpanminus/cpanminus.mk
> +++ b/package/cpanminus/cpanminus.mk
> @@ -11,8 +11,8 @@ CPANMINUS_DEPENDENCIES = host-qemu perl $(call qstrip,$(BR2_PACKAGE_CPANMINUS_NA
>
>   CPANMINUS_RUN_PERL = $(QEMU_USER) $(STAGING_DIR)/usr/bin/perl
>   CPANMINUS_ARCHNAME = $(shell $(CPANMINUS_RUN_PERL) -MConfig -e "print Config->{archname}")
> -CPANMINUS_PERL_LIB      = $(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION)
> -CPANMINUS_PERL_SITELIB  = $(TARGET_DIR)/usr/lib/perl5/site_perl/$(PERL_VERSION)
> +CPANMINUS_PERL_LIB      = $(STAGING_DIR)/usr/lib/perl
> +CPANMINUS_PERL_SITELIB  = $(TARGET_DIR)/usr/lib/perl
>   CPANMINUS_PERL_ARCHLIB  = $(CPANMINUS_PERL_LIB)/$(CPANMINUS_ARCHNAME)
>   CPANMINUS_PERL_SITEARCH = $(CPANMINUS_PERL_SITELIB)/$(CPANMINUS_ARCHNAME)
>   CPANMINUS_PERL5LIB = $(CPANMINUS_PERL_SITEARCH):$(CPANMINUS_PERL_SITELIB):$(CPANMINUS_PERL_ARCHLIB):$(CPANMINUS_PERL_LIB)
> @@ -27,8 +27,8 @@ define CPANMINUS_INSTALL_TARGET_CMDS
>   	echo "PERL5LIB=$(CPANMINUS_PERL5LIB) $(CPANMINUS_RUN_PERL) \"\$$@\"">>$(@D)/run_perl
>   	chmod +x $(@D)/run_perl
>   	PERL5LIB=$(CPANMINUS_PERL5LIB) \
> -	PERL_MM_OPT="DESTDIR=$(TARGET_DIR) PERL=$(@D)/run_perl PERL_LIB=$(CPANMINUS_PERL_LIB) PERL_ARCHLIB=$(CPANMINUS_PERL_ARCHLIB)" \
> -	PERL_MB_OPT="--destdir $(TARGET_DIR)" \
> +	PERL_MM_OPT="DESTDIR=$(CPANMINUS_PERL_SITELIB) PERL=$(@D)/run_perl PERL_LIB=$(CPANMINUS_PERL_LIB) PERL_ARCHLIB=$(CPANMINUS_PERL_ARCHLIB)" \
> +	PERL_MB_OPT="--destdir $(CPANMINUS_PERL_SITELIB)" \

  I merged this change as well in my own version of this patch.

  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
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] 5+ messages in thread

end of thread, other threads:[~2012-11-13  8:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-10 14:41 [Buildroot] [PATCH 1/2] perl: fix configure step Francois Perrad
2012-11-10 14:41 ` [Buildroot] [PATCH 2/2] cpanminus: fix paths Francois Perrad
2012-11-13  8:10   ` Arnout Vandecappelle
2012-11-10 16:07 ` [Buildroot] [PATCH 1/2] perl: fix configure step Thomas Petazzoni
2012-11-13  7:06   ` Arnout Vandecappelle

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