Skip Menu |

This queue is for tickets about the File-LibMagic CPAN distribution.

Report information
The Basics
Id: 38218
Status: resolved
Priority: 0/
Queue: File-LibMagic

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

Bug Information
Severity: Normal
Broken in: 0.88
Fixed in: (no value)



Subject: Compiling under FreeBSD
File::LibMagic currently builds under FreeBSD, but all tests fail complaining a missing symbol (inflate). This is probably from -lz, which is not automatically used when specifying -lmagic. See the attached patch to fix the problem. (I see that there's another LIBS-related patch in this RT queue, but this patch does not help here because .la files are not installed in basic FreeBSD builds). With this patch, all but this test file pass: t/6-oo.................1/20 # Failed test 'MIME t/samples/foo.c' # in t/6-oo.t at line 27. # got: 'text/x-c; charset=us-ascii' # expected: 'text/x-c charset=us-ascii' # Failed test 'MIME data t/samples/foo.c' # in t/6-oo.t at line 36. # got: 'text/x-c; charset=us-ascii' # expected: 'text/x-c charset=us-ascii' # Failed test 'MIME t/samples/foo.foo' # in t/6-oo.t at line 27. # got: 'text/plain; charset=us-ascii' # expected: 'text/plain charset=us-ascii' # Failed test 'MIME data t/samples/foo.foo' # in t/6-oo.t at line 36. # got: 'text/plain; charset=us-ascii' # expected: 'text/plain charset=us-ascii' # Failed test 'MIME t/samples/foo.c' # in t/6-oo.t at line 48. # got: 'text/x-c; charset=us-ascii' # expected: 'text/x-c charset=us-ascii' # Failed test 'MIME data t/samples/foo.c' # in t/6-oo.t at line 57. # got: 'text/x-c; charset=us-ascii' # expected: 'text/x-c charset=us-ascii' # Failed test 'MIME t/samples/foo.foo' # in t/6-oo.t at line 48. # got: 'text/x-foo' # expected: 'text/plain charset=us-ascii' # Failed test 'MIME data t/samples/foo.foo' # in t/6-oo.t at line 57. # got: 'text/x-foo' # expected: 'text/plain charset=us-ascii' # Looks like you failed 8 tests of 20. Regards, Slaven
Subject: file-libmagic-fbsd.patch
diff -up 'build/File-LibMagic-0.88-7yeuFP/Makefile.PL' 'new.build/File-LibMagic-0.88/Makefile.PL' Index: ./Makefile.PL --- ./Makefile.PL Tue Jun 20 09:31:45 2006 +++ ./Makefile.PL Wed Aug 6 00:13:23 2008 @@ -12,7 +12,7 @@ WriteMakefile( 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1 'ABSTRACT_FROM' => 'LibMagic.pm', # retrieve abstract from module 'AUTHOR' => 'Andreas Fitzner <fitzner@informatik.hu-berlin.de>', - 'LIBS' => ['-lmagic'], # e.g., '-lm' + 'LIBS' => ['-lmagic -lz'], # e.g., '-lm' 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING' 'INC' => '-I.', # e.g., '-I. -I/usr/include/other' # Un-comment this if you add C files to link with later:
added the patch