develooper Front page | perl.perl5.porters | Postings from September 2017

[perl #132178] Perl 5.24.0: AIX compile error

Thread Next
From:
James E Keenan via RT
Date:
September 29, 2017 13:30
Subject:
[perl #132178] Perl 5.24.0: AIX compile error
Message ID:
rt-4.0.24-15870-1506691840-833.132178-15-0@perl.org
On Fri, 29 Sep 2017 07:26:18 GMT, Christian.Tremel@itsv.at wrote:
> Am Thu, 28 Sep 2017 19:53:58 -0700, jkeenan schrieb:
> > On Thu, 28 Sep 2017 12:44:33 GMT, Christian.Tremel@itsv.at wrote:
> > > i am in the process of doing a gcc build of Perl 5.24.0, but it
> > > wont
> > > let me through. A build with IBM's native xlc compiler is going
> > > well,
> > > but in this case gcc is necessary to not break the AIX freeware
> > > tree.
> > >
> > > here ist the error in his full glory.
> > >
> > > + make
> > >
> > > echo @`sh  cflags "optimize='-O2 -g '" opmini.o`  -DPERL_IS_MI
> > >
> > > +NIPERL -DPERL_EXTERNAL_GLOB opmini.c
> > >
> > > @/usr/bin/gcc -maix32 -maix32 -c -DPERL_CORE -D_THREAD_SAFE
> > > -D_ALL_SOU
> > >
> > > +RCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN
> > > -DNEED_PTHRE
> > >
> > > +AD_INIT -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include
> > > -D_LA
> > >
> > > +RGE_FILES -O2 -g -Wall -DPERL_IS_MINIPERL -DPERL_EXTERNAL_GLOB
> > > opmini
> > >
> > > +.c
> > >
> > > In file included from op.h:636:0,
> > >
> > > from perl.h:3903,
> > >
> > > from op.c:103:
> > >
> > > reentr.h:719:14: error: field '_spent_struct' has incomplete type
> > >
> > > struct spwd _spent_struct;
> > >
> > > ^~~~~~~~~~~~~
> > >
> > > make: The error code from the last command is 1.
> > >
> > > [download]<http://www.perlmonks.org/?node_id=1200254;displaytype=displaycode;part=1;abspart=1>
> > >
> > > the configure options
> > >
> > > export OBJECT_MODE=32
> > >
> > > export CC='/usr/bin/gcc -maix32'
> > >
> > > export LDFLAGS="-s -Wl,-bmaxdata:0x80000000 -L/opt/freeware/lib
> > > -L/usr
> > >
> > > +/lib"
> > >
> > > ./Configure -desr -Doptimize="$RPM_OPT_FLAGS" \
> > >
> > > -d \
> > >
> > > -Dcc="$CC" -Dldflags="$LDFLAGS" \
> > >
> > > -Dinstallprefix=$RPM_BUILD_ROOT%{_prefix} \
> > >
> > > -Dprefix=%{_prefix} \
> > >
> > > -Duselargefiles \
> > >
> > > -Duseshrplib \
> > >
> > > -Dusethreads \
> > >
> > > -Darchname=%{_arch}-%{_os} \
> > >
> > > -A define:ld='/usr/bin/gcc -maix32' \
> > >
> > > -A define:ccdlflags='-brtl -bdynamic' \
> > >
> > > -A define:lddlflags='-bexpall -G -L/opt/freeware/lib'
> > >
> > >
> > >
> > > make
> > >
> > > #make test
> > >
> > > ( make -k check || true )
> > >
> > >
> > >
> > > # build 64bit mode
> > >
> > > export OBJECT_MODE=64
> > >
> > > cd 64bit
> > >
> > > export CC='/usr/bin/gcc -maix64'
> > >
> > > export LDFLAGS="-s -Wl,-bmaxdata:0x80000000 -L/opt/freeware/lib64
> > > -L/u
> > >
> > > +sr/lib64 -L/opt/freeware/lib"
> > >
> > >
> > >
> > > ./Configure -desr -Doptimize="$RPM_OPT_FLAGS" \
> > >
> > > -d \
> > >
> > > -Dcc="$CC" -Dldflags="$LDFLAGS" \
> > >
> > > -Dinstallprefix=$RPM_BUILD_ROOT%{_prefix} \
> > >
> > > -Dprefix=%{_prefix} \
> > >
> > > -Duselargefiles \
> > >
> > > -Duseshrplib \
> > >
> > > -Dusethreads \
> > >
> > > -Duse64bitall \
> > >
> > > -Darchname=%{_arch}-%{_os} \
> > >
> > > -A define:ld='/usr/bin/gcc -maix64' \
> > >
> > > -A define:ccdlflags='-brtl -bdynamic' \
> > >
> > > -A define:lddlflags='-bexpall -G -L/opt/freeware/lib64  -L/usr
> > >
> > > +/lib64 -L/opt/freeware/lib'
> > >
> > >
> >
> > We support AIX, but it is certainly one of our less well-understood
> > platforms.  We're only getting smoke testing reports for AIX on PPC
> > and each of those reports is a FAIL.
> >
> > Just so you know the limits of our ability to help you ... ;-)
> >
> > In situations like this it is often helpful to configure perl with a
> > very limited set of command-line switches and seeing whether 'make'
> > and 'make test' pass with those switches; then add options until you
> > get significant breakage.
> >
> > You have submitted reports for 2 builds, AFAICT: a 32-bit build and a
> > 64-bit build.  For heuristic purposes I recommend you select the 64-
> > bit configuration, then configure with something as simple as this:
> >
> > #####
> > $> sh ./Configure -des -Dusedevel
> > #####
> >
> > Does 'make' finish successfully with that?  How about 'make test' or
> > 'make test_harness'?  If they PASS, add command-line switches to
> > ./Configure one at a time until you get failures during either 'make'
> > or 'make test'.  Report back to us what works and what does not.
> >
> > Thank you very much.
> 
> i tried it with a limited set of options.
> 
> <code>
> root@aixbuildhost: /opt/freeware/src/packages/BUILD/perl-5.24.0/64bit
> # cat gcc_test.sh
> #!/usr/bin/ksh
> 
> make clean
> make distclean
> 
> export OBJECT_MODE=64
> 
> 
> export CC='/usr/bin/gcc -maix64'
> 
> export LDFLAGS="-s -Wl,-bmaxdata:0x80000000 -L/opt/freeware/lib64
> -L/usr/lib64 -L/opt/freeware/lib -lpthreads"
> 
> ./Configure -des -Dusedevel -Dcc="$CC" -Dldflags="$LDFLAGS"
> -Dusethreads
> 
> </code>
> 
> after running for a while it stops with the following...
> 
> <code>
>          ./miniperl -Ilib make_ext.pl lib/auto/Time/HiRes/HiRes.so
> MAKE="make" LIBPERL_A=libperl.a LINKTYPE=dynamic
> Makefile.PL: The "xdefine" exists, skipping the configure step.
> ("../../miniperl Makefile.PL --configure" to force the configure step)
> Warning: No Makefile!
> make: Cannot find a rule to create target all from dependencies.
> Stop.
> make: Cannot find a rule to create target all from dependencies.
> Stop.
> Unsuccessful make(dist/Time-HiRes): code=512 at make_ext.pl line 569.
> make: The error code from the last command is 2.
> 
> 
> Stop.
> 
> </code>

A couple of observations (none of which will solve your original problem):

1. From your code samples I infer that you are trying to build perl-5.24.0, presumably from a tarball -- i.e., not from a git checkout.  Correct?  If so, then be sure to call:

#####
$> make veryclean
#####

... after each attempt at building so that you clean out files created by that attempt.  This *may* eliminate these lines of output, which I suspect are not relevant to the problem:

#####
Makefile.PL: The "xdefine" exists, skipping the configure step.
> ("../../miniperl Makefile.PL --configure" to force the configure step)
#####

2. This is a good news/bad news situation.

On the one hand, you got much farther in the 'make' process than you did with your original set of ./Configure command-line switches.  In particular, you were able to build the 'miniperl' executable which is used to bootstrap later stages of 'make'.  That suggests that something in the original switches is posing problems early in 'make', i.e., at the compilation of opmini.c.

On the other hand, 'make' failed during the compilation of the Time-HiRes library which is distributed along with the Perl 5 core.  I don't yet see the reason why -- it may be something we don't know about AIX -- so here's where we'll have to hope that other readers of the list can help.

Thank you very much.

-- 
James E Keenan (jkeenan@cpan.org)

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=132178

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About