Bug 35365 - dlopen fails because of missing _Jv_RegisterClasses under HP-UX 11.11
Summary: dlopen fails because of missing _Jv_RegisterClasses under HP-UX 11.11
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.2.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-25 10:47 UTC by ams
Modified: 2018-03-08 03:20 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ams 2008-02-25 10:47:31 UTC
I build the DBD::mysql Perl module under HP-UX 11.11 on an RP3440 machine with GCC 4.2.1. The link looked like this:

LD_RUN_PATH="/usr/local/mysql/lib" /opt/perl_64/bin/perl myld gcc -shared -static-libgcc -fPIC -L/lib/pa20_64 dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.sl -L/usr/local/mysql/lib -L/opt/hp-gcc64-4.2.1/lib/gcc/hppa64-hp-hpux11.11/4.2.1 -lmysqlclient -lz -lnsl -lm -lgcc

The module built fine, but its "make test" failed with the following error.

/usr/lib/pa20_64/dld.sl: Unsatisfied code symbol '_Jv_RegisterClasses' in load module '/mnt/DBD-mysql-4.006/blib/arch/auto/DBD/mysql/mysql.sl'

I solved this problem by linking in a stub.o that contained an empty definition of _Jv_RegisterClasses. Apparently the problem is that the HP-UX dynamic linker does not just ignore unresolvable weak symbols as it should, so it's not a gcc bug, but perhaps the symbol should be exported by default, since the weak definition has already been removed for HP-UX in this patch:

http://gcc.gnu.org/ml/gcc-patches/2006-04/msg00327.html
Comment 1 Eric Gallager 2018-03-08 03:20:48 UTC
_Jv_RegisterClasses is a Java thing, and Java has been removed from newer versions of GCC, so I'm going to close this.