Bug #20012 Error linking application shared libraries on HPUX binding in libmysqlclient.a
Submitted: 22 May 2006 22:42 Modified: 16 Jun 2006 12:30
Reporter: Ian Collins Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.1 and onwards OS:HP/UX (HPUX 11.00)
Assigned to: CPU Architecture:Any

[22 May 2006 22:42] Ian Collins
Description:
HPUX 11.00 only using HP C compiler.

When we were using MySQL 4.0.x we could create a shared library with libmysqlclient.a bound in.
With MySQL 4.1 onwards, we get the error,

/usr/ccs/bin/ld: Invalid loader fixup in text space needed in output file for symbol "$0000003A" in input file "/usr/local/mysql5/lib/libmysqlclient.a(client.o)"

Operating system: HPUX 11.00 (yes, I have to keep it going to support some customers who won't upgrade!)
Compiler: HPUX C

Regards,
Ian Collins.

How to repeat:
This is really easily reproduced with a 7 line program...

test.c
/* === snip === */
#include <stdlib.h>
#include <stdio.h>

#include <mysql.h>

void testfunc() {
 static MYSQL*     conn;
 conn= mysql_init(NULL);
}
/* === snip === */

On MySQL 4.0.x, you can create the shared library libtest.sl using,

cc -I/usr/local/mysql4/include -o libtest.sl -b -Aa +e +DAportable -Wl,+s -notrigraph test.c -L/usr/local/mysql4/lib -lmysqlclient -lcrypt -lnsl -lm

That works fine.

However on 4.1 and later versions of MySQL, the command (-lz needs to be added for these versions) gives,

cc -I/usr/local/mysql5/include -o libtest.sl -b -Aa +e +DAportable -Wl,+s -notrigraph test.c -L/usr/local/mysql5/lib -lmysqlclient -lz -lcrypt -lnsl -lm
/usr/ccs/bin/ld: Invalid loader fixup in text space needed in output file for symbol "$0000003A" in input file "/usr/local/mysql5/lib/libmysqlclient.a(client.o)"

Suggested fix:
yes please!
[8 Jun 2006 17:38] Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with the latest version, 4.1.20 (or 5.0.22), and inform about the results.
[16 Jun 2006 1:09] Ian Collins
I tried again with 5.0.22 and it worked fine.
Thank you.
[16 Jun 2006 12:31] Valeriy Kravchuk
This bug is fixed in new versions.