Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: jdhedden [...] 1979.usna.com
Cc:
AdminCc:

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



Subject: 'extra_compiler_flags' not added to compiler command under ActivePerl
Download (untitled) / with headers
text/plain 3.1k
'extra_compiler_flags' not added to compiler command under ActivePerl I have an ActivePerl environment on my PC that uses the following: ActivePerl v5.8.7 Build 813 # Latest version ExtUtils-FakeConfig-0.06 # Allows overriding Config.pm ExtUtils-CBuilder-0.13 ExtUtils-ParseXS-2.12 Module-Build-0.2611 # Tested with both versions Module-Build-0.27_02 # (one at a time, of course) My Build.PL files has the following: 'extra_compiler_flags' => [ '-DVERSION="4.04.00"', '-DXS_VERSION="4.04.00"' ] My module is built using the following commands: set PERL5OPT=-MConfig_m perl Build.PL perl Build However, the 'extra_compiler_flags' are not being added to the compiler command (which subsequently fails): gcc -c -g -O2 -DWIN32 -DPERL_IMPLICIT_CONTEXT -DPERL_MSVCRT_READFIX -DHASATTRIBUTE -g -O2 -I"C:\Perl\lib\CORE" -I"\include" -o "lib\Math\Random\MT\Auto.o" "lib\Math\Random\MT\Auto.c" Both v0.2611 and v0.27_02 produce the same failure. Building with ExtUtils::MakeMaker/Makefile.PL succeeds. In my Cygwin environment, the 'extra_compiler_flags' are added properly: gcc -I/usr/local/lib/perl5/5.8/cygwin/CORE -DVERSION="4.04.00" -DXS_VERSION="4.04.00" -c -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -O3 -pipe -frename-registers -fomit-frame-pointer -march=pentium4 -mfpmath=sse -mmmx -msse -msse2 -o lib/Math/Random/MT/Auto.o lib/Math/Random/MT/Auto.c The contents Config_m.pm are: package Config_m; require ExtUtils::FakeConfig; my $values = <<'EOT'; cc='gcc' ccflags='-g -O2 -DWIN32 -DPERL_IMPLICIT_CONTEXT -DPERL_MSVCRT_READFIX' cccdlflags='-DHASATTRIBUTE' libpth='"(CC)\lib" "(CC)\i386-mingw32msvc\lib"' libs=' -lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lwsock32 -lmpr -lwinmm -lversion -lodbc32' _a='.a' _o='.o' ar='ar' cpp='gcc -E' cppminus='-' cpprun='gcc -E' cppstdin='gcc -E' d_attribut='define' d_casti32='define' i64type='long long' ld='gcc' lddlflags='-mdll -g -L"(PERL)\lib\CORE"' ldflags='-g -L"(PERL)\lib\CORE"' lib_ext='.a' libc='-lmsvcrt' libperl='libperl58.a' longdblsize='12' lseektype='long long' nm='nm' obj_ext='.o' optimize='-g -O2' perlpath='(PERL)\bin'perl.exe' perllibs=' -lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lwsock32 -lmpr -lwinmm -lversion -lodbc32' quadtype='long long' u64type='unsigned long long' uquadtype='unsigned long long' make='dmake' EOT # should these be overridable by the user? my $cc_p = ( ExtUtils::FakeConfig::find_program( 'gcc' ) )[0]; $cc_p || warn "Unable to find compiler 'gcc'"; $cc_p =~ s/[\\\/]bin[\\\/]?$//; my %values = ( CC => $cc_p, PERL => $Config::Config{prefix} ); $values =~ s/\((\w+)\)/$values{$1}/ge; my @arr = $values =~ m/^(\w+)\=[\'\"](.+)[\'\"]$/mg; eval 'use ExtUtils::FakeConfig @arr'; 1; # EOF
Download (untitled) / with headers
text/plain 437b
Yeah, in fact I just noticed this myself the other day and fixed it. They simply aren't being passed along to ExtUtils::CBuilder in the 0.27_xx development series. I'm guessing your cygwin environment is using the 0.26xx stable series, where this works fine. Thanks, by the way, for all your bug reports. I'm hoping to release 0.27_03 soon, aiming toward a 0.2801 release, so I'm trying to make my way through your issues. -Ken
Download (untitled) / with headers
text/plain 451b
On Mon Aug 29 22:42:57 2005, KWILLIAMS wrote: Show quoted text
> Yeah, in fact I just noticed this myself the other day and fixed it. > They simply aren't being > passed along to ExtUtils::CBuilder in the 0.27_xx development series. > I'm guessing your > cygwin environment is using the 0.26xx stable series, where this works > fine.
Think we need to reopen this one. ExtUtils::CBuilder::Platform::Win32::compile() doesn't use the extra_compiler_flags from %args.
This is fixed in EU::CBuilder 0.22, per its Changes file.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.