This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug libgcj/38396] [4.4 Regression] libgcj_bc for 4.3 and 4.4 are binary incompatible but have the same SONAME
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 10 Dec 2008 11:09:33 -0000
- Subject: [Bug libgcj/38396] [4.4 Regression] libgcj_bc for 4.3 and 4.4 are binary incompatible but have the same SONAME
- References: <bug-38396-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from jakub at gcc dot gnu dot org 2008-12-10 11:09 -------
-findirect-dispatch compiled/linked programs built with 4.3 work just fine
against 4.4 libgcj_bc.so.1 (that's why libgcj_bc.so.1 was added).
The only problem is if you link a program against both -lgcj_bc and -lgcj,
because if you link say with 4.3, then it will be linked against libgcj_bc.so.1
and libgcj.so.9 and if you then dynamically link it against 4.4 libgcj_bc.so.1,
which depends on libgcj.so.10, both libgcj.so.9 and libgcj.so.10 will be
dynamically linked into the same program, which for obvious reasons can't work
at all (same as for e.g. libstdc++.so.5 and libstdc++.so.6 etc.).
The answer is simple, never link against both -lgcj_bc and -lgcj if you want
the program to work against newer libjava versions. If a program is
-findirect-dispatch as whole, it should be linked against -lgcj_bc, otherwise
against -lgcj.
This is nothing new, for 4.2 to 4.3 you get exactly the same problems.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aph at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38396