Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power

 View Only
  • 1.  perl-5.30.3 fails to build with gcc

    Posted Fri August 14, 2020 12:26 PM
    Hi!

    I'm trying to build a more recent version of perl (5.30.3) on AIX 7.1
    with gcc 8.3.0. Here's the error...

    Running Mkbootstrap for FastCalc ()
    chmod 644 "FastCalc.bs"
    gcc -maix64 -c -D_THREAD_SAFE -O2 -D_REENTRANT -I/usr/include
    -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN
    -DNEED_PTHREAD_INIT -fwrapv -fno-strict-aliasing -pipe -maix64
    -DUSE_64_BIT_ALL -D_FORTIFY_SOURCE=2 -Wall
    -Werror=declaration-after-statement -Werror=pointer-arith -Wextra
    -Wc++-compat -Wwrite-strings -O2 -D_REENTRANT -I/usr/include
    -DVERSION=\"0.5008\" -DXS_VERSION=\"0.5008\" "-I../.." FastCalc.c
    /opt/pkg/obj/lang/perl5/work/perl-5.30.3/cpan/Math-BigInt-FastCalc/../../miniperl
    "-I../../lib" -MExtUtils::Command::MM -e 'cp_nonempty' -- FastCalc.bs
    ../../lib/auto/Math/BigInt/FastCalc/FastCalc.bs 644
    rm -f ../../lib/auto/Math/BigInt/FastCalc/FastCalc.so
    gcc -maix64
    -Wl,-R/opt/pkg/lib/perl5/5.30.0/powerpc64-aix-thread-multi-64all/CORE
    -Wl,-b64 -Wl,-bhalt:4 -Wl,-G -Wl,-bI:../../perl.exp -Wl,-bnoentry
    -lpthreads -lc -lm -L/usr/lib -Wl,-R/usr/lib -Wl,-R/opt/pkg/lib
    -Wl,-bE:FastCalc.exp FastCalc.o -o
    ../../lib/auto/Math/BigInt/FastCalc/FastCalc.so
    ld: 0706-027 The -R
    /opt/pkg/lib/perl5/5.30.0/powerpc64-aix-thread-multi-64all/CORE flag is
    ignored.
    ld: 0706-027 The -R /opt/pkg/lib flag is ignored.
    ld: 0706-027 The -R
    /opt/pkg/lib/perl5/5.30.0/powerpc64-aix-thread-multi-64all/CORE flag is
    ignored.
    ld: 0706-027 The -R /opt/pkg/lib flag is ignored.
    chmod 755 ../../lib/auto/Math/BigInt/FastCalc/FastCalc.so
    LIBPATH=/opt/pkg/obj/lang/perl5/work/perl-5.30.3 ./perl -Ilib -I. -f
    pod/buildtoc -q
    Illegal instruction
    *** [pod/perltoc.pod] Error code 132


    Any help on this would be great. Thanks,


    --
    Louis
    #AIXOpenSource


  • 2.  RE: perl-5.30.3 fails to build with gcc

    Posted Mon August 17, 2020 03:46 AM
    this is totally redundant as perl 5.30.2 is already in the repos.

    ------------------------------
    I regret starting this entire conversation
    ------------------------------



  • 3.  RE: perl-5.30.3 fails to build with gcc

    Posted Mon August 17, 2020 07:55 AM
    How are you building ? 
    May be you look at the SPEC file of Perl 5.30.2 to see if you are using flags correctly.
    https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/SPECS/perl-5.30.2-1.spec

    Another thing you can try get the srpm of 5.30.2 and download 5.30.3 version in SOURCE to build
    https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/SRPMS/perl/perl-5.30.2-1.src.rpm

    Here is the guide to build rpm from srpm on AIX
    https://developer.ibm.com/technologies/systems/articles/au-aix-build-open-source-rpm-packages/


    ------------------------------
    SANKET RATHI
    ------------------------------



  • 4.  RE: perl-5.30.3 fails to build with gcc

    Posted Mon August 17, 2020 05:44 PM
    Hi Sanket - Thank you for the links!

    The perl SRPM I had looked at before was configured to build with xlC,
    but this one uses gcc and looks like what I need.

    I am using the "pkgsrc" framework from NetBSD for building.

    Thanks again. I'll let you know if it works.

    --
    Louis


    > SANKET RATHI, Aug 17, 2020 7:55 AM:
    > How are you building ?
    > May be you look at the SPEC file of Perl 5.30.2 to see if you are using flags correctly.
    > public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/SPECS/...
    >
    > Another thing you can try get the srpm of 5.30.2 and download 5.30.3 version in SOURCE to build
    > public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/SRPMS/...
    >
    > Here is the guide to build rpm from srpm on AIX
    > developer.ibm.com/technologies/systems/articles/...




  • 5.  RE: perl-5.30.3 fails to build with gcc

    Posted Fri September 18, 2020 10:32 AM
    Hi,

    Looks like I have a core dump from this. It seems that the /usr/ccs/lib/libdl.a doesn't have a shr_64.o in it and that's what perl's looking for. What am I missing?

    --
    Louis


    # gdb ./perl core
    GNU gdb (GDB) 8.1.1

    .....

    Reading symbols from ./perl...done.

    warning: core file may not match specified executable file.
    BFD: BFD (GNU Binutils) 2.29.51 assertion fail format.c:453

    warning: "/usr/lib/libdl.a": member "shr_64.o" missing.
    BFD: BFD (GNU Binutils) 2.29.51 assertion fail format.c:453

    warning: "/usr/lib/libbind.a": member "shr_64.o" missing.

    warning: Could not load shared library symbols for 2 libraries, e.g. /usr/lib/libdl.a(shr_64.o).
    Use the "info sharedlibrary" command to see the complete listing.
    Do you need "set solib-search-path" or "set sysroot"?
    [New Thread 1]
    Core was generated by `perl'.
    Program terminated with signal SIGILL, Illegal instruction.
    #0 0x0000000000000000 in ?? ()

    (gdb) info sharedlibrary
    From To Syms Read Shared Object Library
    0x09fffffff0001000 0x09fffffff000fa7e Yes (*) /usr/ccs/bin/usla64
    0x090000000eea3240 0x090000000eea6f44 Yes lib/auto/Cwd/Cwd.so
    0x0900000010aff000 0x0900000010b36ce0 Yes (*) /usr/lib/libC.a(ansicore_64.o)
    0x09000000105abe00 0x0900000010611715 Yes (*) /usr/lib/libC.a(shrcore_64.o)
    0x0900000000473680 0x0900000000473e46 Yes (*) /usr/lib/libc.a(pse_64.o)
    No /usr/lib/libdl.a(shr_64.o)
    No /usr/lib/libbind.a(shr_64.o)
    0x0900000010ae69f0 0x0900000010afd939 Yes /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8.3.0/ppc64/libgcc_s.a(shr.o)
    0x090000000104f818 0x090000000105006c Yes (*) /usr/lib/libC.a(shr2_64.o)
    0x090000000339a9f8 0x090000000339b233 Yes (*) /usr/lib/libC.a(shr3_64.o)
    0x0900000000c7d200 0x0900000000c8767e Yes (*) /usr/lib/libtli.a(shr_64.o)
    0x09000000004de580 0x09000000004e2deb Yes (*) /usr/lib/libthread.a(shr_64.o)
    0x0900000000470600 0x0900000000470f43 Yes (*) /usr/lib/libcrypt.a(shr_64.o)
    0x0900000014960300 0x0900000014d0f12c Yes (*) /opt/pkg/obj/lang/perl5/work/perl-5.32.0/libperl.a(libperl.o)
    0x090000000235cd80 0x09000000023fe10c Yes (*) /usr/lib/libnsl.a(shr_64.o)
    0x090000000051a200 0x090000000055cc17 Yes (*) /usr/lib/libpthreads.a(shr_xpg5_64.o)
    0x0900000000000780 0x090000000044acff Yes (*) /usr/lib/libc.a(shr_64.o)
    (*): Shared library is missing debugging information.
    (gdb)

    ------------------------------
    Louis Guillaume
    ------------------------------



  • 6.  RE: perl-5.30.3 fails to build with gcc

    Posted Fri September 18, 2020 10:51 AM
    " member "shr_64.o" missing " is a misleading warning from gdb. That is not the real problem here.
    You should be having the shared objects.

    You need to check the stack trace and see what is the real problem. 


    ------------------------------
    Ayappan P
    ------------------------------



  • 7.  RE: perl-5.30.3 fails to build with gcc

    Posted Fri September 18, 2020 01:45 PM
    Thanks Ayappan. Here is the backtrace... not sure what to do next.

    [New Thread 1]
    Core was generated by `perl'.
    Program terminated with signal SIGILL, Illegal instruction.
    #0 0x0000000000000000 in ?? ()
    [Current thread is 1 (process 1)]
    (gdb) bt
    #0 0x0000000000000000 in ?? ()
    #1 0x090000000eea5948 in boot_Cwd () from lib/auto/Cwd/Cwd.so
    #2 0x0900000014ab96e4 in Perl_pp_entersub () from /opt/pkg/obj/lang/perl5/work/perl-5.32.0/libperl.a(libperl.o)
    #3 0x0900000014b1c4dc in Perl_runops_standard () from /opt/pkg/obj/lang/perl5/work/perl-5.32.0/libperl.a(libperl.o)
    #4 0x0900000014a672bc in Perl_call_sv () from /opt/pkg/obj/lang/perl5/work/perl-5.32.0/libperl.a(libperl.o)
    #5 0x0900000014a6a68c in Perl_call_list () from /opt/pkg/obj/lang/perl5/work/perl-5.32.0/libperl.a(libperl.o)
    #6 0x09000000149e7784 in S_process_special_blocks.isra.22 () from /opt/pkg/obj/lang/perl5/work/perl-5.32.0/libperl.a(libperl.o)
    #7 0x0900000014a0aedc in Perl_newATTRSUB_x () from /opt/pkg/obj/lang/perl5/work/perl-5.32.0/libperl.a(libperl.o)
    #8 0x0900000014a0edf4 in Perl_utilize () from /opt/pkg/obj/lang/perl5/work/perl-5.32.0/libperl.a(libperl.o)
    #9 0x0900000014a888b0 in Perl_yyparse () from /opt/pkg/obj/lang/perl5/work/perl-5.32.0/libperl.a(libperl.o)
    #10 0x0900000014a73aec in S_doeval_compile () from /opt/pkg/obj/lang/perl5/work/perl-5.32.0/libperl.a(libperl.o)
    #11 0x0900000014a75368 in Perl_pp_require () from /opt/pkg/obj/lang/perl5/work/perl-5.32.0/libperl.a(libperl.o)
    #12 0x0900000014b1c4dc in Perl_runops_standard () from /opt/pkg/obj/lang/perl5/work/perl-5.32.0/libperl.a(libperl.o)
    #13 0x0900000014a672bc in Perl_call_sv () from /opt/pkg/obj/lang/perl5/work/perl-5.32.0/libperl.a(libperl.o)
    #14 0x0900000014a6a68c in Perl_call_list () from /opt/pkg/obj/lang/perl5/work/perl-5.32.0/libperl.a(libperl.o)
    #15 0x09000000149e7784 in S_process_special_blocks.isra.22 () from /opt/pkg/obj/lang/perl5/work/perl-5.32.0/libperl.a(libperl.o)
    #16 0x0900000014a0aedc in Perl_newATTRSUB_x () from /opt/pkg/obj/lang/perl5/work/perl-5.32.0/libperl.a(libperl.o)
    #17 0x0900000014a0edf4 in Perl_utilize () from /opt/pkg/obj/lang/perl5/work/perl-5.32.0/libperl.a(libperl.o)
    #18 0x0900000014a888b0 in Perl_yyparse () from /opt/pkg/obj/lang/perl5/work/perl-5.32.0/libperl.a(libperl.o)
    #19 0x0900000014a6fe98 in perl_parse () from /opt/pkg/obj/lang/perl5/work/perl-5.32.0/libperl.a(libperl.o)
    #20 0x00000001000005c8 in main ()


    ------------------------------
    Louis Guillaume
    ------------------------------



  • 8.  RE: perl-5.30.3 fails to build with gcc

    Posted Fri September 18, 2020 01:53 PM
    Here's some more info about Cwd.so...

    # ldd lib/auto/Cwd/Cwd.so
    lib/auto/Cwd/Cwd.so needs:
    /usr/lib/libc.a(shr_64.o)
    /unix
    /usr/lib/libcrypt.a(shr_64.o)
    # ar tv /usr/lib/libc.a shr_64.o
    ar: 0707-109 Member name shr_64.o does not exist.
    # ar tv /usr/lib/libcrypt.a shr_64.o
    ar: 0707-109 Member name shr_64.o does not exist.


    ------------------------------
    Louis Guillaume
    ------------------------------