Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: mreda [...] mac.com
Cc:
AdminCc:

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



Subject: No way to specify multiple compiler options via extra_compiler_options via the command line
Download (untitled) / with headers
text/plain 1.5k
If I do the following (using the version module from CPAN as my test case): % perl Build.PL extra_compiler_flags="-arch ppc -arch i386" and then try to build: % perl Build cc -I./vutil -I/System/Library/Perl/5.8.6/darwin-thread-multi-2level/CORE -arch ppc -arch i386 -c -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/ usr/local/include -Os -o ./vutil/vutil.o ./vutil/vutil.c cc1: error: unrecognized command line option "-arch ppc -arch i386" What is happening is that the string "-arch ppc -arch i386" is being passed as a single argument to cc which obviously doesn't work. The issue is, as far as I can tell, that '_construct' in Module::Build::Base is doing the following: # Convert to arrays for ('extra_compiler_flags', 'extra_linker_flags') { $p->{$_} = [ $self->split_like_shell($p->{$_}) ] if exists $p->{$_}; } which looks good except that extra_compiler_flags isn't populated until the call to read_config which happens after _construct. If I move that same loop into Module::Build::Base::resume (and initialize $p of course), then it works as expected (I'm not proposing that as a solution necessarily, just using it as indication that this does appear to be the root cause of the problem) I'm aware that I can work around this by modifying Build.PL and passing extra_compiler_flags there but I was trying to make this automated and applicable to multiple modules so being able to control this from the invocation of 'perl Build.PL' would make things much simpler. Occurs with Module::Build-0.28, perl-5.8.6 on MacOS X (10.4.6)
Download (untitled) / with headers
text/plain 179b
Hi Matt, Thanks for the report - your analysis of the situation looks pretty sound, I'll first see if I can add a test case for the problem and then see about fixing it. -Ken
Download (untitled) / with headers
text/plain 274b
On Fri May 12 21:01:28 2006, KWILLIAMS wrote: Show quoted text
> Thanks for the report - your analysis of the situation looks pretty > sound, I'll first see if I can add > a test case for the problem and then see about fixing it.
Hi Matt, Is this fixed in the latest release? Thanks, Eric
This was fixed in 0.2808


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.