Bug 439627

Summary: Review Request: gluegen - Java/JNI glue code generator to call out to ANSI C
Product: [Fedora] Fedora Reporter: Colin Walters <walters>
Component: Package ReviewAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: fedora-package-review, henriquecsj, kwizart, leifer, lfarkas, loganjerry, mycae, notting, supercyper1, sylvestre
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-13 18:45:00 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On: 167525    
Bug Blocks: 201449, 496433, 439630    
Description Flags
Updated spec file
Updated spec fie with manual as a separated package none

Description Colin Walters 2008-03-29 16:16:06 EDT
Spec URL: http://cdn.verbum.org/gluegen.spec
SRPM URL: http://cdn.verbum.org/gluegen-1.0-0.1.20080329cvs.fc9.src.rpm

GlueGen is a tool which automatically generates the Java and JNI
code necessary to call C libraries. It reads as input ANSI C header
files and separate configuration files which provide control over
many aspects of the glue code generation. GlueGen uses a complete
ANSI C parser and an internal representation (IR) capable of
representing all C types to represent the APIs for which it
generates interfaces.
Comment 1 Nicolas Chauvet (kwizart) 2008-04-16 10:12:06 EDT
Some preliminary notes:
I cannot install F-9 for now so I won't be able to test with F-9 openJDK-1.6
Testing with java >= 1.6 for now on x86_64.

Ok the main problem with this package is about the content of make/lib/.
According to the new packaging guidelines, we have to remove the bundled .jar
and .class files.
If removed, the current package doesn't build anymore (even if using your patch
or defining ant -v -Dantlr.jar=$(build-classpath antlr) at build time.

Suggested BR and Requires:
BuildRequires: java-devel >= 1.6
BuildRequires: jpackage-utils >= 1.6
BuildRequires: ant, ant-contrib, ant-antlr (not sure for each of them).
Requires: jpackage-utils >= 1.6
Requires: java >= 1.6
I wonder if ant-antlr will be Requested at runtime; maybe others will be needed.

Suggested Group:
Group: Development/Libraries

Can you use %{_javadir} when appropriate (instead of %{_datadir}/java ).

This make me think that gluegen uses a patched version of cpptasks, and i don't
know how to force it to use the system one (if possible and relevant).

Found some patches here to support ppc build:

I wonder if we need to add our $RPM_OPT_FLAGS in java packages:
gcc -c -fno-rtti -fPIC -I/usr/lib/jvm/java-1.6.0-openjdk-
[cc] cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but
not for C

Since you have created a snapshot, it would be nicer if you can create a script
to make this snapshot, remove the included .jar files, and fix (executable)
permissions for most files.
LICENSE.txt will need to be bundled.

manual seems to be missing.
Comment 2 Tom "spot" Callaway 2008-05-12 15:32:37 EDT
Since this depends on jogl, which is blocked by FE-Legal, I'm closing this
CANTFIX. You may want to take both of them over to Livna/RPMFusion non-free.
Comment 3 Colin Walters 2008-05-12 15:37:28 EDT
I believe it's the other way around - jogl depends on gluegen.  So this package
should potentially be able to go in.
Comment 4 Tom "spot" Callaway 2008-05-12 15:50:12 EDT
Ahh, okay. 
Comment 5 Nicolas Chauvet (kwizart) 2008-07-02 20:23:05 EDT
Any thought on #1 ?
I could formally Review the package once I get an answer...
Comment 6 Nicolas Chauvet (kwizart) 2008-07-20 17:22:28 EDT
Gluegen could probably be extracted to the jogl release 1.1.1.
Maybe we can have the jogl problematic license replaced (like what was done for
glew if i remember). If not possible, i'm thinking of having jogl submitted in a
third part repository.
Comment 7 Jason Tibbitts 2008-11-05 11:19:35 EST
Any updates here?  Things seem to have been waiting on a response from Colin for a few months now.  Setting needinfo; I guess I'll close this if there's no response soon.
Comment 8 Jason Tibbitts 2009-01-13 18:45:00 EST
Over two months later, I'm just going to close this.
Comment 9 Levente Farkas 2009-02-20 06:45:34 EST
why? it seems FE-Legal block was released. wouldn't like to reopen?
Comment 10 Henrique "LonelySpooky" Junior 2009-03-04 19:07:36 EST
I'll try to work on this package. If all works fine is ok to reopen this review process?
Comment 11 Henrique "LonelySpooky" Junior 2009-03-05 22:07:15 EST
This is my first draft of the RPM for gluegen. As I've commented in the Scilab's review, I'm not an experienced packager (in fact, I am still learning) but I like to contribute in any way to take Scilab officially in Fedora as soon as possible, since it is a very important software for various tipes of engineering.
I was able to generate the RPM of gluegen and the documentation, but rpmlint still has some errors (which I do not know how to solve).
I have some time to devote to the package in this weekend and in the next week, so if you have some patience to guide me, I'll be very happy to help. =)
By the way, this spec is based on Mandriva's and Colin Walters's specs.

SPEC: http://lspooky.fedorapeople.org/gluegen/1.0-1/gluegen.spec
SRPM: http://lspooky.fedorapeople.org/gluegen/1.0-1/gluegen-1.0-1.20090305cvs.fc10.src.rpm

rpmlint errors:
[lonely@localhost i386]$ rpmlint gluegen-1.0-1.20090305cvs.fc10.i386.rpm 
gluegen.i386: W: no-documentation
gluegen.i386: W: non-standard-group Libraries
gluegen.i386: W: unstripped-binary-or-object /usr/lib/libgluegen-rt.so
gluegen.i386: W: no-soname /usr/lib/libgluegen-rt.so
gluegen.i386: W: class-path-in-manifest /usr/share/java/gluegen-1.0.jar
1 packages and 0 specfiles checked; 0 errors, 5 warnings.

[lonely@localhost i386]$ rpmlint gluegen-manual-1.0-1.20090305cvs.fc10.i386.rpm 
gluegen-manual.i386: W: spurious-executable-perm /usr/share/doc/gluegen-manual-1.0/manual/index.html
gluegen-manual.i386: W: non-standard-group Libraries
1 packages and 0 specfiles checked; 0 errors, 2 warnings.

[lonely@localhost SRPMS]$ rpmlint gluegen-1.0-1.20090305cvs.fc10.src.rpm 
gluegen.src: W: non-standard-group Libraries
1 packages and 0 specfiles checked; 0 errors, 1 warnings.
Comment 12 D Haley 2009-03-06 02:16:41 EST
A few off-the-cuff comments:

I think:
># vs -d :pserver:username@cvs.dev.java.net:/cvs checkout gluegen

Should be:
# cvs -d :pserver:username@cvs.dev.java.net:/cvs checkout gluegen

The error:
>gluegen.i386: W: no-documentation
Means that you should have the doc macro. Normally you would include things such as a changelog, licence files and readme stuff, or other such things:
Its easy fixed just use something like:
or similar in your %files section.

>gluegen.i386: W: non-standard-group Libraries

Group:		Libraries

Group:		Development/Libraries

For each instance

>gluegen.i386: W: class-path-in-manifest /usr/share/java/gluegen-1.0.jar
Looks like your jar file has a MANIFEST in it. You need to sort this out, not sure exactly what is the best way.

>gluegen.i386: W: no-soname /usr/lib/libgluegen-rt.so
You may need to tell GCC what soname to use. See bug 464781 comment 27 

>gluegen-manual.i386: W: spurious-executable-perm
Sounds like "/usr/share/doc/gluegen-manual-1.0/manual/index.html"  in your rpm has bad permissions. You may need to chmod it.

>gluegen.i386: W: unstripped-binary-or-object /usr/lib/libgluegen-rt.so
.so files need to be executable for rpmbuild to strip them (I fell into this trap).

Can this be re-opened?
Comment 13 D Haley 2009-03-06 02:25:28 EST
A few more, that I missed earlier:

Summary:	User documetation for %{name}

Typo "documentation"

Can you throw in the no-bad jar check, for those of us too lazy to grab the SRPM? Its in 


Also this page has the MANIFEST problem (with solution) outlined.

Finally, if possible a scratch build would be great
Comment 14 D Haley 2009-03-06 02:29:35 EST
>You may need to tell GCC what soname to use. See bug 464781 comment 27 
Apologies for more noise, that link is for the so executable problem. The link for the soname issue is : bug 474787 comment 6 .
Comment 15 Henrique "LonelySpooky" Junior 2009-03-10 10:03:46 EDT
Hi, only to keep you updated, I'm - still - working in this package:
rpmling has 3 complains to solve (the worse ones, I think):

[lonely@localhost i386]$ rpmlint .
gluegen.i386: W: unstripped-binary-or-object /usr/lib/libgluegen-rt.so
gluegen.i386: W: no-soname /usr/lib/libgluegen-rt.so
gluegen.i386: W: class-path-in-manifest /usr/share/java/gluegen-1.0.jar
2 packages and 0 specfiles checked; 0 errors, 3 warnings.

And following D Haley's hints I know that I must not use the .jar files provided in the sources:
These JAR files should be deleted and symlinked to system JAR files:

I'm sorry to say, but I'm completely blind in java and I do not know how to provide this libraries and this will take some more time.
Comment 16 D Haley 2009-03-10 10:16:18 EDT
You may wish too work out what bug 167525 is all about.
Comment 17 D Haley 2009-03-10 10:48:48 EDT
> gluegen.i386: W: no-soname /usr/lib/libgluegen-rt.so

This may not be right, but when ant builds the so file using the gcc rule in the build.xml, see if the arguments listing has something that looks like the following (pinched from http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html).

gcc -shared -Wl,-soname,your_soname \
    -o library_name file_list library_list

 If it doesn't you may need to patch build.xml. Your soname should, I believe, be glugen-rt in this case.
Comment 18 Henrique "LonelySpooky" Junior 2009-03-10 11:25:26 EDT
Hi, Haley,
As I can see we're in the "the chicken or the egg" paradox... to make gluegen we need cpptasks 167525 and jogl 439630 , but jogl depends on gluegen, so, if we solve this soname problem, gluegen may not be approved since jogl and cpptasks are not in our repos, right?
Comment 19 Henrique "LonelySpooky" Junior 2009-03-10 13:23:19 EDT
Sorry for the noise

We have some substantial work done right here:

maybe if we mix some solutions we get better results.
Comment 20 D Haley 2009-03-10 19:57:36 EDT
To build gluegen you shouldn't need jogl (see comment 3). Jogl needs gluegen, however and it wants it in source form, which is a problem for us, but not a problem that needs to be tackled here.

To build gluegen, however, you will need cpptasks.

>gluegen may not be approved since jogl and
>cpptasks are not in our repos, right?  

If you get a good SPEC for this, without cpptasks you might not get approval and cpptasks will need to be finished first.
Comment 21 Henrique "LonelySpooky" Junior 2009-03-11 08:20:39 EDT
So, I'll take a look at cpptasks at first and see if I'm able to package it
Comment 22 Takanori MATSUURA 2009-05-27 03:44:39 EDT
Created attachment 345573 [details]
Updated spec file

I have updated spec file from that Henrique was generated.

With this spec file, I get only one warning:
$ rpmlint gluegen-1.0-0.20090527.svn.fc10.x86_64.rpm 
gluegen.x86_64: W: no-soname /usr/lib64/libgluegen-rt.so
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

I'm not familiar with this issue.  So I hope someone will help for this issue.
Comment 23 Nicolas Chauvet (kwizart) 2009-05-27 03:58:39 EDT
Having gluegen splitted isn't that difficult, what remains harder is to have this version of gluegen used to build jogl. (at least, last time I've tried).
(then jogl used by openjdk will be the next step)

soname is stand for Shared Object NAME, aka the internal name of the library which is defined at link time.
usually readelf -a any_system_library.so.x |grep SONAME will show you the one used to recognize the library.

But I don't know how ant do to generate soname nor if that's usefull for a java architecture dependant package. (I guess it is).
Comment 24 Takanori MATSUURA 2009-05-27 06:25:47 EDT
Created attachment 345591 [details]
Updated spec fie with manual as a separated package

We hope jogl will bundled as a Fedora package.
Comment 25 D Haley 2009-05-29 11:56:19 EDT
OK, seeing as no-one else has so far proposed a package that everyone can agree on, here's my shot:

SPEC URL : http://dhd.selfip.com/427e/gluegen.spec
SRPM URL : http://dhd.selfip.com/427e/gluegen-1.0-0.135.svn.fc10.src.rpm

No, requires cpptasks (can someone reopen cpptasks?)

$ rpmlint gluegen.spec ../SRPMS/gluegen-1.0-0.135.svn.fc10.src.rpm ../RPMS/i386/gluegen-1.0-0.135.svn.fc10.i386.rpm 
2 packages and 1 specfiles checked; 0 errors, 0 warnings.
Comment 26 Nicolas Chauvet (kwizart) 2009-05-29 14:30:02 EDT
Again what need to be done is to see if this gluegen is capable to build jogl.
If not, there is no reason to validate this package because it will fail the usability test of the package review.
Comment 27 D Haley 2009-05-29 20:42:50 EDT
I think you might be looking at this from a slightly different perspective. If we want jogl to build, we need to modify the jogl build system to decouple it from gluegen. Jogl itself will work with gluegen *once built* -- its a matter of tricking ant to do what we need.

I had a shot at this a while back, and was able to decouple it, but some java errors I introduced caused some problems.
Comment 28 Jerry James 2009-10-04 23:48:48 EDT
Is there interest in reopening this review bug now that cpptasks is available?  If so, who is the submitter?
Comment 29 Henrique "LonelySpooky" Junior 2009-12-06 12:18:23 EST
Hi, any movement here?
Comment 30 Henrique "LonelySpooky" Junior 2009-12-06 15:33:08 EST
So, I did some minor changes, now, using our available cpptasks.

[lonely@localhost i686]$ rpmlint gluegen-1.0-1.135.svn.fc12.i686.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

SPEC: http://lonelyspooky.com/uploads/SRPMs/gluegen/1.0-1.135.svn/gluegen.spec
SRPM: http://lonelyspooky.com/uploads/SRPMs/gluegen/1.0-1.135.svn/gluegen-1.0-1.135.svn.fc12.src.rpm
Comment 31 Sylvestre Ledru 2009-12-07 06:40:12 EST
With the current development version of gluegen and jogl, it is possible to build them separately.

It is not optimal from the packaging point of view (jogl is going to search for gluegen files into ../gluegen/) but I have been able to produce independent packages for Debian. I will try to upload my patches tonight.

Next time, try Scilab with jogl 2.0.
Comment 32 Henrique "LonelySpooky" Junior 2009-12-08 17:27:05 EST
Hi, Sylvestre,
As you said, I've tried to build jogl from tha latest source and it complains about gluegen:

[lonely@localhost make]$ ant
Buildfile: build.xml

/home/lonely/jogl~jogl-git/make/build.xml:8: Cannot find ../../gluegen/make/gluegen-cpptasks.xml imported from /home/lonely/jogl~jogl-git/make/build.xml

If we can work around this we can, finally, have scilab in Fedora.
Comment 33 Sylvestre Ledru 2009-12-08 18:00:37 EST
Henrique, I just updated the bug #439630 with a preliminary patch for this.
Comment 34 Chen Lei 2010-01-31 02:00:29 EST
There's some patch for gluegen and jogl from gentoo overlay, I think it can works OK for fedora.
Comment 35 Henrique "LonelySpooky" Junior 2010-02-21 10:20:20 EST
I'm able to build gluegen from the same tarball of jogl. Please, take a look at:
SPEC: http://lspooky.fedorapeople.org/gluegen/1.1.1/1/gluegen.spec
SRPM: http://lspooky.fedorapeople.org/gluegen/1.1.1/1/gluegen-1.1.1-1.fc12.src.rpm

rpmlint looks (almost) clean, except for this problem with the source URL, since the source was repackaged:
[lonely@localhost rpmbuild]$ rpmlint RPMS/i686/gluegen-1.1.1-1.fc12.i686.rpm 
gluegen.i686: W: class-path-in-manifest /usr/share/java/gluegen-1.1.1.jar
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

[lonely@localhost rpmbuild]$ rpmlint SRPMS/gluegen-1.1.1-1.fc12.src.rpm 
gluegen.src: W: invalid-url Source0: jogl.tar.gz
1 packages and 0 specfiles checked; 0 errors, 1 warnings.
Comment 36 Chen Lei 2010-02-21 10:43:29 EST
Maybe you can use a different ustream of gluegen like # svn export -r "{2009-05-09}" https://gluegen.dev.java.net/svn/gluegen/trunk
# gluegen --username xxx --password xxx

See http://gentoo-overlays.zugaina.org/java-overlay/portage/dev-java/gluegen
Comment 37 Henrique "LonelySpooky" Junior 2010-02-21 11:16:06 EST
From what I read (can not remember where), the problem is to maintain compatibility between JOGL and gluegen. It seems that JOGL does not compile with all versions of gluegen and therefore may be better to always use the married versions of the tarball.
Since the development of both (JOGL and gluegen) is not very fast, a conservative position should be better.
Comment 38 Chen Lei 2010-02-21 12:11:58 EST
(In reply to comment #37)
> From what I read (can not remember where), the problem is to maintain
> compatibility between JOGL and gluegen. It seems that JOGL does not compile
> with all versions of gluegen and therefore may be better to always use the
> married versions of the tarball.
> Since the development of both (JOGL and gluegen) is not very fast, a
> conservative position should be better.    

The following svn version gluegen can works file with jogl. gentoo uses it for scilab 5.2.0. You need register a username in www.dev.java.net.
svn export -r
"{2009-05-09}" https://gluegen.dev.java.net/svn/gluegen/trunk gluegen --username xxx --password xxx
Comment 39 Henrique "LonelySpooky" Junior 2010-02-21 14:49:12 EST
Ok, I got the SVN version from upstream. It seems to build without problems.
The 1.1.1 version of JOGL, in other way, started to complain:
/home/lonely/jogl/jogl/make/build.xml:1562: The following error occurred while executing this line:
/home/lonely/jogl/jogl/make/build.xml:576: GlueGen returned: 1
I have not tested the SVN version of JOGL (yet), bot as soon as possible I'll give it a try.
Comment 40 Henrique "LonelySpooky" Junior 2010-02-25 19:03:55 EST
I have just updated gluegen to use the (recommended) svn version that upstrean uses with jogl.
rpmlint is almost happy, but still complains about the invalid-url

[lonely@localhost SPECS]$ rpmlint ../SRPMS/gluegen-1.0.20102502svn-2.fc12.src.rpm 
gluegen.src: W: invalid-url Source0: gluegen-1.0.20102502svn.tar.gz
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

[lonely@localhost SPECS]$ rpmlint ../RPMS/i686/gluegen-1.0.20102502svn-2.fc12.i686.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
Comment 42 Henrique "LonelySpooky" Junior 2010-03-09 11:04:44 EST
Here we go with a little update. This version makes, also, a package named gluegen-source, used by JOGL.
spec: http://lspooky.fedorapeople.org/gluegen/1.0.20102502svn/3/gluegen.spec
srpm: http://lspooky.fedorapeople.org/gluegen/1.0.20102502svn/3/gluegen-1.0.20102502svn-3.fc12.src.rpm
Comment 43 Henrique "LonelySpooky" Junior 2010-03-10 16:06:59 EST
I guess is time to reopen this review. Should I create a new one?
Comment 44 Henrique "LonelySpooky" Junior 2010-03-11 07:26:45 EST

*** This bug has been marked as a duplicate of bug 572512 ***