Bug #39074 Binaries do not work on Solaris 10 older than U5
Submitted: 27 Aug 2008 15:09 Modified: 3 Nov 2008 21:12
Reporter: Vemund Østgaard Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Packaging Severity:S2 (Serious)
Version:5.0.68 OS:Solaris (all CPUs)
Assigned to: Joerg Bruehe CPU Architecture:Any
Tags: regression

[27 Aug 2008 15:09] Vemund Østgaard
Description:
I tried to run scripts/mysql_install_db on a Sparc Solaris 10 machine with U2 installed. It crashed, as the script uses a bundled lib/resolveip that complained about a missing version 'SUNW_1.9.1' of libnsl.so.1. This version of libnsl.so.1 came with U5 of Solaris I believe, which arrived in April 2008. From this I guess that this script will not work on any Sparc Solaris 10 version older than U5, though I have only tested on my machine with U2.

For 5.0.66 this worked on my box with U2 of Sparc Solaris 10, so I consider it a regression.

vo136787@techra22:~/mysql/mysql-enterprise-gpl-5.0.68-solaris10-sparc-64bit> ldd bin/resolveip
        libpthread.so.1 =>       /lib/64/libpthread.so.1
        libthread.so.1 =>        /lib/64/libthread.so.1
        librt.so.1 =>    /lib/64/librt.so.1
        libgen.so.1 =>   /lib/64/libgen.so.1
        libsocket.so.1 =>        /lib/64/libsocket.so.1
        libnsl.so.1 =>   /lib/64/libnsl.so.1
        libnsl.so.1 (SUNW_1.9.1) =>      (version not found)
        libm.so.2 =>     /lib/64/libm.so.2
        libc.so.1 =>     /lib/64/libc.so.1
        libaio.so.1 =>   /lib/64/libaio.so.1
        libmd5.so.1 =>   /lib/64/libmd5.so.1
        libmp.so.2 =>    /lib/64/libmp.so.2
        libscf.so.1 =>   /lib/64/libscf.so.1
        libdoor.so.1 =>  /lib/64/libdoor.so.1
        libuutil.so.1 =>         /lib/64/libuutil.so.1
        /platform/SUNW,Sun-Fire-V210/lib/sparcv9/libc_psr.so.1
        /platform/SUNW,Sun-Fire-V210/lib/sparcv9/libmd5_psr.so.1

vo136787@techra22:~/mysql/mysql-enterprise-gpl-5.0.68-solaris10-sparc-64bit> pvs bin/resolveip
        libpthread.so.1 (SUNW_0.9);
        libnsl.so.1 (SUNW_1.9.1);
        libm.so.2 (SUNW_1.1);
        libc.so.1 (SUNW_0.9, SUNWprivate_1.1);

Not sure why MySQL has to supply its own version of resolveip instead of using what comes with the OS.

How to repeat:
Run the 5.0.68 version of bin/resolveip on a Sparc Solaris 10 machine older than U5.
[27 Aug 2008 15:43] Vemund Østgaard
I guess saying that mysql_install_db crashed is incorrect, it actually failed with this message:

Neither host 'techra22' nor 'localhost' could be looked up with
./bin/resolveip
Please configure the 'hostname' command to return a correct
hostname.
If you want to solve this at a later stage, restart this script
with the --force option

Re-running the script with --force seemed to do the trick, not sure what consequences there may be though.
[9 Sep 2008 14:20] A S
Reproduces on my (old)  Solaris 10 1/06 s10s_u1wos_nightly SPARC machine.
[10 Sep 2008 10:59] Kaiyi Wang
I have exactly the same problem as described above. With both Solaris9/10, the MYSQL(5.0.67) installed failed because of the "version not found" problem for libnsl.so.1 (SUNW_1.9.1).
I am not sure whether it's a problem of the software release, but I have tried all my best to search on the internet for both MYSQL and Solaris documentation. No one could answer me with the correct solution. So, mostly possible I guess it's a bug of the software.
[10 Sep 2008 12:22] Susanne Ebrecht
Please can you copy here out from:
ldd resolveip and ldd mysqld from both machines
[10 Oct 2008 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[27 Oct 2008 5:49] Gautam Gopalakrishnan
I am using Solaris 10 U4 on Sparc.

$ ldd ./bin/mysqld
        librt.so.1 =>    /lib/sparcv9/librt.so.1
        libdl.so.1 =>    /lib/sparcv9/libdl.so.1
        libpthread.so.1 =>       /lib/sparcv9/libpthread.so.1
        libthread.so.1 =>        /lib/sparcv9/libthread.so.1
        libmtmalloc.so.1 =>      /usr/lib/sparcv9/libmtmalloc.so.1
        libgen.so.1 =>   /lib/sparcv9/libgen.so.1
        libsocket.so.1 =>        /lib/sparcv9/libsocket.so.1
        libnsl.so.1 =>   /lib/sparcv9/libnsl.so.1
        libm.so.2 =>     /lib/sparcv9/libm.so.2
        libCstd.so.1 =>  /usr/lib/sparcv9/libCstd.so.1
        libCrun.so.1 =>  /usr/lib/sparcv9/libCrun.so.1
        libc.so.1 =>     /lib/sparcv9/libc.so.1
        libaio.so.1 =>   /lib/64/libaio.so.1
        libmd.so.1 =>    /lib/64/libmd.so.1
        libmp.so.2 =>    /lib/64/libmp.so.2
        libscf.so.1 =>   /lib/64/libscf.so.1
        libdoor.so.1 =>  /lib/64/libdoor.so.1
        libuutil.so.1 =>         /lib/64/libuutil.so.1
        /platform/SUNW,A70/lib/sparcv9/libc_psr.so.1
        /platform/SUNW,A70/lib/sparcv9/libmd_psr.so.1

$ ldd ./bin/resolveip 
        libpthread.so.1 =>       /lib/64/libpthread.so.1
        libthread.so.1 =>        /lib/64/libthread.so.1
        librt.so.1 =>    /lib/64/librt.so.1
        libgen.so.1 =>   /lib/64/libgen.so.1
        libsocket.so.1 =>        /lib/64/libsocket.so.1
        libnsl.so.1 =>   /lib/64/libnsl.so.1
        libnsl.so.1 (SUNW_1.9.1) =>      (version not found)
        libm.so.2 =>     /lib/64/libm.so.2
        libc.so.1 =>     /lib/64/libc.so.1
        libaio.so.1 =>   /lib/64/libaio.so.1
        libmd.so.1 =>    /lib/64/libmd.so.1
        libmp.so.2 =>    /lib/64/libmp.so.2
        libscf.so.1 =>   /lib/64/libscf.so.1
        libdoor.so.1 =>  /lib/64/libdoor.so.1
        libuutil.so.1 =>         /lib/64/libuutil.so.1
        /platform/SUNW,A70/lib/sparcv9/libc_psr.so.1
        /platform/SUNW,A70/lib/sparcv9/libmd_psr.so.1

$ bin/resolveip 
ld.so.1: resolveip: fatal: libnsl.so.1: version `SUNW_1.9.1' not found (required by file bin/resolveip)
ld.so.1: resolveip: fatal: libnsl.so.1: open failed: No such file or directory
Killed

$ uname -a
SunOS <snip> 5.10 Generic_127111-09 sun4u sparc SUNW,A70

$ bin/mysqld -V
bin/mysqld  Ver 5.0.67 for sun-solaris2.10 on sparc (MySQL Community Server (GPL))
[29 Oct 2008 6:29] Susanne Ebrecht
Please, can you test if this also occurs by using actual version of MySQL 5.1 and/or 6.0?
[31 Oct 2008 4:25] Gautam Gopalakrishnan
./mysqld  Ver 5.1.29-rc for sun-solaris2.10 on sparc (MySQL Community Server (GPL))

$ ldd resolveip 
        libpthread.so.1 =>       /lib/64/libpthread.so.1
        libthread.so.1 =>        /lib/64/libthread.so.1
        librt.so.1 =>    /lib/64/librt.so.1
        libresolv.so.2 =>        /lib/64/libresolv.so.2
        libgen.so.1 =>   /lib/64/libgen.so.1
        libsocket.so.1 =>        /lib/64/libsocket.so.1
        libnsl.so.1 =>   /lib/64/libnsl.so.1
        libm.so.2 =>     /lib/64/libm.so.2
        libc.so.1 =>     /lib/64/libc.so.1
        libaio.so.1 =>   /lib/64/libaio.so.1
        libmd.so.1 =>    /lib/64/libmd.so.1
        libmp.so.2 =>    /lib/64/libmp.so.2
        libscf.so.1 =>   /lib/64/libscf.so.1
        libdoor.so.1 =>  /lib/64/libdoor.so.1
        libuutil.so.1 =>         /lib/64/libuutil.so.1
        /platform/SUNW,A70/lib/sparcv9/libc_psr.so.1
        /platform/SUNW,A70/lib/sparcv9/libmd_psr.so.1

$ ./resolveip mysql.com
IP address of mysql.com is 213.136.52.29

$ ldd mysqld
        libpthread.so.1 =>       /lib/sparcv9/libpthread.so.1
        libthread.so.1 =>        /lib/sparcv9/libthread.so.1
        libdl.so.1 =>    /lib/sparcv9/libdl.so.1
        libmtmalloc.so.1 =>      /usr/lib/sparcv9/libmtmalloc.so.1
        librt.so.1 =>    /lib/sparcv9/librt.so.1
        libresolv.so.2 =>        /lib/sparcv9/libresolv.so.2
        libgen.so.1 =>   /lib/sparcv9/libgen.so.1
        libsocket.so.1 =>        /lib/sparcv9/libsocket.so.1
        libnsl.so.1 =>   /lib/sparcv9/libnsl.so.1
        libm.so.2 =>     /lib/sparcv9/libm.so.2
        libCstd.so.1 =>  /usr/lib/sparcv9/libCstd.so.1
        libCrun.so.1 =>  /usr/lib/sparcv9/libCrun.so.1
        libc.so.1 =>     /lib/sparcv9/libc.so.1
        libaio.so.1 =>   /lib/64/libaio.so.1
        libmd.so.1 =>    /lib/64/libmd.so.1
        libmp.so.2 =>    /lib/64/libmp.so.2
        libscf.so.1 =>   /lib/64/libscf.so.1
        libdoor.so.1 =>  /lib/64/libdoor.so.1
        libuutil.so.1 =>         /lib/64/libuutil.so.1
        /platform/SUNW,A70/lib/sparcv9/libc_psr.so.1
        /platform/SUNW,A70/lib/sparcv9/libmd_psr.so.1

======================

./mysqld  Ver 6.0.7-alpha for sun-solaris2.10 on sparc (MySQL Community Server (GPL))

$ ./resolveip mysql.com
IP address of mysql.com is 213.136.52.29

$ ldd mysqld resolveip
mysqld:
        libpthread.so.1 =>       /lib/sparcv9/libpthread.so.1
        libthread.so.1 =>        /lib/sparcv9/libthread.so.1
        libdl.so.1 =>    /lib/sparcv9/libdl.so.1
        libmtmalloc.so.1 =>      /usr/lib/sparcv9/libmtmalloc.so.1
        librt.so.1 =>    /lib/sparcv9/librt.so.1
        libresolv.so.2 =>        /lib/sparcv9/libresolv.so.2
        libgen.so.1 =>   /lib/sparcv9/libgen.so.1
        libsocket.so.1 =>        /lib/sparcv9/libsocket.so.1
        libnsl.so.1 =>   /lib/sparcv9/libnsl.so.1
        libm.so.2 =>     /lib/sparcv9/libm.so.2
        libCstd.so.1 =>  /usr/lib/sparcv9/libCstd.so.1
        libCrun.so.1 =>  /usr/lib/sparcv9/libCrun.so.1
        libc.so.1 =>     /lib/sparcv9/libc.so.1
        libaio.so.1 =>   /lib/64/libaio.so.1
        libmd.so.1 =>    /lib/64/libmd.so.1
        libmp.so.2 =>    /lib/64/libmp.so.2
        libscf.so.1 =>   /lib/64/libscf.so.1
        libdoor.so.1 =>  /lib/64/libdoor.so.1
        libuutil.so.1 =>         /lib/64/libuutil.so.1
        /platform/SUNW,A70/lib/sparcv9/libc_psr.so.1
        /platform/SUNW,A70/lib/sparcv9/libmd_psr.so.1
resolveip:
        libpthread.so.1 =>       /lib/64/libpthread.so.1
        libthread.so.1 =>        /lib/64/libthread.so.1
        librt.so.1 =>    /lib/64/librt.so.1
        libresolv.so.2 =>        /lib/64/libresolv.so.2
        libgen.so.1 =>   /lib/64/libgen.so.1
        libsocket.so.1 =>        /lib/64/libsocket.so.1
        libnsl.so.1 =>   /lib/64/libnsl.so.1
        libm.so.2 =>     /lib/64/libm.so.2
        libc.so.1 =>     /lib/64/libc.so.1
        libaio.so.1 =>   /lib/64/libaio.so.1
        libmd.so.1 =>    /lib/64/libmd.so.1
        libmp.so.2 =>    /lib/64/libmp.so.2
        libscf.so.1 =>   /lib/64/libscf.so.1
        libdoor.so.1 =>  /lib/64/libdoor.so.1
        libuutil.so.1 =>         /lib/64/libuutil.so.1
        /platform/SUNW,A70/lib/sparcv9/libc_psr.so.1
        /platform/SUNW,A70/lib/sparcv9/libmd_psr.so.1

===============

So problem only seems to be for 5.0, not 5.1 or 6.0
[3 Nov 2008 20:56] Joerg Bruehe
Our build machines were running Solaris 10 U5.

This upgrade had brought a new version of "libnsl.so", so all our binaries (server and clients) used that.

Sadly, this made them fail on any Solaris 10 installation running U4 or lower, because this library version isn't available on such installations.

We solved this issue by building 5.0.72 on machines which were only running U4, so they are built against the older "libnsl.so".

We plan to use these machines for future builds as well, so that hopefully this will not happen again.

All this does not involve any source or tool changes, it is build machine management.
[3 Nov 2008 21:12] Paul DuBois
Noted in 5.0.72 changelog.

Some recent releases for Solaris 10 were built on Solaris 10 U5,
which included a new version of libnsl.so that does not work on U4 or 
earlier. To correct this, Solaris 10 builds now are created on
machines running U4 so that they will work on U4 or higher.
[3 Nov 2008 23:39] Paul DuBois
Noted in 5.1.30 changelog.
[5 Nov 2008 0:26] Gautam Gopalakrishnan
Not meaning to push, but is there a release date for 5.0.72 ? I can't see it on the downloads page yet. Thanks.
[5 Nov 2008 9:14] Joerg Bruehe
Packages  of 5.0.72 have been built and are now in the final test stages.
We hope to publish them by the weekend.