Shared compilation on AIX
Shared compilation on AIX
am 24.07.2002 15:57:12 von Melvyn Sopacua
>Description:
When using GNU binutils, libtool issues a warning and disables shared
libraries, because the GNU binutils up to at least version 2.9.1 have been
unable to sucessfully create shared libs (I'm using 2.12.1 even - so why libtool
throws this error is a bit too cautious??).
However - when using the AIX binutils, building of the mysql client libraries
assume GNU ld:
ld: 0706-012 The -q flag is not recognized.
ld: 0706-027 The -k shrobj flag is ignored.
collect2: ld returned 255 exit status
gmake[1]: *** [libmysqlclient.la] Error 1
gmake[1]: Leaving directory `/ns/data/mdev/_src/mysql-4.0.2-alpha/libmysql'
gmake: *** [all-recursive] Error 1
make: 1254-004 The error code from the last command is 2.
>How-To-Repeat:
Export appropreate variables to the paths of the responding GNU binutils
(AR,AS,RANLIB,LD) and run configure (Arguments don't really matter).
Look for the libtool warning.
Then set them to the AIX binutils and configure with proper arguments, then make.
>Fix:
Dunno yet - probably static compilation :-)
>Submitter-Id:
>Originator: Melvyn Sopacua
>Organization: IDG.nl
>MySQL support: none
>Synopsis: Incorrect linking for AIX platform
>Severity: serious
>Priority: medium
>Category: mysql
>Class: sw-bug
>Release: mysql-4.0.1-alpha (AIX Production Version, as of Sun, 28 Apr 2002)
>Server: /data/mdev/mysql/bin/mysqladmin Ver 8.23 Distrib 4.0.1-alpha, for ibm-aix4.3.3.0 on rs6000
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Server version 4.0.1-alpha-log
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /data/mdev/sql/tmp/mysql4.sock
Uptime: 43 days 15 hours 37 min 11 sec
Threads: 2 Questions: 17465811 Slow queries: 180 Opens: 16359 Flush tables: 2 Open tables: 64 Queries per second avg: 4.631
>Environment:
System: AIX femke 3 4 0044CA0A4C00
Some paths: /bin/perl /bin/make /home/mdev/local/bin/gmake /usr/local/bin/gcc /home/mdev/bin/cc
GCC: Reading specs from /usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/2.95.2.1/specs
gcc version 2.95.2.1 19991024 (release)
Compilation info: CC='gcc -pipe -mcpu=power -Wa,-many' CFLAGS='' CXX='gcc -pipe -mcpu=power -Wa,-many' CXXFLAGS='-felide-constructors -fno-exceptions -fno-rtti' LDFLAGS=''
LIBC:
lrwxrwxrwx 1 bin bin 19 May 14 2001 /lib/libc.a -> /usr/ccs/lib/libc.a
lrwxrwxrwx 1 bin bin 19 May 14 2001 /usr/lib/libc.a -> /usr/ccs/lib/libc.a
Configure command: ./configure --prefix=/data/mdev/mysql --localstatedir=/data/mdev/sql/var --with-raid --with-unix-socket-path=/data/mdev/sql/tmp/mysql.sock --with-port=3406 --with-mysqld-user=mdev --without-debug '--with-comment=AIX Production Version, as of Sun, 28 Apr 2002' --without-bench --with-charset=latin1 --with-extra-charsets=none --without-isam --with-berkeley-db
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12224@lists.mysql.com
To unsubscribe, e-mail
Re: Shared compilation on AIX
am 24.07.2002 19:44:59 von Sinisa Milivojevic
mdev@idg.nl writes:
> >Description:
> When using GNU binutils, libtool issues a warning and disables shared
> libraries, because the GNU binutils up to at least version 2.9.1 have been
> unable to sucessfully create shared libs (I'm using 2.12.1 even - so why libtool
> throws this error is a bit too cautious??).
> However - when using the AIX binutils, building of the mysql client libraries
> assume GNU ld:
> ld: 0706-012 The -q flag is not recognized.
> ld: 0706-027 The -k shrobj flag is ignored.
> collect2: ld returned 255 exit status
> gmake[1]: *** [libmysqlclient.la] Error 1
> gmake[1]: Leaving directory `/ns/data/mdev/_src/mysql-4.0.2-alpha/libmysql'
> gmake: *** [all-recursive] Error 1
> make: 1254-004 The error code from the last command is 2.
> >How-To-Repeat:
> Export appropreate variables to the paths of the responding GNU binutils
> (AR,AS,RANLIB,LD) and run configure (Arguments don't really matter).
> Look for the libtool warning.
>
> Then set them to the AIX binutils and configure with proper arguments, then make.
> >Fix:
> Dunno yet - probably static compilation :-)
>
Yes, this is a bug.
The only cure so far is to remove that single instruction from
archive_cmds in libtool.
--
Regards,
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12226@lists.mysql.com
To unsubscribe, e-mail
Re: Shared compilation on AIX
am 24.07.2002 21:09:50 von Melvyn Sopacua
At 19:44 24-7-2002, Sinisa Milivojevic shared with all of us:
>mdev@idg.nl writes:
> > >Description:
> > When using GNU binutils, libtool issues a warning and disables shared
> > libraries, because the GNU binutils up to at least version 2.9.1
> have been
> > unable to sucessfully create shared libs (I'm using 2.12.1 even -
> so why libtool
> > throws this error is a bit too cautious??).
> > However - when using the AIX binutils, building of the mysql
> client libraries
> > assume GNU ld:
> > ld: 0706-012 The -q flag is not recognized.
> > ld: 0706-027 The -k shrobj flag is ignored.
> > collect2: ld returned 255 exit status
> > gmake[1]: *** [libmysqlclient.la] Error 1
> > gmake[1]: Leaving directory
> `/ns/data/mdev/_src/mysql-4.0.2-alpha/libmysql'
> > gmake: *** [all-recursive] Error 1
> > make: 1254-004 The error code from the last command is 2.
> > >How-To-Repeat:
> > Export appropreate variables to the paths of the responding GNU
> binutils
> > (AR,AS,RANLIB,LD) and run configure (Arguments don't really matter).
> > Look for the libtool warning.
> >
> > Then set them to the AIX binutils and configure with proper
> arguments, then make.
> > >Fix:
> > Dunno yet - probably static compilation :-)
> >
>
>Yes, this is a bug.
>
>The only cure so far is to remove that single instruction from
>archive_cmds in libtool.
What does MySQL prefer/advise? GNU binutils or AIX?
Best regards,
Melvyn Sopacua
WebMaster IDG.nl
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
If it applies, where it applies - this email is a personal
contribution and does not reflect the views of my employer
IDG.nl.
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12227@lists.mysql.com
To unsubscribe, e-mail
Re: Shared compilation on AIX
am 24.07.2002 21:53:45 von Sinisa Milivojevic
Melvyn Sopacua writes:
> At 19:44 24-7-2002, Sinisa Milivojevic shared with all of us:
>
> >Yes, this is a bug.
> >
> >The only cure so far is to remove that single instruction from
> >archive_cmds in libtool.
>
> What does MySQL prefer/advise? GNU binutils or AIX?
>
>
>
> Best regards,
>
> Melvyn Sopacua
> WebMaster IDG.nl
> _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
> If it applies, where it applies - this email is a personal
> contribution and does not reflect the views of my employer
> IDG.nl.
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\
>
GNU binutils.
--
Regards,
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12228@lists.mysql.com
To unsubscribe, e-mail
Re: Shared compilation on AIX
am 24.07.2002 22:50:01 von Melvyn Sopacua
On Wed, 24 Jul 2002, Sinisa Milivojevic wrote:
> Date: Wed, 24 Jul 2002 22:53:45 +0300
> From: Sinisa Milivojevic
> To: mdev@idg.nl
> Cc: bugs@lists.mysql.com
> Subject: Re: Shared compilation on AIX
>
> Melvyn Sopacua writes:
> > At 19:44 24-7-2002, Sinisa Milivojevic shared with all of us:
> >
> > >Yes, this is a bug.
> > >
> > >The only cure so far is to remove that single instruction from
> > >archive_cmds in libtool.
> >
> > What does MySQL prefer/advise? GNU binutils or AIX?
>
>
> GNU binutils.
Then what's the fix for GNU binutils? Just delete the warning in libtool?
I know it can be that trivial - just wanna be sure, that support in the provided libtool version, after deleting the error and setting ld_shlibs=yes is adequate.
Especially since MySQL is C++ and this comment worries me:
# Below there is a dirty hack to force normal static linking with -ldl
# The problem is because libdl dynamically linked with both libc and
# libC (AIX C++ library), which obviously doesn't included in libraries
# list by gcc. This cause undefined symbols with -static flags.
# This hack allows C programs to be linked with "-static -ldl", but
# we not sure about C++ programs.
link_static_flag="$link_static_flag ${wl}-lC"
Best regards,
Melvyn Sopacua
WebMaster IDG.nl
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
If it applies, where it applies - this email is a personal
contribution and does not reflect the views of my employer
IDG.nl.
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12229@lists.mysql.com
To unsubscribe, e-mail
Shared compilation on AIX
am 05.08.2002 22:26:04 von Michael Widenius
Hi!
Some comments to Sinisa answer:
>>>>> "mdev" == mdev writes:
>> Description:
mdev> When using GNU binutils, libtool issues a warning and disables shared
mdev> libraries, because the GNU binutils up to at least version 2.9.1 have been
mdev> unable to sucessfully create shared libs (I'm using 2.12.1 even - so why libtool
mdev> throws this error is a bit too cautious??).
mdev> However - when using the AIX binutils, building of the mysql client libraries
mdev> assume GNU ld:
mdev> ld: 0706-012 The -q flag is not recognized.
mdev> ld: 0706-027 The -k shrobj flag is ignored.
mdev> collect2: ld returned 255 exit status
mdev> gmake[1]: *** [libmysqlclient.la] Error 1
mdev> gmake[1]: Leaving directory `/ns/data/mdev/_src/mysql-4.0.2-alpha/libmysql'
I am quite sure that we have been able to build MySQL on AIX with the
original binutils.
Are you 100 % sure that the value of 'using GNU ld' is not cached ?
Please try to run configure again but this time delete the
config.status and config.cache files before running configure.
In any case, configure should not write 'using GNUL ld'.
You should be able to check what is going wrong in the config.log file
or in the worst case in the 'configure' script.
Regards,
Monty
--
For technical support contracts, goto https://order.mysql.com/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Michael Widenius
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO
/_/ /_/\_, /___/\___\_\___/ Helsinki, Finland
<___/ www.mysql.com
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12287@lists.mysql.com
To unsubscribe, e-mail
Re: Shared compilation on AIX
am 05.08.2002 22:27:52 von Michael Widenius
Hi!
>>>>> "Sinisa" == Sinisa Milivojevic writes:
Sinisa> Melvyn Sopacua writes:
>> What does MySQL prefer/advise? GNU binutils or AIX?
Sinisa> GNU binutils.
Actually on almost all OS we prefer to use the original binutils and
libraries (if possible). In other words, on AIX we prefer to use AIX
binutils.
Regards,
Monty
CTO of MySQL AB
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12288@lists.mysql.com
To unsubscribe, e-mail
Re: Shared compilation on AIX
am 06.08.2002 00:01:32 von Melvyn Sopacua
Hi Monty,
hope you had a good vacay :-)
At 22:26 5-8-2002, Michael Widenius wrote:
> >>>>> "mdev" == mdev writes:
>
> >> Description:
[...]
>mdev> However - when using the AIX binutils, building of the mysql
>client libraries
>mdev> assume GNU ld:
>mdev> ld: 0706-012 The -q flag is not recognized.
>mdev> ld: 0706-027 The -k shrobj flag is ignored.
>mdev> collect2: ld returned 255 exit status
>mdev> gmake[1]: *** [libmysqlclient.la] Error 1
>mdev> gmake[1]: Leaving directory
>`/ns/data/mdev/_src/mysql-4.0.2-alpha/libmysql'
>
>I am quite sure that we have been able to build MySQL on AIX with the
>original binutils.
>
>Are you 100 % sure that the value of 'using GNU ld' is not cached ?
Yep. Did a make distclean, which removes config.cache and config.status.
>In any case, configure should not write 'using GNUL ld'.
It doesn't.
configure:3111: checking if the linker (/bin/ld) is GNU ld
configure:3123: result: no
>You should be able to check what is going wrong in the config.log file
>or in the worst case in the 'configure' script.
Actually - it's ltconfig:
# -qmkshrobj used to be -bexpall, but MySQL uses symbols which start with
# an underscore (e.g., _my_b_write), so -bexpall doesn't work.
archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs
$linkopts ${wl}-qmkshrobj ${wl}-bnoe
ntry${allow_undefined_flag}'
archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs
$deplibs $linkopts ${wl}-bE:$export_sy
mbols ${wl}-bnoentry${allow_undefined_flag}'
case "$host_os" in aix4.[01]|aix4.[01].*)
# According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
always_export_symbols=yes ;;
In the aix4*) section.
Any reason that was hardcoded into it?
Best regards,
Melvyn Sopacua
WebMaster IDG.nl
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
If it applies, where it applies - this email is a personal
contribution and does not reflect the views of my employer
IDG.nl.
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12289@lists.mysql.com
To unsubscribe, e-mail
Re: Shared compilation on AIX
am 09.08.2002 02:08:57 von Melvyn Sopacua
On Tue, 6 Aug 2002, Melvyn Sopacua wrote:
> >mdev> However - when using the AIX binutils, building of the mysql
> >client libraries
> >mdev> assume GNU ld:
> >mdev> ld: 0706-012 The -q flag is not recognized.
> >mdev> ld: 0706-027 The -k shrobj flag is ignored.
> >mdev> collect2: ld returned 255 exit status
> >mdev> gmake[1]: *** [libmysqlclient.la] Error 1
> >mdev> gmake[1]: Leaving directory
> >`/ns/data/mdev/_src/mysql-4.0.2-alpha/libmysql'
> >
[...]
> Actually - it's ltconfig:
> # -qmkshrobj used to be -bexpall, but MySQL uses symbols which start with
> # an underscore (e.g., _my_b_write), so -bexpall doesn't work.
> archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs
> $linkopts ${wl}-qmkshrobj ${wl}-bnoe
> ntry${allow_undefined_flag}'
> archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs
> $deplibs $linkopts ${wl}-bE:$export_sy
> mbols ${wl}-bnoentry${allow_undefined_flag}'
> case "$host_os" in aix4.[01]|aix4.[01].*)
> # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
> always_export_symbols=yes ;;
>
> In the aix4*) section.
> Any reason that was hardcoded into it?
Any news on this?
Can we not use export files here?
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12341@lists.mysql.com
To unsubscribe, e-mail
Re: Shared compilation on AIX
am 11.08.2002 20:42:54 von Michael Widenius
Hi!
>>>>> "Melvyn" == Melvyn Sopacua writes:
Melvyn> Hi Monty,
Melvyn> hope you had a good vacay :-)
Yes; I am now slowly catching up with my emails..
Melvyn> Actually - it's ltconfig:
Melvyn> # -qmkshrobj used to be -bexpall, but MySQL uses symbols which start with
Melvyn> # an underscore (e.g., _my_b_write), so -bexpall doesn't work.
Melvyn> archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs
Melvyn> $linkopts ${wl}-qmkshrobj ${wl}-bnoe
Melvyn> ntry${allow_undefined_flag}'
Melvyn> archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs
Melvyn> $deplibs $linkopts ${wl}-bE:$export_sy
Melvyn> mbols ${wl}-bnoentry${allow_undefined_flag}'
Melvyn> case "$host_os" in aix4.[01]|aix4.[01].*)
Melvyn> # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
Melvyn> always_export_symbols=yes ;;
Melvyn> In the aix4*) section.
Melvyn> Any reason that was hardcoded into it?
Sorry, but I don't know why this is done this way.
This is something the libtool/configure maintainers have done and if
we try to change this it's likely that we break something else.
Do you know some AIX guru that could help us resolve what is the best
thing to do here?
Regards,
Monty
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12346@lists.mysql.com
To unsubscribe, e-mail
Re: Shared compilation on AIX
am 11.08.2002 21:52:14 von Melvyn Sopacua
Hi,
At 20:42 11-8-2002, Michael Widenius wrote:
>Melvyn> Hi Monty,
>Melvyn> hope you had a good vacay :-)
>
>Yes; I am now slowly catching up with my emails..
I know the feeling...
>
>
>Melvyn> Actually - it's ltconfig:
>Melvyn> # -qmkshrobj used to be -bexpall, but MySQL uses symbols
>which start with
>Melvyn> # an underscore (e.g., _my_b_write), so -bexpall doesn't work.
>Melvyn> archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs
>$deplibs
>Melvyn> $linkopts ${wl}-qmkshrobj ${wl}-bnoe
>Melvyn> ntry${allow_undefined_flag}'
>Melvyn> archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname
>$libobjs
>Melvyn> $deplibs $linkopts ${wl}-bE:$export_sy
>Melvyn> mbols ${wl}-bnoentry${allow_undefined_flag}'
>Melvyn> case "$host_os" in aix4.[01]|aix4.[01].*)
>Melvyn> # According to Greg Wooledge, -bexpall is only supported
>from AIX 4.2 on
>Melvyn> always_export_symbols=yes ;;
>
>Melvyn> In the aix4*) section.
>Melvyn> Any reason that was hardcoded into it?
>
>Sorry, but I don't know why this is done this way.
>
>This is something the libtool/configure maintainers have done and if
>we try to change this it's likely that we break something else.
The comment suggests a MySQL change.
>Do you know some AIX guru that could help us resolve what is the best
>thing to do here?
Nope, but I did read documentation on this issue.
The comments are correct, in that -bexpall does not export symbols starting
with an underscore (don't ask me why). Since the purpose here is to extract
all symbols, a `nm' dump, sedded into the correct format for the file,
would be the simplest course of action.
Libtool has some standard `archive_*_cmds' variables for this, as one can
see for the Cygwin target.
The documentation I'm refering to is the following:
http://publib.boulder.ibm.com/doc_link/en_US/a_doc_lib/cmds/ aixcmds3/ld.htm#A3119106d
Also the options section:
http://publib.boulder.ibm.com/doc_link/en_US/a_doc_lib/cmds/ aixcmds3/ld.htm#A3119106d
The trouble is with the following:
-bautoexp:
Automatically exports some symbols from the output module without having to
list them in an export file. (This option does not export all symbols from
the output module. Use the -bexpall option to export all symbols.)This is
the default. Use this option when linking a main program. The linker
assumes that you are linking a main program when you do not specify a
module type (with the M or modtype option) beginning with S and you do not
use the noentry option. This option only applies to AIX Version 4.2 or later.
And then:
-bexpall:
Exports all global symbols, except imported symbols, unreferenced symbols
defined in archive members, and symbols beginning with an underscore (_).
You may export additional symbols by listing them in an export file. This
option does not affect symbols exported by the autoexp option. This option
only applies to AIX Version 4.2 or later.
Best regards,
Melvyn Sopacua
WebMaster IDG.nl
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
If it applies, where it applies - this email is a personal
contribution and does not reflect the views of my employer
IDG.nl.
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12347@lists.mysql.com
To unsubscribe, e-mail