Skip to contentSkip to conversation

perl-gd: fix configure/build

PATCH New Francois Perrad 2 participants 5 messages Nov 28, 2014 – Nov 29, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perl-gd: fix configure/build

see http://autobuild.buildroot.net/results/e74/e74efded899744d757cb798c44f096b54898f95a/

this new patch prevents the use of a host gdlib-config

---
 package/perl-gd/perl-gd-04-no-autoconfig.patch | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 package/perl-gd/perl-gd-04-no-autoconfig.patch
package/perl-gd/perl-gd-04-no-autoconfig.patch new file +19 -0
new file mode 100644
index 0000000..c067d41
@@ -0,0 +1,19 @@
+prevents the use of gdlib-config in a cross-compilation environment
+
+Signed-off-by: Francois Perrad <[email protected]>
+
+Index: b/Makefile.PL
+===================================================================
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -272,6 +272,7 @@
+ exit 0;
+
+ sub try_to_autoconfigure {
++  return; # hack for BR
+   my ($options,$lib_gd_path,$INC,$LIBPATH,$LIBS) = @_;
+   my $config = `gdlib-config --all`;
+   return unless $config;
+--
+2.1.0
+
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/1 perl-gd: fix configure/build

Quoted 20 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Francois" == Francois Perrad <[email protected]> writes:

see http://autobuild.buildroot.net/results/e74/e74efded899744d757cb798c44f096b54898f95a/
this new patch prevents the use of a host gdlib-config

---
 package/perl-gd/perl-gd-04-no-autoconfig.patch | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 package/perl-gd/perl-gd-04-no-autoconfig.patch
package/perl-gd/perl-gd-04-no-autoconfig.patch new file +3 -0
new file mode 100644
index 0000000..c067d41
@@ -0,0 +1,19 @@
+prevents the use of gdlib-config in a cross-compilation environment
+
+Signed-off-by: Francois Perrad <[email protected]>

package/perl-gd/perl-gd-04-no-autoconfig.patch line 13

Quoted 10 lines
package/perl-gd/perl-gd-04-no-autoconfig.patch new file +10 -0
+
+Index: b/Makefile.PL
+===================================================================
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -272,6 +272,7 @@
+ exit 0;
+
+ sub try_to_autoconfigure {
++  return; # hack for BR

But does that do the right thing?

This is what our gdlib-config returns when E.G. building with png and jpeg support:

./staging/usr/bin/gdlib-config --all ~/source/buildroot/outputgd
GD library 2.1.0

includedir: /home/peko/source/buildroot/outputgd/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include
cflags:     -I/home/peko/source/buildroot/outputgd/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include
ldflags:     -pthread
libs:       -ljpeg -lz -lm  -L/home/peko/source/buildroot/outputgd/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib -lpng16  
libdir:     /home/peko/source/buildroot/outputgd/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib
features:   GD_JPEG GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON

As far as I can see it doesn't end up linking with those libraries / using -pthread. Does it work for you? (it might, when using shared linking).

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 perl-gd: fix configure/build

2014-11-28 21:44 GMT+01:00 Peter Korsgaard <[email protected]>:

Quoted 26 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Francois" == Francois Perrad <[email protected]> writes:

see

http://autobuild.buildroot.net/results/e74/e74efded899744d757cb798c44f096b54898f95a/

Review

Quoted 9 lines

this new patch prevents the use of a host gdlib-config

---
 package/perl-gd/perl-gd-04-no-autoconfig.patch | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 package/perl-gd/perl-gd-04-no-autoconfig.patch
(quoted diff) +0 -0

b/package/perl-gd/perl-gd-04-no-autoconfig.patch

Quoted 12 lines

new file mode 100644
index 0000000..c067d41

package/perl-gd/perl-gd-04-no-autoconfig.patch new file +7 -0
@@ -0,0 +1,19 @@
+prevents the use of gdlib-config in a cross-compilation environment
+
+Signed-off-by: Francois Perrad <[email protected]>
+
+Index: b/Makefile.PL
+===================================================================
+--- a/Makefile.PL
Quoted 10 lines

package/perl-gd/perl-gd-04-no-autoconfig.patch line 13

Quoted 6 lines
package/perl-gd/perl-gd-04-no-autoconfig.patch new file +6 -0
++++ b/Makefile.PL
+@@ -272,6 +272,7 @@
+ exit 0;
+
+ sub try_to_autoconfigure {
++  return; # hack for BR

But does that do the right thing?

with this patch, gdlib-config is never called, the configure step uses only values from PERL_GD_CONF_OPTS.

Fran?ois

Quoted 18 lines

This is what our gdlib-config returns when E.G. building with png and jpeg support:

./staging/usr/bin/gdlib-config --all
~/source/buildroot/outputgd
GD library 2.1.0
includedir:
/home/peko/source/buildroot/outputgd/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include cflags:
-I/home/peko/source/buildroot/outputgd/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include

ldflags:     -pthread
libs:       -ljpeg -lz -lm
(quoted diff) +0 -2
-L/home/peko/source/buildroot/outputgd/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib
-lpng16

libdir:
/home/peko/source/buildroot/outputgd/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib
features: GD_JPEG GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON

Quoted 7 lines

As far as I can see it doesn't end up linking with those libraries / using -pthread. Does it work for you? (it might, when using shared linking).

--
Bye, Peter Korsgaard

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20141129/7248051e/attachment.html>

#3 lore raw

PATCH 1/1 perl-gd: fix configure/build

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fran?ois" == Fran?ois Perrad <[email protected]> writes:

Hi,

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

+ sub try_to_autoconfigure {
++ return; # hack for BR

But does that do the right thing?

with this patch, gdlib-config is never called, the configure step uses only values from PERL_GD_CONF_OPTS.

Yes, exactly. Does it end up linking with the right libraries flags (-pthread -ljpeg -lz -lm)?

Signature · 2 lines
Venlig hilsen,
Peter Korsgaard 
#4 lore raw

PATCH 1/1 perl-gd: fix configure/build

2014-11-29 12:25 GMT+01:00 Peter Korsgaard <[email protected]>:

Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fran?ois" == Fran?ois Perrad <[email protected]> writes:

Hi,

Quoted 3 lines
Quoted 3 lines
Quoted 2 lines

+ sub try_to_autoconfigure {
++ return; # hack for BR

Quoted 10 lines
Quoted 3 lines
Quoted 2 lines

But does that do the right thing?

with this patch, gdlib-config is never called, the configure step uses

only

Quoted 1 line

values from PERL_GD_CONF_OPTS.

Yes, exactly. Does it end up linking with the right libraries flags (-pthread -ljpeg -lz -lm)?

On my box, it links with : -lgd -lfreetype -lpng -lz -lm that seems coherent with
PERL_GD_DEPENDENCIES = perl zlib libpng freetype gd

Fran?ois

Quoted 4 lines

--
Venlig hilsen,
Peter Korsgaard

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20141129/293284bd/attachment.html>