Menu

#103 Problems building on AIX 6.1

all
open
nobody
build (1) aix (1)
5
2015-02-20
2013-05-07
No

Trying to build xmlstarlet-1.4.2 on AIX 6.1 using gcc-4.2.0. I have previously built and installed libxml2-2.9.1 and libxslt-1.1.28. configure seems to work fine. When I run make, I get the following output:

        make  all-am
  CC     src/trans.o
In file included from /opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/4.2.0/include/stdio.h:430,
                 from /usr/local/include/libxml2/libxml/xmlmemory.h:15,
                 from src/trans.h:32,
                 from src/trans.c:4:
/opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/4.2.0/include/sys/types.h:273: error: two or more data types in declaration specifiers
make: 1254-004 The error code from the last command is 1.


Stop.
make: 1254-004 The error code from the last command is 2.


Stop.

I have examined /opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/4.2.0/include/sys/types.h and line 273 looks just fine. Here are the surrounding lines:

268  typedef short           nlink_t;
269
270  #ifndef _MODE_T
271  #define _MODE_T
272  /* also defined in sys/ipc.h */
273  typedef uint_t          mode_t;         /* file mode */
274  #endif /*  _MODE_T */
275
276  #ifndef _UID_GID_T
277  #define _UID_GID_T
278  /* uid_t and gid_t also defined in pwd.h, and sys/ipc.h */
279  typedef uint_t          uid_t;          /* user ID */
280  typedef uint_t          gid_t;          /* group ID */
281  typedef uint_t          rid_t;          /* role ID */
282  #endif /* _UID_GID_T */

Looks fine, right? And if there were really a problem with types.h, I'd have expectd trouble building libxml2 and libxslt.

Any clues? Do you know of anyone else who has done a build on AIX?

Thanks,

Irwin

Discussion

  • Irwin Goldstein

    Irwin Goldstein - 2013-05-07

    Got a little further. I found that the problem was that XOPEN_SOURCE was being defined too late in configure, causing some of the conftests to fail (most notably in this case the test for mode_t), yet when acutally compiling, XOPEN_SOURCE is defined in config.h, casuing the section of sys/types.h with mode_t define to be included, thus redudantly defining mode_t. I added "#define XOPEN_SOURCE 500" to confdefs.h in configure, at now the make proceeds fine all the way to the point of building "xml", then it fails with:

      CCLD   xml
    ld: 0711-317 ERROR: Undefined symbol: .rpl_realloc
    ld: 0711-317 ERROR: Undefined symbol: .rpl_malloc
    ld: 0711-317 ERROR: Undefined symbol: .fmod
    ld: 0711-317 ERROR: Undefined symbol: .pow
    ld: 0711-317 ERROR: Undefined symbol: .floor
    ld: 0711-317 ERROR: Undefined symbol: .exp
    ld: 0711-317 ERROR: Undefined symbol: .atan2
    ld: 0711-317 ERROR: Undefined symbol: .atan
    ld: 0711-317 ERROR: Undefined symbol: .acos
    ld: 0711-317 ERROR: Undefined symbol: .asin
    ld: 0711-317 ERROR: Undefined symbol: .tan
    ld: 0711-317 ERROR: Undefined symbol: .cos
    ld: 0711-317 ERROR: Undefined symbol: .sin
    ld: 0711-317 ERROR: Undefined symbol: .log
    ld: 0711-317 ERROR: Undefined symbol: .sqrt
    ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
    collect2: ld returned 8 exit status
    make: 1254-004 The error code from the last command is 1.
    
    
    Stop.
    make: 1254-004 The error code from the last command is 2.
    
    
    Stop.
    

    I'm not sure why the realloc and malloc tests failed, causing configure to use rpl_realloc and rpl_malloc, but I suspect that may be what is happening with those two. I'm guessing the others may come from a library configure is not checking for. I susepct I may need to install glibc, but I'm having troubles getting that installed on AIX. Before I continue beating on that problem, can someone confirm that glibc is indeed needed for xmlstarlet?

     
  • Noam Postavsky

    Noam Postavsky - 2013-09-03

    Hi, sorry I missed this, if you are still interested I will try to fix it.

    I'm not sure why the realloc and malloc tests failed, causing configure to use rpl_realloc and rpl_malloc

    Not sure about that, when compiling for Windows I need a workaround, although it seems like that's because it's a cross-compile (see http://machine-cycle.blogspot.co.il/2010/07/mingw-64bit-cross-compilation.html). Maybe it would help for your case as well?

    # execute before ./configure
    export ac_cv_func_realloc_0_nonnull=yes
    export ac_cv_func_malloc_0_nonnull=yes
    

    I'm guessing the others may come from a library configure is not checking for.

    Looks like libm. configure.ac currently assumes that when using dynamic libraries the dependencies will be loaded automatically, is this not true on AIX? Does ./configure --enable-static-libs work better?

    can someone confirm that glibc is indeed needed for xmlstarlet?

    xmlstarlet should be buildable anywhere that libxml is, this is a bug in configure.ac.

     
  • Noam Postavsky

    Noam Postavsky - 2013-09-03

    Ticket moved from /p/xmlstar/support-requests/19/

     
  • Noam Postavsky

    Noam Postavsky - 2013-09-03
    • labels: --> build, aix
    • Group: v1.0_(example) --> all
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.