Skip Menu |

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 12673
Status: resolved
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: kane [...] dwim.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.2609
Fixed in: (no value)



Subject: M::B's API is unable to build PathTools, but the command line version can
Hi, I really thought i had reported this before, but i can't find any of it in my mailbox or on RT, so forgive me is this is a duplicate. Module::Build's API seems to not do quite the same thing as it's commandline equivalent. Due to this, the PathTools distribution is uninstallable using M::B's API (using the makefile.PL shipped with it, it works again... odd!) Consider this code: [kane@coke ~...build/PathTools-3.06]$ cat x.pl use Module::Build; warn "Using version: $Module::Build::VERSION\n"; my $mb = eval { Module::Build->new_from_context( %buildflags ) }; $mb->dispatch('build'); Running this makes Cwd not find ppport.h: [kane@coke ~...build/PathTools-3.06]$ perlc x.pl Using version: 0.261 /opt/bin/perl Build.PL Deleting _build Creating custom builder _build/lib/MyModuleBuilder.pm in _build/lib Checking whether your kit is complete... Looks good Deleting Build Removed previous script 'Build' Creating new 'Build' script for 'PathTools' version '3.06' cc -I/opt/lib/perl5/5.8.3/darwin-2level/CORE -c -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Os -o lib/Cwd.o lib/Cwd.c Cwd.xs:5:20: ppport.h: No such file or directory error building .o file from 'lib/Cwd.c' at /opt/lib/perl5/site_perl/5.8.3/Module/Build/Base.pm line 2515. However, if we do the standard command line invocation, it works: [kane@coke ~...build/PathTools-3.06]$ perlc Build.PL; ./Build; Deleting _build Creating custom builder _build/lib/MyModuleBuilder.pm in _build/lib Checking whether your kit is complete... Looks good Deleting Build Removed previous script 'Build' Creating new 'Build' script for 'PathTools' version '3.06' ppport.h -> lib/ppport.h Cwd.pm -> blib/lib/Cwd.pm cc -I/opt/lib/perl5/5.8.3/darwin-2level/CORE -c -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Os -o lib/Cwd.o lib/Cwd.c ExtUtils::Mkbootstrap::Mkbootstrap('lib/Cwd') env MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup -o blib/arch/auto/Cwd/Cwd.bundle lib/Cwd.o Manifying blib/lib/File/Spec/VMS.pm -> blib/libdoc/File::Spec::VMS.3 Manifying blib/lib/File/Spec/Win32.pm -> blib/libdoc/File::Spec::Win32.3 Manifying blib/lib/Cwd.pm -> blib/libdoc/Cwd.3 Manifying blib/lib/File/Spec/Functions.pm -> blib/libdoc/File::Spec::Functions.3 Manifying blib/lib/File/Spec/Unix.pm -> blib/libdoc/File::Spec::Unix.3 Manifying blib/lib/File/Spec/Epoc.pm -> blib/libdoc/File::Spec::Epoc.3 Manifying blib/lib/File/Spec.pm -> blib/libdoc/File::Spec.3 Manifying blib/lib/File/Spec/Mac.pm -> blib/libdoc/File::Spec::Mac.3 Manifying blib/lib/File/Spec/Cygwin.pm -> blib/libdoc/File::Spec::Cygwin.3 Manifying blib/lib/File/Spec/OS2.pm -> blib/libdoc/File::Spec::OS2.3 Here's my perl -V for completeness sake: [kane@coke ~...build/PathTools-3.06]$ perlc -V Summary of my perl5 (revision 5.0 version 8 subversion 3) configuration: Platform: osname=darwin, osvers=7.2.0, archname=darwin-2level uname='darwin coke.xs4all.nl 7.2.0 darwin kernel version 7.2.0: thu dec 11 16:20:23 pst 2003; root:xnuxnu-517.3.7.obj~1release_ppc power macintosh powerpc ' config_args='-Dprefix=/opt -des' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing', optimize='-Os', cppflags='-no-cpp-precomp -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing' ccversion='', gccversion='3.3 20030304 (Apple Computer, Inc. build 1495)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags ='' libpth=/usr/lib libs=-ldbm -ldl -lm -lc perllibs=-ldl -lm -lc libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dyld.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under darwin Compiled at Feb 16 2004 15:14:24 %ENV: PERL5LIB="/sw/lib/perl5:/sw/lib/perl5/darwin:/Users/kane/sources/p4/other/archive-extract/lib:/Users/kane/sources/p4/other/file-fetch/lib:/Users/kane/sources/p4/other/archive-tar-new/lib:/Users/kane/sources/p4/other/carp-trace/lib:/Users/kane/sources/p4/other/log-message/lib:/Users/kane/sources/p4/other/module-load/lib:/Users/kane/sources/p4/other/params-check/lib:/Users/kane/sources/p4/other/qmail-checkpassword/lib:/Users/kane/sources/p4/other/module-load-conditional/lib:/Users/kane/sources/p4/other/term-ui/lib:/Users/kane/sources/p4/other/ipc-cmd/lib:/Users/kane/sources/p4/other/config-auto/lib:/Users/kane/sources/p4/other/object-accessor/lib/" PERL5OPT="" PERL5_CPANPLUS_IS_RUNNING="1866" PERL_READLINE_NOWARN="1" @INC: /sw/lib/perl5 /sw/lib/perl5/darwin /Users/kane/sources/p4/other/archive-extract/lib /Users/kane/sources/p4/other/file-fetch/lib /Users/kane/sources/p4/other/archive-tar-new/lib /Users/kane/sources/p4/other/carp-trace/lib /Users/kane/sources/p4/other/log-message/lib /Users/kane/sources/p4/other/module-load/lib /Users/kane/sources/p4/other/params-check/lib /Users/kane/sources/p4/other/qmail-checkpassword/lib /Users/kane/sources/p4/other/module-load-conditional/lib /Users/kane/sources/p4/other/term-ui/lib /Users/kane/sources/p4/other/ipc-cmd/lib /Users/kane/sources/p4/other/config-auto/lib /Users/kane/sources/p4/other/object-accessor/lib/ /opt/lib/perl5/5.8.3/darwin-2level /opt/lib/perl5/5.8.3 /opt/lib/perl5/site_perl/5.8.3/darwin-2level /opt/lib/perl5/site_perl/5.8.3 /opt/lib/perl5/site_perl . [kane@coke ~...build/PathTools-3.06]$
Seems it was already in this bug report for CPANPLUS: https://rt.cpan.org/Ticket/Display.html?id=11560 And at that time cc'd to the m-b mailing list, but never got sorted...
I believe this is fixed in 0.27_01, right? The next part would be to backport the fix to the 0.26xx series, which would be harder but I think certainly doable. -Ken
[KWILLIAMS - Thu May 5 23:54:11 2005]: Show quoted text
> I believe this is fixed in 0.27_01, right? The next part would be to > backport the fix to the > 0.26xx series, which would be harder but I think certainly doable.
Here are my results with module::build 0.26 (debian default), 0.2610 (latest cpan) and 0.27_01 (latest dev), and the following script: use Module::Build; print "Using: " . $Module::Build::VERSION . $/; my $mb = Module::Build->new_from_context; $mb->dispatch('build'); In short, 0.27_01 failed, but that was due to the new way of handing things with 'eu:: cbuilder' -- after installing that and configuring & building 0.27_01, it compiled correctly. Below is the output from all 4 sessions -- please backport this ASAP or release 0.27. The amounts of failures it's causing and bug reports we're receiving about 'Cwd' and/or 'File:: Spec' not building are extraordinarily large. Thanks. hash:/home/ebroes/.cpanplus/5.8.4/build/PathTools-3.08# perl x.pl Using: 0.26 /usr/bin/perl Build.PL Creating custom builder _build/lib/MyModuleBuilder.pm in _build/lib Checking whether your kit is complete... Looks good Creating new 'Build' script for 'PathTools' version '3.08' lib/File/Spec/OS2.pm -> blib/lib/File/Spec/OS2.pm lib/File/Spec/Mac.pm -> blib/lib/File/Spec/Mac.pm lib/File/Spec/VMS.pm -> blib/lib/File/Spec/VMS.pm lib/File/Spec/Functions.pm -> blib/lib/File/Spec/Functions.pm lib/File/Spec/Epoc.pm -> blib/lib/File/Spec/Epoc.pm lib/File/Spec/Cygwin.pm -> blib/lib/File/Spec/Cygwin.pm lib/File/Spec.pm -> blib/lib/File/Spec.pm lib/File/Spec/Unix.pm -> blib/lib/File/Spec/Unix.pm lib/File/Spec/Win32.pm -> blib/lib/File/Spec/Win32.pm Cwd.xs -> lib/Cwd.xs lib/Cwd.xs -> lib/Cwd.c cc -I/usr/lib/perl/5.8/CORE -fPIC -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -o lib/Cwd.o lib/Cwd.c lib/Cwd.xs:5:20: ppport.h: No such file or directory error building .o file from 'lib/Cwd.c' at /usr/share/perl5/Module/Build/Base.pm line 2455, <File0000> line 472. hash:/home/ebroes/.cpanplus/5.8.4/build/PathTools-3.08# perl -I/home/ebroes/ .cpanplus/5.8.4/build/Module-Build-0.2610/lib x.pl Using: 0.261 /usr/bin/perl -I/home/ebroes/.cpanplus/5.8.4/build/Module-Build-0.2610/lib Build.PL Deleting _build Creating custom builder _build/lib/MyModuleBuilder.pm in _build/lib Checking whether your kit is complete... Looks good Deleting Build Removed previous script 'Build' Creating new 'Build' script for 'PathTools' version '3.08' cc -I/usr/lib/perl/5.8/CORE -fPIC -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -o lib/Cwd.o lib/Cwd.c lib/Cwd.xs:5:20: ppport.h: No such file or directory error building .o file from 'lib/Cwd.c' at /home/ebroes/.cpanplus/5.8.4/build/Module-Build -0.2610/lib/Module/Build/Base.pm line 2515. cd hash:/home/ebroes/.cpanplus/5.8.4/build/PathTools-3.08# perl -I/home/ebroes/ .cpanplus/5.8.4/build/Module-Build-0.27_01/lib x.pl Using: 0.2701 /usr/bin/perl Build.PL Deleting _build Creating custom builder _build/lib/MyModuleBuilder.pm in _build/lib Checking whether your kit is complete... Looks good Deleting Build Removed previous script 'Build' Creating new 'Build' script for 'PathTools' version '3.08' ppport.h -> lib/ppport.h Cwd.pm -> blib/lib/Cwd.pm Module::Build is not configured with C_support at /home/ebroes/.cpanplus/5.8.4/build/ Module-Build-0.27_01/lib/Module/Build/Base.pm line 2642. hash:/home/ebroes/.cpanplus/5.8.4/build/PathTools-3.08# perl -I/home/ebroes/ .cpanplus/5.8.4/build/Module-Build-0.27_01/blib/lib x.pl Using: 0.2701 /usr/bin/perl Build.PL Deleting _build Creating custom builder _build/lib/MyModuleBuilder.pm in _build/lib Checking whether your kit is complete... Looks good Deleting Build Removed previous script 'Build' Creating new 'Build' script for 'PathTools' version '3.08' cc -I/usr/lib/perl/5.8/CORE -fPIC -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -o lib/Cwd.o lib/Cwd.c ExtUtils::Mkbootstrap::Mkbootstrap('lib/Cwd') cc -shared -L/usr/local/lib -o blib/arch/auto/Cwd/Cwd.so lib/Cwd.o Manifying blib/lib/File/Spec/VMS.pm -> blib/libdoc/File::Spec::VMS.3pm Manifying blib/lib/File/Spec/Win32.pm -> blib/libdoc/File::Spec::Win32.3pm Manifying blib/lib/Cwd.pm -> blib/libdoc/Cwd.3pm Manifying blib/lib/File/Spec/Functions.pm -> blib/libdoc/File::Spec::Functions.3pm Manifying blib/lib/File/Spec/Unix.pm -> blib/libdoc/File::Spec::Unix.3pm Manifying blib/lib/File/Spec/Epoc.pm -> blib/libdoc/File::Spec::Epoc.3pm Manifying blib/lib/File/Spec.pm -> blib/libdoc/File::Spec.3pm Manifying blib/lib/File/Spec/Mac.pm -> blib/libdoc/File::Spec::Mac.3pm Manifying blib/lib/File/Spec/OS2.pm -> blib/libdoc/File::Spec::OS2.3pm Manifying blib/lib/File/Spec/Cygwin.pm -> blib/libdoc/File::Spec::Cygwin.3pm
Version 0.2611 has now been released, backporting this fix from the 0.27_xx codeline. Should be fixed there now. -Ken