Skip Menu |

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

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

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

Bug Information
Severity: Important
Broken in: 0.95
Fixed in: (no value)



Subject: Devel::CheckLib introduction breaks build on AIX
Since File::LibMagic uses Devel::CheckLib (which seems to be broken), it won't build on AIX: e47e:/opt/room/pkgsrc/devel/p5-File-LibMagic > bmake configure => Bootstrap dependency digest>=20010302: found digest-20080510 => Bootstrap dependency tnftp-[0-9]*: found tnftp-20070806 ===> Checking for vulnerabilities in p5-File-LibMagic-0.96 ===> Configuring for p5-File-LibMagic-0.96 => Checking for portability problems in extracted files Can't link/include 'magic.h', 'magic' e47e:/opt/room/pkgsrc/devel/p5-File-LibMagic > ls -la work/.buildlink/include/ total 0 drwxr-xr-x 2 root system 256 May 30 21:37 . drwxr-xr-x 6 root system 256 May 30 21:37 .. lrwxrwxrwx 1 root system 27 May 30 21:37 magic.h -> /opt/pkgsrc/include/magic.h e47e:/opt/room/pkgsrc/devel/p5-File-LibMagic > ls -la work/.buildlink/lib/ total 8 drwxr-xr-x 3 root system 256 May 30 21:37 . drwxr-xr-x 6 root system 256 May 30 21:37 .. lrwxrwxrwx 1 root system 26 May 30 21:37 libmagic.a -> /opt/pkgsrc/lib/libmagic.a -rw-r--r-- 1 root system 897 May 30 21:37 libmagic.la lrwxrwxrwx 1 root system 27 May 30 21:37 libmagic.so -> /opt/pkgsrc/lib/libmagic.so lrwxrwxrwx 1 root system 29 May 30 21:37 libmagic.so.1 -> /opt/pkgsrc/lib/libmagic.so.1 lrwxrwxrwx 1 root system 33 May 30 21:37 libmagic.so.1.0.0 -> /opt/pkgsrc/lib/libmagic.so.1.0.0 drwxr-xr-x 4 root system 256 May 30 21:37 perl5 e47e:/opt/room/pkgsrc/devel/p5-File-LibMagic > After deleting Devel::CheckLib: e47e:/opt/room/pkgsrc/devel/p5-File-LibMagic > bmake => Bootstrap dependency digest>=20010302: found digest-20080510 => Bootstrap dependency tnftp-[0-9]*: found tnftp-20070806 ===> Checking for vulnerabilities in p5-File-LibMagic-0.96 ===> Creating toolchain wrappers for p5-File-LibMagic-0.96 ===> Configuring for p5-File-LibMagic-0.96 => Checking for portability problems in extracted files Checking if your kit is complete... Looks good Unrecognized argument in LIBS ignored: '-Wl,-rpath,/opt/pkgsrc/lib' Writing Makefile for File::LibMagic ===> Building for p5-File-LibMagic-0.96 cp LibMagic.pm blib/lib/File/LibMagic.pm AutoSplitting blib/lib/File/LibMagic.pm (blib/lib/auto/File/LibMagic) /opt/pkgsrc/bin/perl -e 'use ExtUtils::Mksymlists; Mksymlists("NAME" => "File::LibMagic", "DL_FUNCS" => { }, "FUNCLIST" => [], "DL_VARS" => []);' /opt/pkgsrc/bin/perl /opt/pkgsrc/lib/perl5/vendor_perl/5.10.0/ExtUtils/xsubpp -typemap /opt/pkgsrc/lib/perl5/5.10.0/ExtUtils/typemap LibMagic.xs > LibMagic.xsc && mv LibMagic.xsc LibMagic.c cc_r -q64 -c -I. -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -I/opt/pkgsrc/include -q64 -DUSE_64_BIT_ALL -q64 -q64 -qarch=ppc64 -O2 -qstrict -qcpluscmt -qmaxmem=-1 -qkeyword=inline -I/opt/pkgsrc/include -ma -I/usr/include -I/opt/pkgsrc/include -I/usr/include -DVERSION=\"0.96\" -DXS_VERSION=\"0.96\" "-I/opt/pkgsrc/lib/perl5/5.10.0/powerpc-aix-thread-multi-64all/CORE" LibMagic.c Running Mkbootstrap for File::LibMagic () chmod 644 LibMagic.bs rm -f blib/arch/auto/File/LibMagic/LibMagic.so ld -Wl,-R/opt/pkgsrc/lib -Wl,-R/opt/pkgsrc/lib/perl5/5.10.0/powerpc-aix-thread-multi-64all/CORE -b64 -bhalt:4 -bexpall -G -bnoentry -lpthreads -lc -L/opt/pkgsrc/lib LibMagic.o -L/opt/pkgsrc/lib -L/usr/lib -Wl,-R/opt/pkgsrc/lib -Wl,-rpath,/opt/pkgsrc/lib -Wl,-R/usr/lib -o blib/arch/auto/File/LibMagic/LibMagic.so -L/opt/pkgsrc/lib -L/usr/lib -Wl,-R/opt/pkgsrc/lib -Wl,-R/usr/lib -lmagic -lz chmod 755 blib/arch/auto/File/LibMagic/LibMagic.so cp LibMagic.bs blib/arch/auto/File/LibMagic/LibMagic.bs chmod 644 blib/arch/auto/File/LibMagic/LibMagic.bs Manifying blib/man3/File::LibMagic.3 => Unwrapping files-to-be-installed. e47e:/opt/room/pkgsrc/devel/p5-File-LibMagic > bmake test => Bootstrap dependency digest>=20010302: found digest-20080510 => Bootstrap dependency tnftp-[0-9]*: found tnftp-20070806 ===> Checking for vulnerabilities in p5-File-LibMagic-0.96 ===> Testing for p5-File-LibMagic-0.96 PERL_DL_NONLAZY=1 /opt/pkgsrc/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/1.t .................. ok t/2-easy.t ............. ok t/3-complete-errors.t .. ok t/3-complete.t ......... ok t/4-all.t .............. ok t/6-oo.t ............... ok All tests successful. Files=6, Tests=55, 0 wallclock secs ( 0.07 usr 0.03 sys + 0.26 cusr 0.06 csys = 0.42 CPU) Result: PASS e47e:/opt/room/pkgsrc/devel/p5-File-LibMagic >
On Sat May 30 15:55:22 2009, REHSACK wrote: Show quoted text
> Since File::LibMagic uses Devel::CheckLib (which seems to be broken), it > won't build on AIX:
Is this still happening with the latest version (and is anyone still using AIX)?
On Mon Aug 26 23:02:34 2013, DROLSKY wrote: Show quoted text
> On Sat May 30 15:55:22 2009, REHSACK wrote:
> > Since File::LibMagic uses Devel::CheckLib (which seems to be broken), > > it > > won't build on AIX:
> > Is this still happening with the latest version (and is anyone still > using AIX)?
Only when forced to. I still hate AIX, but when customers have it, we need to work on it. File-LibMagic-0.98-OIvkyB $ perl Makefile.PL Can't link/include C library 'magic.h', 'magic', aborting. File-LibMagic-0.98-OIvkyB $ perl -MV=ExtUtils::MakeMaker,Test::CPAN::Changes,Test::Pod,Carp,Exporter,XSLoader,base,constant,strict,warnings,Test::More,lib ExtUtils::MakeMaker /pro/lib/perl5/site_perl/5.14.2/ExtUtils/MakeMaker.pm: 6.72 /pro/lib/perl5/5.14.2/ExtUtils/MakeMaker.pm: 6.62 Test::CPAN::Changes Not found Test::Pod /pro/lib/perl5/site_perl/5.14.2/Test/Pod.pm: 1.45 Carp /pro/lib/perl5/site_perl/5.14.2/Carp.pm: 1.26 /pro/lib/perl5/5.14.2/Carp.pm: 1.20 Exporter /pro/lib/perl5/5.14.2/Exporter.pm: 5.66 XSLoader /pro/lib/perl5/site_perl/5.14.2/aix-64all/XSLoader.pm: 0.15 /pro/lib/perl5/5.14.2/XSLoader.pm: 0.13 base /pro/lib/perl5/5.14.2/base.pm: 2.18 constant /pro/lib/perl5/5.14.2/constant.pm: 1.21 strict /pro/lib/perl5/5.14.2/strict.pm: 1.04 warnings /pro/lib/perl5/5.14.2/warnings.pm: 1.12 Test::More /pro/lib/perl5/5.14.2/Test/More.pm: 0.98 lib /pro/lib/perl5/5.14.2/aix-64all/lib.pm: 0.63 Devel::CheckLib is not mentioned in META.* File-LibMagic-0.98-OIvkyB $ perl -MV=Devel::CheckLib Devel::CheckLib /pro/lib/perl5/site_perl/5.14.2/Devel/CheckLib.pm: 1.01 My system does not have a magic.h (anywhere)
Subject: Re: [rt.cpan.org #46543] Devel::CheckLib introduction breaks build on AIX
Date: Tue, 27 Aug 2013 09:30:02 -0500 (CDT)
To: "H.Merijn Brand via RT" <bug-File-LibMagic [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Tue, 27 Aug 2013, H.Merijn Brand via RT wrote: Show quoted text
> Devel::CheckLib is not mentioned in META.*
It's included in the distro. Show quoted text
> > File-LibMagic-0.98-OIvkyB $ perl -MV=Devel::CheckLib > Devel::CheckLib > /pro/lib/perl5/site_perl/5.14.2/Devel/CheckLib.pm: 1.01 > > My system does not have a magic.h (anywhere)
Well, there's your problem. You need to have libmagic installed for this module. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
At the moment I don't have access to an AIX box, but that's not the point. I didn't analyse the root cause of the issue, because I always rate blind introduction of gcc style checks as root cause of evilness in OSS development and lack of commercial support for those projects (well: works for me (tm) :P). [09:20am] [Sno]: Tux: can you verify https://rt.cpan.org/Public/Bug/Display.html?id=46543? [09:20am] • [Sno] has no AIX at the moment :( [10:17am] Tux: MATTN/Devel-CheckLib-1.01.tar.gz [10:17am] Tux: /pro/local/bin/make install -- OK [10:28am] Tux: [Sno], additional info posted. I doubt if it is valuable [12:02pm] [Sno]: Tux: the issue was, that File::LibMagic uses Devel::CheckLib (and from somewhere -Wl,-R… was used) [12:02pm] [Sno]: and that will fail nicely with xlc ;) [12:03pm] • Tux will gladly blame AIX/IBM instead of Devel::CheckLib authors :) [12:03pm] Tux: Always easiest to blame IBM or Oracle when *anything* fails [12:08pm] [Sno]: hehe, but using -Wl,-R<rpath> is a bug of either Devel::CheckLib or File::LibMagic [12:09pm] [Sno]: because it's a GCC only flag [12:09pm] [Sno]: neither SunPro nor aCC nor xlc will understand [12:09pm] [Sno]: maybe meanwhile icc, clang of course [12:09pm] [Sno]: but msvc won't either So I checked the "CHANGES" of Devel::CheckLib and detected several fixed for bcc, msvc and sunpro in the last years. But non for xlc, aCC, mipspro, icc, pcc etc. (well, I expect icc. pcc and clang are mostly gcc compatible in calling convention, but finally clang on MacOS X/Darwin won't accept -Wl,-R - it wants ("-Wl,-rpath", "-Wl,$RPATH"). I hope that answeres your question: yes, the issue still remains. Maybe you should switch from Devel::CheckLib to Config::AutoConf - it's less destructive to env and compiler flags ... Also: I'm happy to support further development of Config::AutoConf (for final superseed GNU AutoConf with Config::AutoConf ^^), and not a tiny island. Cheers, Jens
Subject: Re: [rt.cpan.org #46543] Devel::CheckLib introduction breaks build on AIX
Date: Mon, 2 Sep 2013 08:56:49 -0500 (CDT)
To: Jens Rehsack via RT <bug-File-LibMagic [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Mon, 2 Sep 2013, Jens Rehsack via RT wrote: Show quoted text
> At the moment I don't have access to an AIX box, but that's not the > point. I didn't analyse the root cause of the issue, because I always > rate blind introduction of gcc style checks as root cause of evilness in > OSS development and lack of commercial support for those projects (well: > works for me (tm) :P).
The reason these projects don't support commercial compilers is because most developers don't have access to said compilers! I've never used AIX (or HP-UX or any other commercial Unix except Solaris) in my life. I hope I never do ;) Show quoted text
> So I checked the "CHANGES" of Devel::CheckLib and detected several fixed > for bcc, msvc and sunpro in the last years. But non for xlc, aCC, > mipspro, icc, pcc etc. (well, I expect icc. pcc and clang are mostly gcc > compatible in calling convention, but finally clang on MacOS X/Darwin > won't accept -Wl,-R - it wants ("-Wl,-rpath", "-Wl,$RPATH"). > > I hope that answeres your question: yes, the issue still remains. Maybe > you should switch from Devel::CheckLib to Config::AutoConf - it's less > destructive to env and compiler flags ...
Patches are welcome. I just took over this module recently, and I'm not the one who had it use Devel::CheckLib. I've just been trying to get tests to pass for now. -dave
So please let's set the issue to "stalled" and when I find a tuit, I send you a patch for Config::AutoConf. Fine for me. But please don't close it to soon.
On Mon Sep 02 10:00:56 2013, REHSACK wrote: Show quoted text
> So please let's set the issue to "stalled" and when I find a tuit, I > send you a patch for Config::AutoConf. > > Fine for me. But please don't close it to soon.
I'm fine with leaving it as stalled.
I tried to investigate a bit today. On MacOS X I run: $ env CFLAGS="-I/opt/pkg/include" LDFLAGS="-L/opt/pkg/lib" cpan install File::LibMagic CPAN: Storable loaded ok (v2.45) Reading '/Users/sno/.cpan/Metadata' Database was generated on Sun, 22 Sep 2013 02:08:21 GMT Running install for module 'File::LibMagic' Running make for D/DR/DROLSKY/File-LibMagic-1.00.tar.gz CPAN: Digest::SHA loaded ok (v5.85) CPAN: Compress::Zlib loaded ok (v2.062) Checksum for /Users/sno/.cpan/sources/authors/id/D/DR/DROLSKY/File-LibMagic-1.00.tar.gz ok CPAN: File::Temp loaded ok (v0.2301) CPAN: Parse::CPAN::Meta loaded ok (v1.4407) CPAN: CPAN::Meta loaded ok (v2.132620) CPAN: Module::CoreList loaded ok (v2.99) CPAN.pm: Building D/DR/DROLSKY/File-LibMagic-1.00.tar.gz Can't link/include C library 'magic.h', 'magic', aborting. No 'Makefile' createdCPAN: YAML loaded ok (v0.84) DROLSKY/File-LibMagic-1.00.tar.gz /Users/sno/perl5/perlbrew/perls/perl-5.18.1/bin/perl Makefile.PL -- NOT OK Running make test Make had some problems, won't test Running make install Make had some problems, won't install I tried to clone to provide postulated fix using Config::AutoConf: git clone git://github.com/maxmind/File-LibMagic.git Cloning into 'File-LibMagic'... fatal: remote error: Repository not found.