Bug #562 Problems compiling MySQL 4.0.13 on HP-UX 11 32 bit
Submitted: 1 Jun 2003 3:32 Modified: 18 Nov 2004 12:39
Reporter: Satheesh Subramanian Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S1 (Critical)
Version:4.0.13 OS:HP/UX (HP-UX 11.00 32-bit)
Assigned to: Lenz Grimmer CPU Architecture:Any

[1 Jun 2003 3:32] Satheesh Subramanian
Description:
MySQL 4.0.13 Compilation Errors on HP-UX 11.00 32-bit:

Configuration settings:

CC="cc"
CXX="aCC"
./configure --prefix=/fs32/b/sgsubram/bin/MySQL/HPPA.11.00 --with-embedded-server --localstatedir=/fs32/b/sgsubram/bin/MySQL/HPPA.11.00/data --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static -enable-thread-safe-client --enable-local-infile --with-extra-charsets=complex --with-named-curses-libs=/usr/local/pkgs/ncurses/5.1-32bit/lib/libncurses.a

I'm getting the following error:

cc -O -DDBUG_OFF +DAportable -DHPUX11 -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -DHAVE_BROKEN_GETPASS -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT -DHAVE_BROKEN_INLINE -o mysqltest mysqltest.o -Wl,-a -Wl,archive -Wl,-a -Wl,archive_shared  ../libmysqld.a -lrt -lpthread -lcrypt -lnsl -lm -lpthread -lrt
/usr/ccs/bin/ld: Unsatisfied symbols:
   __DestructArray__FPvUiUlPFv_v (first referenced in ../libmysqld.a(libmysqld.o)) (code)
   __nwa__FUl (first referenced in ../libmysqld.a(libmysqld.o)) (code)
   [Vtable]key:__dt__21__versioned_type_infoFv (first referenced in ../libmysqld.a(libmysqld.o)) (data)
   __DestructMarkedArray__FPvUlPFv_v (first referenced in ../libmysqld.a(libmysqld.o)) (code)
   __PureVirtualCalled (first referenced in ../libmysqld.a(libmysqld.o)) (code)
   __curStaticObject (first referenced in ../libmysqld.a(libmysqld.o)) (data)
   shl_load (first referenced in /usr/lib/libc.a(start_what.o)) (code)
   __nw__FUl (first referenced in ../libmysqld.a(libmysqld.o)) (code)
   __ConstructMarkedArray__FPvUiUlPFv_vT4 (first referenced in ../libmysqld.a(libmysqld.o)) (code)
   __dla__FPv (first referenced in ../libmysqld.a(libmysqld.o)) (code)
   __dl__FPv (first referenced in ../libmysqld.a(libmysqld.o)) (code)
   shl_findsym (first referenced in /usr/lib/libc.a(start_what.o)) (code)
gmake[3]: *** [mysqltest] Error 1
gmake[3]: Leaving directory `/fs32/b/sgsubram/bin/MySQL/HPPA.11.00/usr/src/redhat/SOURCES/mysql-4.0.13/libmysqld/examples'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/fs32/b/sgsubram/bin/MySQL/HPPA.11.00/usr/src/redhat/SOURCES/mysql-4.0.13/libmysqld'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/fs32/b/sgsubram/bin/MySQL/HPPA.11.00/usr/src/redhat/SOURCES/mysql-4.0.13'
gmake: *** [all] Error 2

Before getting it to this stage, I had to do the following to avoid other errors. It was not able to find dld library in static, so I had to link it using the shared library. Added the following lines to the makefiles in extra/ isam/ myisam/ sql/ 

LIBS = <whatever is default> -Wl,-a,archive_shared -ldld

For the Makefile in libmysqld/examples, I had to add the following:

LIBS = <whatever is default> -Wl,-a,archive_shared -lrt

How to repeat:
Just try configuring and compiling MySQL 4.0.13 on HP-UX 11.00 32-bit
[18 Jun 2003 0:54] Lenz Grimmer
Unfortunately we do not have a HP-UX 11 32 bit system - I will try to reproduce it on our 
64 bit system. Is there a particular reason for you to link statically? Have you tried to remove 
these flags and build a dynamically linked binary instead?
[3 Jul 2003 2:14] Michael Widenius
The problem is probably that aCC can't link programs staticly in our setup.
I have suspened this bug until we get hands on an HP-UX 11 machine.
[18 Nov 2004 12:39] Lenz Grimmer
Can't repeat on our HP-UX 11.00 build machine - it compiles both 4.0 and 4.1 just fine. Probably fixed by now.