From owner-freebsd-java@FreeBSD.ORG Mon Feb 26 22:27:29 2007 Return-Path: X-Original-To: freebsd-java@freebsd.org Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8C26216A401 for ; Mon, 26 Feb 2007 22:27:29 +0000 (UTC) (envelope-from arnej@pvv.ntnu.no) Received: from decibel.pvv.ntnu.no (decibel.pvv.ntnu.no [129.241.210.179]) by mx1.freebsd.org (Postfix) with ESMTP id 194FD13C4E7 for ; Mon, 26 Feb 2007 22:27:28 +0000 (UTC) (envelope-from arnej@pvv.ntnu.no) Received: from arnej by decibel.pvv.ntnu.no with local (Exim 4.60) (envelope-from ) id 1HLoJb-0000g5-9E; Mon, 26 Feb 2007 23:27:27 +0100 Date: Mon, 26 Feb 2007 23:27:27 +0100 (CET) From: "Arne H. Juul" To: Hiroyuki Kawakatsu In-Reply-To: <307b90470702261045j1a812168y702c2dedd7e64bd8@mail.gmail.com> Message-ID: References: <307b90470702261045j1a812168y702c2dedd7e64bd8@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: kris@freebsd.org, freebsd@vfemail.net, freebsd-java@freebsd.org Subject: Re: cannot update jdk15 on amd64 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Feb 2007 22:27:29 -0000 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.