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
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:
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?
Hi, sorry I missed this, if you are still interested I will try to fix it.
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?
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-libswork better?xmlstarlet should be buildable anywhere that libxml is, this is a bug in configure.ac.
Ticket moved from /p/xmlstar/support-requests/19/