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/
>
>