Menu

aix (round 2) compile issue

Josh Fox
2020-11-23
2020-12-16
  • Josh Fox

    Josh Fox - 2020-11-23

    Hi all,

    I worked on compiling 3.0-rc1 on AIX 7.1 last year and with help from @sf-mensch
    Now I need to get this working on AIX 7.2 - but I'm having issues.

    Short version, I have GCC 4.9.4 from perlz installed with all dependencies. My configure command works but I get a failure during make. (I am using gmake) I have attached config.log as well as the output of make -bnoquiet.

    This is the configure command I used

    ./configure --disable-rpath --without-db "CFLAGS=-Wno-attributes -maix64 -mcmodel=large" "LDFLAGS=-maix64 -ldl" CXXFLAGS="-m64" --enable-debug MAKE=gmake
    

    Thanks in advance for any help!

     
  • Josh Fox

    Josh Fox - 2020-11-23

    Whoops, didn't actually upload config.log
    I should also add, I've tried this with 3.0-rc1 as well as 3.1-rc1, attached output is from 3.1-rc1

     

    Last edit: Josh Fox 2020-11-23
  • thomas

    thomas - 2020-11-24

    I think you're missing dependencies

    HELP2MAN='${SHELL} /opt/cobol/gnucobol-3.1-rc1/build_aux/missing help2man'
    

    You must install help2man

    also add this during your config --without-cjson --without-xml2

    AUTOCONF='${SHELL} /opt/cobol/gnucobol-3.1-rc1/build_aux/missing autoconf'
    AUTOHEADER='${SHELL} /opt/cobol/gnucobol-3.1-rc1/build_aux/missing autoheader'
    AUTOMAKE='${SHELL} /opt/cobol/gnucobol-3.1-rc1/build_aux/missing automake-1.16'
    

    you'll need the autoconf package. While doing that, autotools, automake, autopoint, libtool

     
    • Simon Sobisch

      Simon Sobisch - 2020-11-24

      help2man, bison, autotools and friends are only needed when building from a VCS snapshot, not from a tarball. It is fine that those are missing.

      In general configure checks for working dependencies and either creates an error (if mandatory) or disables the feature (if optional), so -without is normally not needed for a local build.
      If you don't explicit want to check for an optional item (like "error if missing") there's no need to explicit specify --with either.

      bdb is the sole exemption (mainly for historic reasons) which will behave identical in the next major version update (4.x) [instead a clear warning will be raised if no working INDEXED handler is found].

      Concerning cjson: as it is a very easy drop-in option one may consider downloading the two source files and copy them to the "libcob" folder before running configure.

      https://raw.githubusercontent.com/DaveGamble/cJSON/v1.7.14/cJSON.c
      https://raw.githubusercontent.com/DaveGamble/cJSON/v1.7.14/cJSON.h

       
  • Simon Sobisch

    Simon Sobisch - 2020-11-24

    Hm, that looks a bit weird. Before we look too much - can you please recheck if this also happens with the current development snapshot? You can try the one from view hours ago

     

    Last edit: Simon Sobisch 2020-11-24
  • Josh Fox

    Josh Fox - 2020-11-24

    Hi @sf-mensch

    I just tried with the dev tarball and received a similar error regarding __cxa_finalize

    ld: 0711-317 ERROR: Undefined symbol: .__cxa_finalize
    ld: 0711-317 ERROR: Undefined symbol: .__register_frame_info_table
    ld: 0711-317 ERROR: Undefined symbol: .__deregister_frame_info
    ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
    collect2: error: ld returned 8 exit status
    gmake: *** [Makefile:554: libcob.la] Error 1
    make: 1254-004 The error code from the last command is 1.

    I am also attaching config.log for 3.1.1-dev

    Thanks,
    Josh

     
  • Simon Sobisch

    Simon Sobisch - 2020-11-24

    That's interesting!
    The part that is raising that error is "ld". you likely can do as it requests by:

    gmake -C libcob LDFLAGS="-maix64 -ldl -bnoquiet"
    

    = run make in the directory libcob and use special LDFLAGS (I've used the one in your config.log + requested one)

     
  • Simon Sobisch

    Simon Sobisch - 2020-11-24

    Note: the CXXFLAGS specified are not taken up as those are the flags for C++.
    You may want to recheck what we did last time (and possibly drop a link here).

     
  • Josh Fox

    Josh Fox - 2020-11-24

    When I issued that shorted make in libcob directory it immediately fails with this:
    gmake: *** libcob: A file or directory in the path name does not exist.. Stop.

    Here is the original configure command we used on the prior aix server, which was consequently aix 7.1

    ./configure --disable-rpath --without-db "CFLAGS=-Wno-attributes -maix64 -mcmodel=large" "LDFLAGS=-maix64 -ldl -L/opt/freeware/lib/" "LDLIBS=-lm" CXXFLAGS="-m64" --enable-debug MAKE=gmake
    
     
    • Simon Sobisch

      Simon Sobisch - 2020-11-24

      OK, we just ignore CXXFLAGS then...

      Concerning the error for the shortened version please retry with

      cd libcob
      gmake LDFLAGS="-maix64 -ldl -bnoquiet"
      

      Simon

       
      • Josh Fox

        Josh Fox - 2020-11-24

        When I reran from inside libcob directory without the -C flag it runs a little longer but the initial error still occurs:

        /bin/sh ../libtool  --tag=CC   --mode=link gcc -std=gnu99  -Wno-attributes -maix64 -mcmodel=large -O0 -ggdb3 -fasynchronous-unwind-tables -pipe  -version-info 4:0:0 -no-undefined -maix64 -ldl -bnoquiet -o libcob.la -rpath /usr/local/lib common.lo move.lo numeric.lo strings.lo fileio.lo call.lo intrinsic.lo termio.lo screenio.lo reportio.lo cobgetopt.lo mlio.lo  -lm -lgmp -lcurses -lintl
        libtool: link: rm -fr  .libs/libcob.a.d .libs/libcob.exp
        libtool: link: `func_echo_all /usr/ccs/bin/nm -X64 -B | /usr/bin/sed -e 's/B\([^B]*\)$/P\1/'` -PCpgl  .libs/common.o .libs/move.o .libs/numeric.o .libs/strings.o .libs/fileio.o .libs/call.o .libs/intrinsic.o .libs/termio.o .libs/screenio.o .libs/reportio.o .libs/cobgetopt.o .libs/mlio.o   | awk '{ if ((($ 2 == "T") || ($ 2 == "D") || ($ 2 == "B") || ($ 2 == "W") || ($ 2 == "V") || ($ 2 == "Z")) && (substr($ 1,1,1) != ".")) { if (($ 2 == "W") || ($ 2 == "V") || ($ 2 == "Z")) { print $ 1 " weak" } else { print $ 1 } } }' | sort -u > .libs/libcob.exp
        libtool: link: rm -f -r .libs/libcob.a.d
        libtool: link: mkdir .libs/libcob.a.d
        libtool: link: gcc -std=gnu99 -shared -o .libs/libcob.a.d/libcob.so.4  .libs/common.o .libs/move.o .libs/numeric.o .libs/strings.o .libs/fileio.o .libs/call.o .libs/intrinsic.o .libs/termio.o .libs/screenio.o .libs/reportio.o .libs/cobgetopt.o .libs/mlio.o   -Wl,-blibpath:/opt/freeware/lib:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/4.9.4/ppc64:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/4.9.4:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/4.9.4/../../..:/usr/lib:/lib -ldl -lm -lgmp -lcurses -L/opt/freeware/lib -lintl -liconv -lc -Wl,-bnoentry `func_echo_all " -maix64 -mcmodel=large -O0 -ggdb3 -maix64   " | /usr/bin/sed -e "s%-brtl\\([, ]\\)%-berok\\1%g"`-Wl,-bE:.libs/libcob.exp -Wl,-bernotok
        ld: 0711-317 ERROR: Undefined symbol: .__cxa_finalize
        ld: 0711-317 ERROR: Undefined symbol: .__register_frame_info_table
        ld: 0711-317 ERROR: Undefined symbol: .__deregister_frame_info
        ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
        collect2: error: ld returned 8 exit status
        gmake: *** [Makefile:554: libcob.la] Error 1
        

        Josh

         
        • Simon Sobisch

          Simon Sobisch - 2020-12-16

          This SO question suggests that maybe the wrong C library is used (bad setup?).

          There's one thing I can suggest because that helped me on AIX once, too.
          If it is possible: download, unpack, configure and make GMP.
          There are two benefits in doing this:
          1. if you install this you likely have a better math performance in GnuCOBOL afterwards
          2. you can inspect the CPPFLAGS/LDFLAGS that are auto-added by GMP and try to use the same for GnuCOBOL (GMP's configure "guesses" better).

           
      • Josh Fox

        Josh Fox - 2020-12-16

        Hi Simon,
        Have you had any chance to review my issue?

        Thank you,
        Josh

         

Anonymous
Anonymous

Add attachments
Cancel