public inbox for gentoo-java@lists.gentoo.org
 help / color / mirror / Atom feed
From: Karl Trygve Kalleberg <karltk@gentoo.org>
To: "Petteri Räty" <betelgeuse@gentoo.org>
Cc: gentoo-java@lists.gentoo.org
Subject: [gentoo-java] Re: the new java setup and jni
Date: Thu, 18 Aug 2005 23:24:21 +0200	[thread overview]
Message-ID: <4304FC85.3070901@gentoo.org> (raw)
In-Reply-To: <4304EB50.1050605@gentoo.org>

Petteri Räty 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
-- 
gentoo-java@gentoo.org mailing list



  parent reply	other threads:[~2005-08-18 21:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4304B10B.4000603@gentoo.org>
2005-08-18 19:53 ` [gentoo-java] Re: the new java setup and jni Karl Trygve Kalleberg
     [not found]   ` <4304EB50.1050605@gentoo.org>
2005-08-18 21:24     ` Karl Trygve Kalleberg [this message]
2005-08-19  6:10       ` Petteri Räty
     [not found]         ` <43058192.7020808@pbw.id.au>
2005-08-19 17:00           ` Petteri Räty
     [not found]             ` <43065524.9060603@pbw.id.au>
2005-08-20 11:41               ` Petteri Räty
     [not found]                 ` <43074A51.5070808@pbw.id.au>
2005-08-20 15:30                   ` Petteri Räty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4304FC85.3070901@gentoo.org \
    --to=karltk@gentoo.org \
    --cc=betelgeuse@gentoo.org \
    --cc=gentoo-java@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox