[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: GCJ native compilation



On Thu, Feb 09, 2006 at 02:00:09AM +0200, Recai Okta? wrote:
> Hi,
> 
> * Michael Koch [2006-02-09 00:02:39+0100]
> > On Wed, Feb 08, 2006 at 11:22:21PM +0200, Recai Okta? wrote:
> > > [Please CC me, since I'm not on the list.]
> [...]
> > > - Is there a policy about naming the CNI ((Compiled Native Interface)
> > >   Debian packages.  I couldn't find any clear reference on Debian Java
> > >   Policy.
> > 
> > Are you talking about CNI libraries or native Java libraries?  I guess mean
> > the later. That is not included in the policy yet. We are working
> > together with other distributions to find a common way in doing this.
> 
> Yes, I mean the later.  Then for the moment, I think including the lib*.so
> files in libpackage-java deb should be a reasonable choice (though it makes
> the package arch dependent)?  Otherwise I have to invent a name.

Why is it hard to "invent" libpackage-java-gcj? Sorry, I forgot to write
about the *-gcj extension.

> > > - Is /usr/lib the right directory for the shared /libpackage*.so files?  Or
> > >   should I use something like /usr/lib/cni?
> > 
> > There are two ways to compile java to native, with the C++ ABI or with
> > the BC ABI. The later is the only one that makes sense for us.
> 
> Hmm, didn't know this ABI issue, thanks for the info.
> 
> > In the eclipse package we currently use /usr/lib/gcj-4.0/ for the
> > lib*.so files and according the classmap file in
> > /usr/share/gcj-4.0/classmap.d/. The master classmap file is
> > /var/lib/gcj-4.0/classmap.db. These are the same paths Fedora and Ubuntu
> > use too. Even Gentoo and Novell/SuSE will use them in the future.
> 
> Then /usr/share/gcj-${version}/classmap.d will be a policy mandated place,
> right?

Yes. It will be. but only for the classmap files. Not for the native
libraries.

> > > - As compared to compiling the .java sources to the native lib*.so, would
> > >   there be a performance decrease if we just compile the .jar file (that
> > >   is, .class files)?  I was unable to find was unable to find any reference
> > >   in the gcj documentation.
> > 
> > The recommended way by upstream is to compile the jar files to native
> > usig the BC ABI.
> 
> After the info below I've found the following document which clearly
> explains the procedure:
> 
>     http://gcc.gnu.org/wiki/How%20to%20BC%20compile%20with%20GCJ
> 
> > I'm currently writing a debhelper script that handles the above
> > transparently. Then the debian/rules script just needs to make sure the
> > script gets called and all is done magically.
> 
> Is it ok to use the gcj-dbtool stuff in ecj-bootstrap-gcj package for the
> moment?  It seems to suit my needs.

Yes, the stuff in ecj-bootstrap-gcj.prerm|postinst looks okay.


Cheers,
Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/



Reply to: