Skip Menu |

This queue is for tickets about the Image-Scale CPAN distribution.

Report information
The Basics
Id: 114242
Status: resolved
Priority: 0/
Queue: Image-Scale

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.11
Fixed in: (no value)



Subject: Configuration fails on debian systems with libjpeg62-turbo installed
On a debian/jessie system with libjpeg62-turbo-dev installed: $ perl5.22.2 Makefile.PL Unable to read /usr/include/jconfig.h Problem is that jconfig.h is in an architecture-dependent directory, unlinke jpeglib.h and the other header files: ... /usr/include/jpeglib.h /usr/include/jmorecfg.h /usr/include/jerror.h /usr/include/jpegint.h /usr/include/x86_64-linux-gnu/jconfig.h ... I tried a workaround to this problem (see patch below) --- this helps to get me through the configuration and build phase, but tests fail. I think the problem here is that the jpeg version is 62, but the generated images do not match. Regards, Slaven diff --git a/Makefile.PL b/Makefile.PL index c74fd3c..d08b708 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -105,7 +105,18 @@ for my $incdir ( $jpeg_inc, @check ) { $JPEG_VERSION = _re_find( catfile($incdir, 'jpeglib.h'), qr/JPEG_LIB_VERSION\s+(\d+)/ ) || 'unknown'; if ( $JPEG_VERSION eq 'unknown' ) { # Also check jconfig.h as it contains the version when using libjpeg-turbo - $JPEG_VERSION = _re_find( catfile($incdir, 'jconfig.h'), qr/JPEG_LIB_VERSION\s+(\d+)/ ) || 'unknown'; + TRY: { + for my $h_candidate ( + catfile($incdir, 'jconfig.h'), + catfile($incdir, 'x86_64-linux-gnu', 'jconfig.h'), + ) { + if (-r $h_candidate) { + $JPEG_VERSION = _re_find( $h_candidate, qr/JPEG_LIB_VERSION\s+(\d+)/ ); + last TRY if $JPEG_VERSION; + } + } + $JPEG_VERSION = 'unknown'; + } } }
Thanks, yeah, the JPEG comparison tests are too fragile, the next version will skip them. I have actually been sitting on a version in GitHub with a fix for both that and your turbo issue and just haven't released it yet. I went ahead and pushed out 0.12 to CPAN today which should work for you.