Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 67407
Status: open
Priority: 0/
Queue: ExtUtils-MakeMaker

People
Owner: Nobody in particular
Requestors: dci2112 [...] gmail.com
Cc:
AdminCc:

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



Subject: PERL_MM_OPT not honored by subdir Makefile.PL evaluation
Date: Tue, 12 Apr 2011 10:42:17 -0400
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: douglas irvine <dci2112 [...] gmail.com>
I am using perl 5.8.8 on AIX, ExtUtils::MakeMaker 6.56. I am trying to override Cofing.pm values for CC for XML-Parser-2.36 (which has two makefile.PL's, one in the main dir and one in the Expat subdir). The secondary Makefile.PL doesn't honor command line or PERL_MM_OPT arguments. I have tried: export PERL_MM_OPT="CC='xlc_r''" perl Makefile.PL and perl Makefile.PL CC='xlc_r' both set the CC value correctly for the main Makefile but not the secondary. the default compiler from Config.pm is cc_r. It appears MakeMaker doesn't apply the command line / environment var overrides on subdirectory Makefile.PL's. --doug irvine
Subject: Re: [rt.cpan.org #67407] PERL_MM_OPT not honored by subdir Makefile.PL evaluation
Date: Wed, 13 Apr 2011 01:52:28 +1000
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: Michael G Schwern <schwern [...] pobox.com>
On 2011.4.13 12:42 AM, douglas irvine via RT wrote: Show quoted text
> I am using perl 5.8.8 on AIX, ExtUtils::MakeMaker 6.56. I am trying to > override Cofing.pm values for CC for XML-Parser-2.36 (which has two > makefile.PL's, one in the main dir and one in the Expat subdir). The > secondary Makefile.PL doesn't honor command line or PERL_MM_OPT arguments. I > have tried: > > export PERL_MM_OPT="CC='xlc_r''" > perl Makefile.PL > > and > > perl Makefile.PL CC='xlc_r' > > both set the CC value correctly for the main Makefile but not the secondary. > > the default compiler from Config.pm is cc_r. > > It appears MakeMaker doesn't apply the command line / environment var > overrides on subdirectory Makefile.PL's.
Hmm. It seems that sub-Makefile.PLs get slightly different processing and PERL_MM_OPT isn't taken into account. This looks like a mistake right from the beginning. This has been around for 10 years and you're the first to report it, congratulations! http://perl5.git.perl.org/perl.git/commit/2f217c7c33e3b14680f2e1a724b8a463a35767ea I *think* it can just be added into the alternate call to parse_args() in MakeMaker.pm. My only concern is that there might be things in it that have to be transformed before passing along to a child, but that only applies to relative directories and those are going to be trouble anyway. -- 10. Not allowed to purchase anyone's soul on government time. -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army http://skippyslist.com/list/
Subject: Re: [rt.cpan.org #67407] PERL_MM_OPT not honored by subdir Makefile.PL evaluation
Date: Tue, 12 Apr 2011 12:26:29 -0400
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: douglas irvine <dci2112 [...] gmail.com>
Yeah, this looks like an odd situation I unfortunately have to figure out ;-) Definitely not common. I made a mistake in my original report, I was using ExtUtils::MakeMaker 6.31, I am now attempting to build and install 6.56 to see if it still displays the same behavior (I saw a bit in the 6.56 source about trying to pull in args from a PARENT, so I was assuming that was for sub-dir Makefile.PL processing and wanted to give it a whirl. I just looked though and that logic is also in 6.31). In 6.56, the "make test" for t/xs.t fails because the env vars PERL_MM_OPT nor CC are being considered when the XS tests are compiled, so it's still using the broken cc_r compiler rather than the xlc_r compiler on AIX 6.1. ------------------------------------------------------------------------------------------------------------------------------------- # Failed test ' make exited normally' # at t/xs.t line 54. # got: '512' # expected: '0' # cp lib/XS/Test.pm blib/lib/XS/Test.pm # /usr/bin/perl -e 'use ExtUtils::Mksymlists; Mksymlists("NAME" => "XS::Test", "DL_FUNCS" => { }, "FUNCLIST" => [], "DL_VARS" => []);' # /usr/bin/perl /usr/opt/perl5/lib/5.8.8/ExtUtils/xsubpp -typemap /usr/opt/perl5/lib/5.8.8/ExtUtils/typemap Test.xs > Test.xsc && mv Test.xsc Test.c # cc_r -c -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES -qlonglong -O -DVERSION=\"1.01\" -DXS_VERSION=\"1.01\" "-I/usr/opt/perl5/lib/5.8.8/aix-thread-multi/CORE" Test.c # "/usr/include/math.h", line 759.4: 1506-191 (E) The character # is not a valid C source character. # "/usr/include/sys/atomic_op.h", line 121.1: 1506-1419 (W) Pragma mc_func must appear in global scope. # "/usr/include/sys/atomic_op.h", line 121.1: 1506-224 (W) Incorrect pragma ignored. # "/usr/include/sys/atomic_op.h", line 124.1: 1506-1419 (W) Pragma mc_func must appear in global scope. # "/usr/include/sys/atomic_op.h", line 124.1: 1506-224 (W) Incorrect pragma ignored. # "/usr/include/sys/atomic_op.h", line 127.1: 1506-1419 (W) Pragma mc_func must appear in global scope. # "/usr/include/sys/atomic_op.h", line 127.1: 1506-224 (W) Incorrect pragma ignored. # "/usr/include/sys/atomic_op.h", line 130.1: 1506-1419 (W) Pragma mc_func must appear in global scope. # "/usr/include/sys/atomic_op.h", line 130.1: 1506-224 (W) Incorrect pragma ignored. # "/usr/include/sys/atomic_op.h", line 135.23: 1506-045 (W) Undeclared identifier _safe_fetch. # "/usr/include/math.h", line 409.1: 1506-046 (S) Syntax error. # make: 1254-004 The error code from the last command is 1. # ------------------------------------------------------------------------------------------------------------------------------- IBM has really thrown me for a loop with this 6.1 upgrade breaking the cc_r compiler since they ship perl compiled on the prior OS rev that the cc_r compiler worked in. I do not see anyway to override the CC compiler listed Config.pm for the xsubpp calls, so my approach to use PERL_MM_OPT and PERL_MB_OPT and CC env vars to allow me to compile modules with the right compiler eems to be an exercise in futility. I'll just have to make an altered copy of my Config.pm and load it preferentially in my @INC path. At least I found a really obscure bug for MakeMaker out of this... On Tue, Apr 12, 2011 at 11:52 AM, Michael G Schwern via RT < bug-ExtUtils-MakeMaker@rt.cpan.org> wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=67407 > > > On 2011.4.13 12:42 AM, douglas irvine via RT wrote:
> > I am using perl 5.8.8 on AIX, ExtUtils::MakeMaker 6.56. I am trying to > > override Cofing.pm values for CC for XML-Parser-2.36 (which has two > > makefile.PL's, one in the main dir and one in the Expat subdir). The > > secondary Makefile.PL doesn't honor command line or PERL_MM_OPT
> arguments. I
> > have tried: > > > > export PERL_MM_OPT="CC='xlc_r''" > > perl Makefile.PL > > > > and > > > > perl Makefile.PL CC='xlc_r' > > > > both set the CC value correctly for the main Makefile but not the
> secondary.
> > > > the default compiler from Config.pm is cc_r. > > > > It appears MakeMaker doesn't apply the command line / environment var > > overrides on subdirectory Makefile.PL's.
> > Hmm. It seems that sub-Makefile.PLs get slightly different processing and > PERL_MM_OPT isn't taken into account. This looks like a mistake right from > the beginning. This has been around for 10 years and you're the first to > report it, congratulations! > > http://perl5.git.perl.org/perl.git/commit/2f217c7c33e3b14680f2e1a724b8a463a35767ea > > I *think* it can just be added into the alternate call to parse_args() in > MakeMaker.pm. My only concern is that there might be things in it that > have > to be transformed before passing along to a child, but that only applies to > relative directories and those are going to be trouble anyway. > > > -- > 10. Not allowed to purchase anyone's soul on government time. > -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army > http://skippyslist.com/list/ > >
Subject: Re: [rt.cpan.org #67407] PERL_MM_OPT not honored by subdir Makefile.PL evaluation
Date: Wed, 13 Apr 2011 11:19:35 +1000
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: Michael G Schwern <schwern [...] pobox.com>
On 2011.4.13 2:26 AM, douglas irvine via RT wrote: Show quoted text
> Yeah, this looks like an odd situation I unfortunately have to figure out > ;-) Definitely not common. I made a mistake in my original report, I was > using ExtUtils::MakeMaker 6.31, I am now attempting to build and install > 6.56 to see if it still displays the same behavior (I saw a bit in the 6.56 > source about trying to pull in args from a PARENT, so I was assuming that > was for sub-dir Makefile.PL processing and wanted to give it a whirl. I just > looked though and that logic is also in 6.31).
It's a very old bug, and I checked it out against the latest alpha. Show quoted text
> I do not see anyway to override the CC compiler listed Config.pm for the > xsubpp calls, so my approach to use PERL_MM_OPT and PERL_MB_OPT and CC env > vars to allow me to compile modules with the right compiler eems to be an > exercise in futility. I'll just have to make an altered copy of my Config.pm > and load it preferentially in my @INC path.
You should be able to just "perl Makefile.PL CC=blah"... except that's not working either. Now that's just wrong. Try "make CC=whatever"? Show quoted text
> At least I found a really obscure bug for MakeMaker out of this...
Yay...? -- 10. Not allowed to purchase anyone's soul on government time. -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army http://skippyslist.com/list/
Sending the previous mail has failed. Please contact your admin, they can find more details in the logs.
Sending the previous mail has failed. Please contact your admin, they can find more details in the logs.
On Tue Apr 12 21:19:52 2011, schwern@pobox.com wrote: Show quoted text
> >
> > At least I found a really obscure bug for MakeMaker out of this...
> > Yay...? > >
I can confirm this with the Coro module. I have alternate CC,LD, and PREFIX options. I ended up editing the subdirectory Makefile's after 'perl Makefile.PL', but I wonder if it would be better to just first cd to each subdirectory and 'perl Makefile.PL' then remove the 'DIR' option from the parent Makefile.PL.
On Fri Jul 29 16:22:52 2011, DOUGW wrote: Show quoted text
> > I can confirm this with the Coro module. I have alternate CC,LD, and > PREFIX options. I ended up editing the subdirectory Makefile's after > 'perl Makefile.PL', but I wonder if it would be better to just first cd > to each subdirectory and 'perl Makefile.PL' then remove the 'DIR' option > from the parent Makefile.PL.
Ah, the 'simple' workaround is to cd to each subdirectory, do 'perl Makefile.PL', save the Makefile (rename to Makefile.sav), run the parent 'perl Makefile.PL', restore the subdirectory Makefile's, then run 'make'. Yay.