From patchwork Tue Mar 27 07:06:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 148868 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 79333B6EE8 for ; Tue, 27 Mar 2012 18:07:11 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C96F48B641; Tue, 27 Mar 2012 07:07:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wejYYD9fegTu; Tue, 27 Mar 2012 07:07:03 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id D63CC8D164; Tue, 27 Mar 2012 07:06:59 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 66C238F753 for ; Tue, 27 Mar 2012 07:06:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 387E28AB43 for ; Tue, 27 Mar 2012 07:06:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aujM1i5GHOEA for ; Tue, 27 Mar 2012 07:06:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (mail.free-electrons.com [88.190.12.23]) by whitealder.osuosl.org (Postfix) with ESMTP id C76788B274 for ; Tue, 27 Mar 2012 07:06:36 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 0E35E14B; Tue, 27 Mar 2012 09:06:17 +0200 (CEST) Received: from localhost (abo-88-24-68.rns.modulonet.fr [85.68.24.88]) by mail.free-electrons.com (Postfix) with ESMTPSA id 229A418C for ; Tue, 27 Mar 2012 09:06:02 +0200 (CEST) From: Thomas Petazzoni To: buildroot@busybox.net Date: Tue, 27 Mar 2012 09:06:18 +0200 Message-Id: X-Mailer: git-send-email 1.7.4.1 In-Reply-To: References: In-Reply-To: References: Subject: [Buildroot] [PATCH 2/2] microperl: install host-microperl in $(HOST_DIR)/opt/perl X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net This commit is a tentative at fixing some Perl-related build problems we are having nowadays, due to the fact that microperl now depends on host-microperl. Since the perl binary from host-microperl is installed in $(HOST_DIR)/usr/bin, it gets picked up when we run host tools like host-intltool, which were normally meant to be used against the distribution-provided Perl. This problem currently causes between a third to half of the failures in our random build tests. Another, cleaner, option would be to make host-intltool depend on host-microperl, but this would require every user needing intltool to build a host Perl interpreter, even if the real reason for build the host Perl interpreter is only needed for those who want to build the Perl interpreter for the target. This commit is really a test at trying another solution than adding this dependency, to see whether it turns out to be a reasonable trade-off or not. Later developments and improvements in the Perl area may require to switch to a different solution than the one implemented by this patch. Signed-off-by: Thomas Petazzoni --- package/microperl/microperl.mk | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/package/microperl/microperl.mk b/package/microperl/microperl.mk index 5bf4a2e..31b7a63 100644 --- a/package/microperl/microperl.mk +++ b/package/microperl/microperl.mk @@ -22,10 +22,16 @@ MICROPERL_MODS += constant.pm CGI CGI.pm Carp.pm Exporter.pm overload.pm \ vars.pm warnings.pm warnings/register.pm endif -# Host microperl is actually full-blown perl +# Host microperl is actually full-blown perl. Instead of installing it +# with prefix=$(HOST_DIR)/usr, we install it with +# prefix=$(HOST_DIR)/opt/perl so that this host-microperl is only used +# for building the target microperl. If we install the host-microperl +# in $(HOST_DIR)/usr, it gets picked up by all Perl-based utilities +# (such as intltool) that Buildroot has installed, creating +# incompatibilites with the Perl provided by the distribution. define HOST_MICROPERL_CONFIGURE_CMDS cd $(@D) ; \ - ./Configure -Dcc="$(HOSTCC)" -Dprefix="$(HOST_DIR)/usr" \ + ./Configure -Dcc="$(HOSTCC)" -Dprefix="$(HOST_DIR)/opt/perl/" \ -Dloclibpth='/lib /lib64 /usr/lib /usr/lib64' -des endef @@ -95,8 +101,8 @@ define MICROPERL_CONFIGURE_CMDS cp -f $(@D)/uconfig.sh $(@D)/config.sh echo "ccname='$(TARGET_CC)'" >>$(@D)/config.sh echo "PERL_CONFIG_SH=true" >>$(@D)/config.sh - cd $(@D) ; $(HOST_DIR)/usr/bin/perl make_patchnum.pl ; \ - $(HOST_DIR)/usr/bin/perl configpm + cd $(@D) ; $(HOST_DIR)/opt/perl/bin/perl make_patchnum.pl ; \ + $(HOST_DIR)/opt/perl/bin/perl configpm endef define MICROPERL_BUILD_CMDS @@ -111,9 +117,9 @@ endef # Just ignore make_ext.pl warning/errors define MICROPERL_BUILD_EXTENSIONS for i in $(MICROPERL_MODS); do \ - cd $(@D); ln -sf $(HOST_DIR)/usr/bin/perl miniperl; \ + cd $(@D); ln -sf $(HOST_DIR)/opt/perl/bin/perl miniperl; \ PERL5LIB=$(TARGET_DIR)/$(MICROPERL_ARCH_DIR) \ - $(HOST_DIR)/usr/bin/perl make_ext.pl MAKE="$(MAKE)" --nonxs \ + $(HOST_DIR)/opt/perl/bin/perl make_ext.pl MAKE="$(MAKE)" --nonxs \ `echo $$i|sed -e 's/.pm//'`; \ done endef