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

Re: GCJ native compilation



On Wed, Feb 08, 2006 at 11:22:21PM +0200, Recai Okta? wrote:
> [Please CC me, since I'm not on the list.]
> 
> Hi,
> 
> I'm working on packaging Zemberek[1], a Java(TM) based Turkish NLP library
> which can be built with GCJ.  I have a few questions, could someone please
> help?
> 
> - 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.

> - 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.

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.
 
> - 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.

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.


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: