I was attempting to install DBD::mysql on an HP-UX 11.11 machine and got problems similar to what Keith Paschal reports here:
/usr/bin/ld: Invalid loader fixup in text space needed in output file for symbol "$0000004B" in input file: "/other/mysql/lib/libmys qlclient.a(libmysql.o)". Make sure it was compiled with +z/+Z.
I followed instructions kindly provided by Kangara, Madhu here:
See
http://lists.mysql.com/perl/2548
Unfortunately, when trying to compile the mysql client on HP-UX from source I kept getting an error similar to this (sorry, I don't have the entire error anymore):
setjmp.h redefinition of `struct label_t'
..
Stop.
After much research it seems the gcc version I was using (or possibly its installation?) was apparently the problem, mixing system includes or libraries with its own. I download gcc-3.4.4 from hp. (I was able to get binaries for my system.)
Note hp's notes and dependencies, since gettext and libiconv should be installed first for the binary install and there are even more dependencies if you need to compile gcc from source.
Be sure to read what HP says carefully about this (it's possible that my prior gcc version could have worked but may have been installed or compiled incorrectly?)
http://hpux.connect.org.uk/hppd/answers/4-5.html
In any case, now my compile of mysql worked fine. :)
I used these settings (provided above by Kangara, Madhu, with thanks to Jochen Wiedmann) for ./configure:
(Note: I was only interested in the mysql client: --without-server)
$ CFLAGS="-fomit-frame-pointer -O3 -fPIC"
$ CXX=gcc
$ CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti -O3 -fPIC"
(i did export these first here)
$ ./configure --without-server --prefix=/usr/local/mysqlc --with-low-memory --enable-thread-safe-client --enable-local-infile --with-pthread --with-lib-ccflags=-fPIC --disable-shared
$ make
$ make install
Next go to where you have downloaded DBD::mysql source (DBI is already installed) and issue this command (your paths may be different):
(again, thanks to Madhu Kangara and Jochen Wiedmann for their posts:)
$perl Makefile.PL --cflags="-I/usr/local/mysql/include/mysql" --libs="-L/usr/local/mysql/lib/mysql -L/usr/local/lib/gcc/hppa2.0w-hp-hpux11.11/3.4.4 -lmysqlclient -lz -lcrypt -lnsl -lm -lgcc" --nocatchstderr
and then
$make
Now I installed DBD::mysql without "Make sure it was compiled with +z/+Z." error on HP-UX 11.11
$ make install
Still, gotta make sure it works, but it installed!
-Kent Bower