Skip to contentSkip to conversation

pkg-perl: fix for Perl XS packages configured by a Makefile.PL

PATCH Superseded Francois Perrad 4 participants 8 messages Apr 20, 2014 – Apr 22, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 pkg-perl: fix for Perl XS packages configured by a Makefile.PL

for native package, ExtUtils::MakeMaker detects all include filenames on system perl, all these includes will be required by the generated Makefile but on STAGING_DIR.

patchlevel-debian.h is not a part of the Perl distribution, but it was added by some Linux distributions (Debian, Ubuntu, ...) In this case, we create an empty file on STAGING_DIR.

---
 package/pkg-perl.mk | 1 +
 1 file changed, 1 insertion(+)
package/pkg-perl.mk +1 -0
index 447f364..876ffdb 100644
@@ -88,6 +88,7 @@ define $(2)_CONFIGURE_CMDS
 			INSTALLVENDORMAN1DIR=/usr/share/man/man1 \
 			INSTALLVENDORMAN3DIR=/usr/share/man/man3 \
 			$$($(2)_CONF_OPT); \
+		touch $(STAGING_DIR)/usr/lib/perl5/$$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE/patchlevel-debian.h; \
 	fi
 endef
 else
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/2 perl-cross: bump to version 0.8.5

---
 package/perl/perl.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
package/perl/perl.mk +3 -3
index 51aeb14..7fdb1b0 100644
@@ -12,9 +12,9 @@ PERL_LICENSE = Artistic or GPLv1+
 PERL_LICENSE_FILES = Artistic Copying README
 PERL_INSTALL_STAGING = YES
 
-PERL_CROSS_VERSION = 0.8.3
-PERL_CROSS_BASE_VERSION = 5.$(PERL_VERSION_MAJOR).1
-PERL_CROSS_SITE    = http://download.berlios.de/perlcross
+PERL_CROSS_VERSION = 0.8.5
+PERL_CROSS_BASE_VERSION = 5.$(PERL_VERSION_MAJOR).2
+PERL_CROSS_SITE    = http://raw.github.com/arsv/perl-cross/releases
 PERL_CROSS_SOURCE  = perl-$(PERL_CROSS_BASE_VERSION)-cross-$(PERL_CROSS_VERSION).tar.gz
 PERL_CROSS_OLD_POD = perl$(subst .,,$(PERL_CROSS_BASE_VERSION))delta.pod
 PERL_CROSS_NEW_POD = perl$(subst .,,$(PERL_VERSION))delta.pod
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/2 perl-cross: bump to version 0.8.5

Dear Francois Perrad,

package/perl/perl.mk PERL_LICENSE = Artistic or GPLv1+ · line 17

Quoted 6 lines · Francois Perrad
package/perl/perl.mk +3 -3
-PERL_CROSS_VERSION = 0.8.3
-PERL_CROSS_BASE_VERSION = 5.$(PERL_VERSION_MAJOR).1
-PERL_CROSS_SITE    = http://download.berlios.de/perlcross
+PERL_CROSS_VERSION = 0.8.5
+PERL_CROSS_BASE_VERSION = 5.$(PERL_VERSION_MAJOR).2
+PERL_CROSS_SITE    = http://raw.github.com/arsv/perl-cross/releases

You should use the $(github ...) helper here.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 2/2 perl-cross: bump to version 0.8.5

2014-04-20 17:37 GMT+02:00 Thomas Petazzoni
<[email protected]>:

Quoted 4 lines

Dear Francois Perrad,

On Sun, 20 Apr 2014 17:05:56 +0200, Francois Perrad wrote:

Quoted 9 lines

package/perl/perl.mk PERL_LICENSE = Artistic or GPLv1+ · line 17

Quoted 6 lines
package/perl/perl.mk +3 -3
-PERL_CROSS_VERSION = 0.8.3
-PERL_CROSS_BASE_VERSION = 5.$(PERL_VERSION_MAJOR).1
-PERL_CROSS_SITE    = http://download.berlios.de/perlcross
+PERL_CROSS_VERSION = 0.8.5
+PERL_CROSS_BASE_VERSION = 5.$(PERL_VERSION_MAJOR).2
+PERL_CROSS_SITE    = http://raw.github.com/arsv/perl-cross/releases

You should use the $(github ...) helper here.

No. I've already tried it. The helper doesn't give the same result.

I need a tarball which allows to patch the perl distribution. The helper gives a copy of the project which allows to build this tarball.

Fran?ois

Quoted 11 lines

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

#4 lore raw

PATCH 2/2 perl-cross: bump to version 0.8.5

Dear Fran?ois Perrad,

Quoted 4 lines · Fran?ois Perrad

No. I've already tried it. The helper doesn't give the same result.

I need a tarball which allows to patch the perl distribution. The helper gives a copy of the project which allows to build this tarball.

Then can you add a comment above the _SITE line to explain this?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH 1/2 pkg-perl: fix for Perl XS packages configured by a Makefile.PL

In reply to Francois Perrad

Dear Francois Perrad,

Quoted 6 lines · Francois Perrad

for native package, ExtUtils::MakeMaker detects all include filenames on system perl, all these includes will be required by the generated Makefile but on STAGING_DIR.

patchlevel-debian.h is not a part of the Perl distribution, but it was added by some Linux distributions (Debian, Ubuntu, ...) In this case, we create an empty file on STAGING_DIR.

I'm sorry, but unfortunately, I don't understand this explanation. How the fact that a header file is added by Linux distributions affecting Buildroot? What package needs that? Which problem is this fixing?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH 1/2 pkg-perl: fix for Perl XS packages configured by a Makefile.PL

In reply to Francois Perrad

Hi Francois,

Quoted 6 lines · Francois Perrad

for native package, ExtUtils::MakeMaker detects all include filenames on system perl, all these includes will be required by the generated Makefile but on STAGING_DIR.

patchlevel-debian.h is not a part of the Perl distribution, but it was added by some Linux distributions (Debian, Ubuntu, ...) In this case, we create an empty file on STAGING_DIR.

Contrary to Thomas, I do understand the explanation, so here's a
hopefully improved one:

ExtUtils::MakeMaker adds all the header files used by the perl as dependencies to the generated Makefile. This means that the generated Makefile will depend on the system's header files.

Usually this is not a problem, because when building the target package, these header files will indeed be found in $(STAGING_DIR). However, some distro's add an extra header file to the system's perl. This header is also included in the generated Makefile, which makes the build fail because it doesn't exist in $(STAGING_DIR).

As a work-around, explicitly create this header file in $(STAGING_DIR). It doesn't hurt to create it even if the system perl doesn't need it.

Quoted 11 lines
---
 package/pkg-perl.mk | 1 +
 1 file changed, 1 insertion(+)
package/pkg-perl.mk +0 -0
index 447f364..876ffdb 100644

package/pkg-perl.mk define $(2)_CONFIGURE_CMDS · line 91

Quoted 4 lines
package/pkg-perl.mk +1 -0
@@ -88,6 +88,7 @@ define $(2)_CONFIGURE_CMDS
 			INSTALLVENDORMAN1DIR=/usr/share/man/man1 \
 			INSTALLVENDORMAN3DIR=/usr/share/man/man3 \
 			$$($(2)_CONF_OPT); \
+		touch $(STAGING_DIR)/usr/lib/perl5/$$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE/patchlevel-debian.h; \

Wouldn't it be better to do this in a post-install-staging hook in perl
itself? Now, this file will be touched over and over again for each perl package.

Also, you probably should repeat the commit log's explanation here.

Regards,
Arnout

Quoted 4 lines
package/pkg-perl.mk +0 -0
 	fi
 endef
 else
Signature · 6 lines
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
#7 lore raw

PATCH 1/2 pkg-perl: fix for Perl XS packages configured by a Makefile.PL

2014-04-22 8:01 GMT+02:00 Arnout Vandecappelle <[email protected]>:

Quoted 32 lines

Hi Francois,

Quoted 6 lines · Francois Perrad

for native package, ExtUtils::MakeMaker detects all include filenames on system perl, all these includes will be required by the generated Makefile but on STAGING_DIR.

patchlevel-debian.h is not a part of the Perl distribution, but it was added by some Linux distributions (Debian, Ubuntu, ...) In this case, we create an empty file on STAGING_DIR.

Contrary to Thomas, I do understand the explanation, so here's a
hopefully improved one:

ExtUtils::MakeMaker adds all the header files used by the perl as dependencies to the generated Makefile. This means that the generated Makefile will depend on the system's header files.

Usually this is not a problem, because when building the target package, these header files will indeed be found in $(STAGING_DIR). However, some distro's add an extra header file to the system's perl. This header is also included in the generated Makefile, which makes the build fail because it doesn't exist in $(STAGING_DIR).

As a work-around, explicitly create this header file in $(STAGING_DIR). It doesn't hurt to create it even if the system perl doesn't need it.

Quoted 6 lines
---
 package/pkg-perl.mk | 1 +
 1 file changed, 1 insertion(+)
Quoted 14 lines

package/pkg-perl.mk define $(2)_CONFIGURE_CMDS · line 91

Quoted 9 lines
package/pkg-perl.mk +1 -0
index 447f364..876ffdb 100644
@@ -88,6 +88,7 @@ define $(2)_CONFIGURE_CMDS
                      INSTALLVENDORMAN1DIR=/usr/share/man/man1 \
                      INSTALLVENDORMAN3DIR=/usr/share/man/man3 \
                      $$($(2)_CONF_OPT); \
+             touch $(STAGING_DIR)/usr/lib/perl5/$$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE/patchlevel-debian.h; \

Wouldn't it be better to do this in a post-install-staging hook in perl
itself? Now, this file will be touched over and over again for each perl package.

2 reasons :
1) currently, PERL_ARCHNAME is defined in pkg-perl.mk, but not in perl.mk
2) here, the hack is close to the command which requires it (ie. perl Makefile.PL in _CONFIGURE_CMDS for target)

The CPU cost of each touch is insignificant, and I don't observe problem with rebuild of package.
But the hack could be improved like this :

PATCHLEVEL_DEBIAN_H = $(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE/patchlevel-debian.h

       test -f $(PATCHLEVEL_DEBIAN_H) || touch $(PATCHLEVEL_DEBIAN_H)

Fran?ois

Quoted 23 lines

Also, you probably should repeat the commit log's explanation here.

Regards,
Arnout

package/pkg-perl.mk define $(2)_CONFIGURE_CMDS · line 94

Quoted 4 lines
package/pkg-perl.mk +0 -0
      fi
 endef
 else

--

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

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