From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.43) id 1E5rth-0003Jv-7T for garchives@archives.gentoo.org; Thu, 18 Aug 2005 21:26:01 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.4/8.13.4) with SMTP id j7ILPYni002968; Thu, 18 Aug 2005 21:25:34 GMT Received: from sommereik.ii.uib.no (sommereik.ii.uib.no [129.177.16.236]) by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j7ILPX7R020386 for ; Thu, 18 Aug 2005 21:25:33 GMT Received: from soft-ease.org ([217.8.137.110]:32930 helo=[192.168.1.116]) by sommereik.ii.uib.no with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.43) id 1E5rtI-0002wY-BA; Thu, 18 Aug 2005 23:25:36 +0200 Message-ID: <4304FC85.3070901@gentoo.org> Date: Thu, 18 Aug 2005 23:24:21 +0200 From: Karl Trygve Kalleberg Organization: Gentoo Foundation User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050727) X-Accept-Language: en-us, en Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-java@gentoo.org MIME-Version: 1.0 To: =?UTF-8?B?UGV0dGVyaSBSw6R0eQ==?= CC: gentoo-java@lists.gentoo.org Subject: [gentoo-java] Re: the new java setup and jni References: <4304B10B.4000603@gentoo.org> <4304E74E.4090002@gentoo.org> <4304EB50.1050605@gentoo.org> In-Reply-To: <4304EB50.1050605@gentoo.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by robin.gentoo.org id j7ILPYo6002968 X-Archives-Salt: 234d43a3-6a21-43e8-b9c4-4aa4bbf26dd6 X-Archives-Hash: 99083e2f8e7f58b06d3366ab25318764 Petteri R=C3=A4ty wrote: > http://lists.debian.org/debian-java/2003/06/msg00005.html This was what I feared, but hoped was not the case. > I like more the idea of making symlinks to /usr/include. That would be > more in line with our switching of vms for compile. I don't see how symlinks in /usr/include can work. If there are two users on a system, each with his own prefered VM, how can we export two sets of symlinks for that system? Furthermore, it will not be possible to switch the system VM's symlink during emerge. Consider the situation where root merges a few Java packages as part of a maintenance cycle, while a regular user (who may not have set their default VM) compiles a Java program which uses JNI. The /usr/include/jni.h seen by the user's compilation may flip between various possible jni.hs, making his program break in mysterious ways. Of course you can argue that this is an unlikely situation, but what if root stops the merge with a ctrl-C? Then the /usr/include/jni.h will be completely wrong, in this scheme. > What is espicially > bad about adding them with -I to CFLAGS? That would be the easiest way > to ensure we are using the jni.h we thought. It would also be better > if gjc did not install jni.h to /usr/include but that is an upstream > issue I think. As you pointed out yourself, some packages try to be smart and find the jni.h themselves. If they use something like if [ -x ${path}/jni.h ], putting an -I in CFLAGS won't help much, and the configure script will probably stop with an error. If the package tries to find the jni.h by compiling with various -I options, we may get lucky. The only remaining problem then is ensuring that we in fact do _not_ have a gcj-installed jni.h in /usr/include, since that may take precedence. -- Karl T --=20 gentoo-java@gentoo.org mailing list