cannot update jdk15 on amd64
Arne H. Juul
arnej at pvv.ntnu.no
Mon Feb 26 22:27:29 UTC 2007
On Mon, 26 Feb 2007, Hiroyuki Kawakatsu wrote:
> When updating jdk15 (via portmanager -u -f -l) I am getting
>
> /usr/bin/ld: /usr/X11R6/lib/libXm.a(CascadeB.o): relocation
> R_X86_64_32 can not be used when making a shared object; recompile
> with -fPIC
> /usr/X11R6/lib/libXm.a: could not read symbols: Bad value
> gmake[4]: ***
> [/usr/ports/java/jdk15/work/control/build/bsd-amd64/lib/amd64/motif21/libmawt.so]
> Error 1
>
> This is the same error as reported in
> http://lists.freebsd.org/pipermail/freebsd-java/2005-June/003970.html
> except that this is on FreeBSD 6.2-RELEASE.
Ok, I found it now; I was confused because I have the same version number
of open-motif as was reported earlier (2.2.3_2) but my version works.
It's all because of this change to x11-toolkits/open-motif/Makefile:
revision 1.40
date: 2007/02/01 02:42:04; author: kris; state: Exp; lines: +1 -0
Use libtool port instead of included version to avoid objformat a.out
botch
note that the PORTREVISION wasn't bumped in this change (but should have
been). The old version would compile all object files with -fPIC, also
those going into libXm.a; the new libtool change makes libXm.a unusable
for linking into .so files, at least on amd64 platforms.
> The "recompile with -fPIC" message appears to be a symptom of some
> problem with my static libraries rather than really having to do so.
It means what it says, the CascadeB.o inside /usr/X11R6/lib/libXm.a needs
to be compiled with -fPIC but wasn't.
It looks like it was by conscious plan that libXm.a used to be compiled
with -fPIC:
revision 1.33
date: 2004/12/24 06:34:45; author: phantom; state: Exp; lines: +4 -0
While building on amd64 add -fPIC to CFLAGS
so something may need to be done to restore that behaviour with new
libtool. Or alternately, java must stop using the static motif library
and link with the shared library instead.
A quick fix for those currently stuck should be:
cd /usr/ports/x11-toolkits/open-motif
cvs update -D 2007-01-30
rm -rf work
make
make deinstall
make reinstall
cd /usr/ports/java/jdk15
make
(not tested yet, still compiling :-)
- Arne H. J.
More information about the freebsd-java
mailing list