Re: [syslog-ng] AIX compilation of syslog-ng 1.6.* (problems with ld)
I use gcc to build full static syslog binaries on AIX 5.1/5.3 gcc version 3.3.2 from AIX Toolbox site (http://www-03.ibm.com/servers/aix/products/aixos/linux/download.html ) 1) configure & compile libol 0.3.17 ./configure --disable-shared 2) configure & compile syslog ng 1.6.9 ./configure --prefix=/opt/syslog-ng --with-libol=/home/build/work/libol- 0.3.17 LIBS=-ldl --enable-full-static afaik you'll fail to build full static version on AIX unless you tweak the 'configure' script of syslog ng, since it can not identify the ld version on AIX @Balazs: I think the the syslog-ng's configure script requires additional tweaking for supporting AIX's version of the ld command. The configure script tries to identify the ld option by issuing 'ld -V' which doesn't work on AIX 5.1. The output of AIX 5.3 isn't recognized. AIX 5.1 (ML8): root@aix51host:/root : uname -a AIX aix51host 1 5 00594BAA4C00 root@aix51host:/root : ld -V ld: 0706-011 The -V flag needs a parameter. ld: 0706-030 No processing done. Specify at least one input or import file or use at least one -b ex<n> option. AIX 5.3 (ML3): root@aix53host:/root : uname -a AIX aix53host 3 5 00C6D95B4C00 root@aix53host:/root : ld -V ld: LD 1.64 (08/19/2003) It would make sense to me to have an additional configure parameter '--with-ldflags' because AIX's ld requires '-dn' parameter for performing a static build what do you think ? thx, Jochen
On Thu, 2006-03-23 at 13:09 +0100, Jochen Kirn wrote:
I use gcc to build full static syslog binaries on AIX 5.1/5.3
gcc version 3.3.2 from AIX Toolbox site (http://www-03.ibm.com/servers/aix/products/aixos/linux/download.html)
1) configure & compile libol 0.3.17 ./configure --disable-shared
2) configure & compile syslog ng 1.6.9 ./configure --prefix=/opt/syslog-ng --with-libol=/home/build/work/libol-0.3.17 LIBS=-ldl --enable-full-static
afaik you'll fail to build full static version on AIX unless you tweak the 'configure' script of syslog ng, since it can not identify the ld version on AIX
@Balazs:
I think the the syslog-ng's configure script requires additional tweaking for supporting AIX's version of the ld command. The configure script tries to identify the ld option by issuing 'ld -V' which doesn't work on AIX 5.1. The output of AIX 5.3 isn't recognized.
AIX 5.1 (ML8): root@aix51host:/root : uname -a AIX aix51host 1 5 00594BAA4C00 root@aix51host:/root : ld -V ld: 0706-011 The -V flag needs a parameter. ld: 0706-030 No processing done. Specify at least one input or import file or use at least one -b ex<n> option.
AIX 5.3 (ML3): root@aix53host:/root : uname -a AIX aix53host 3 5 00C6D95B4C00 root@aix53host:/root : ld -V ld: LD 1.64 (08/19/2003)
It would make sense to me to have an additional configure parameter '--with-ldflags' because AIX's ld requires '-dn' parameter for performing a static build
I think we should find a reliable way to detect AIX ld and add the static linking params into configure.in in this case. So it would work for others out-of-the-box. Do you have an idea how to detect AIX's ld (how to query its version number for example) and what the required options are? -- Bazsi
Patch for configure.in (tested with syslog ng 1.6.9 source). ---<configure.in.patch>--- 341a342
oscheck=`uname` 349a351,354 elif echo $oscheck | egrep "AIX" > /dev/null; then LD_START_STATIC="-Wl,-bstatic" LD_END_STATIC="-Wl,-bdynamic" AC_MSG_RESULT(AIX) ---<configure.in.patch>---
patch -i configure.in.patch configure.in autoconf configure.in > configure will do the job. The -bstatic and '-bdynamic' options of AIX's ld command are supported in AIX 4.3 and higher according to IBM documentation. I've check this on AIX 4.3.3, 5.1 ML8 and 5.3 ML3. If someone uses the gnu ld on AIX this should be already covered by the check for GNU in $ldversion. AFAIK there is no other way to determine the ld version in a convenient fashion since IBM introduced the '-V' option lately but prior to AIX 5.3this option seems not be present nor does it gives any hint for AIX ld options: $ ld -V ld: LD 1.64 (08/19/2003) -- Jochen
On Fri, 2006-03-24 at 14:39 +0100, Jochen Kirn wrote:
Patch for configure.in (tested with syslog ng 1.6.9 source). ---<configure.in.patch>--- 341a342
oscheck=`uname` 349a351,354 elif echo $oscheck | egrep "AIX" > /dev/null; then LD_START_STATIC="-Wl,-bstatic" LD_END_STATIC="-Wl,-bdynamic" AC_MSG_RESULT(AIX) ---<configure.in.patch>---
patch -i configure.in.patch configure.in autoconf configure.in > configure
will do the job.
Thanks for the info, I've integrated your change to the configure.in script. -- Bazsi
participants (2)
-
Balazs Scheidler
-
Jochen Kirn