I've been trying for a few hours to compile a statically linked bash on AIX 5.2 and am running into headaches. I am using GCC 3.3.2. I also have installed the automake and autoconf utilities from IBM's rpm repository. (automake 1.7.9 and autoconf 2.58)
I can compile bash without issue if I use the default configuration (./configure) but when I attempt to use the configure flag --enable-static-link it bombs. An odd thing is that when i do a default configure it seems to find a bunch of (pretty standard) library functions that it doesn't find when I use --enable-static-link. For instance: (This is just a subset, there seems to be many more)
Straight configure:
checking for getcwd... yes
checking for getegid... yes
checking for geteuid... yes
checking for getgid... yes
checking for getuid... yes
--enable-static-link:
checking for getcwd... no
checking for getegid... no
checking for geteuid... no
checking for getgid... no
checking for getuid... no
In addition, I get this error when configure runs with --enable-static-link (and not with straight configure):
checking for shared library run path origin... ld: 0711-317 ERROR: Undefined symbol: fstatfs64
ld: 0711-317 ERROR: Undefined symbol: statfs64
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
Eventually configure dies with the following message:
checking size of char... configure: error: cannot compute sizeof (char), 77
See `config.log' for more details.
(Config log available at:
http://www.icenine.ca/config.log.txt )
My LD_LIBRARY_PATH & LIBPATH are set as:
/opt/freeware/lib:/lib:/us
r/lib:/usr
/local/lib
/
I'm not much of a C programmer and know next to nothing about configure scripts, but I'm guessing from the difference in output that there is a bug in the configure script. Has anyone ever encountered this or managed to successfully statically link bash on AIX? Any help greatly appreciated.
High grades for quick answers! :)
Thanks