Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 186372 - media-gfx/graphviz-2.12 build: error: jni.h: No such file or directory
Summary: media-gfx/graphviz-2.12 build: error: jni.h: No such file or directory
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-23 20:27 UTC by pwoods
Modified: 2008-04-12 09:49 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pwoods 2007-07-23 20:27:31 UTC
A few weeks ago graphviz stopped emerge'ing for me.  I thought I'd wait a while to see if subsequent "emerge --sync" cycles would clear it up.  Alas, no improvement.  The error seems to be java-related.  I don't see any USE flags dealing with java.

Reproducible: Always

Steps to Reproduce:
1. emerge -avuND graphviz
2.
3.

Actual Results:  
[snip]
touch gv_java.man
/bin/sh ../../libtool --tag=CXX   --mode=compile i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../lib/gvc -I../../lib/common -I../../lib/graph -I../../lib/cdt -I../../lib/pathplan -I/usr/lib/perl5/5.8.8/i686-linux/CORE   -I/usr/include/python2.4      -O2 -march=i686 -pipe -MT gv_java.lo -MD -MP -MF .deps/gv_java.Tpo -c -o gv_java.lo gv_java.cpp
mkdir .libs
 i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../lib/gvc -I../../lib/common -I../../lib/graph -I../../lib/cdt -I../../lib/pathplan -I/usr/lib/perl5/5.8.8/i686-linux/CORE -I/usr/include/python2.4 -O2 -march=i686 -pipe -MT gv.lo -MD -MP -MF .deps/gv.Tpo -c gv.cpp  -fPIC -DPIC -o .libs/gv.o
mv -f .deps/gv.Tpo .deps/gv.Plo
/bin/sh ../../libtool --tag=CXX   --mode=compile i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../lib/gvc -I../../lib/common -I../../lib/graph -I../../lib/cdt -I../../lib/pathplan -I/usr/lib/perl5/5.8.8/i686-linux/CORE   -I/usr/include/python2.4      -O2 -march=i686 -pipe -MT gv_perl.lo -MD -MP -MF .deps/gv_perl.Tpo -c -o gv_perl.lo gv_perl.cpp
 i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../lib/gvc -I../../lib/common -I../../lib/graph -I../../lib/cdt -I../../lib/pathplan -I/usr/lib/perl5/5.8.8/i686-linux/CORE -I/usr/include/python2.4 -O2 -march=i686 -pipe -MT gv_java.lo -MD -MP -MF .deps/gv_java.Tpo -c gv_java.cpp  -fPIC -DPIC -o .libs/gv_java.o
gv_java.cpp:138:17: error: jni.h: No such file or directory
gv_java.cpp:162: error: variable or field 'SWIG_JavaThrowException' declared void
gv_java.cpp:162: error: 'JNIEnv' was not declared in this scope
gv_java.cpp:162: error: 'jenv' was not declared in this scope
gv_java.cpp:162: error: expected primary-expression before 'code'
gv_java.cpp:162: error: expected primary-expression before 'const'
[snip]
!!! ERROR: media-gfx/graphviz-2.12 failed.
Call stack:
  ebuild.sh, line 1621:   Called dyn_compile
  ebuild.sh, line 973:   Called qa_call 'src_compile'
  ebuild.sh, line 44:   Called src_compile
  graphviz-2.12.ebuild, line 161:   Called die
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-07-24 11:25:24 UTC
You should post the output of emerge --info

Looks like the ebuild passes --disable-java explicitly to the configure script so there should be no java built. My guess is some functionality triggered by some USE flag pulls it. So you should also post output of 'emerge -pv graphviz' so that we know what flags you are building it with.
Comment 2 pwoods 2007-07-24 17:25:40 UTC
# emerge -pv graphviz

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] media-gfx/graphviz-2.12  USE="X examples perl python -doc -gnome -gtk -nls -pango -ruby -tcl -tk" 0 kB 

Total: 1 package (1 new), Size of downloads: 0 kB
Comment 3 Andy 2007-11-19 12:35:10 UTC
I'm getting the same error while compiling graphviz 2.12. To find out more about this error, I downloaded the current stable version of graphviz from their website (version 2.16) and tried compiling it myself. The weird thing is, if I run configure with the --disable-java parameter, the build fails with the "gv_java.cpp:138:17: error: jni.h: No such file or directory" message, just like the gentoo ebuild. But if I _don't_ use the --disable-java parameter, the build compiles just fine.

I should mention that I do have Java installed on my system. Maybe the --disable-java parameter works incorrectly on systems with Java available. 

Anyway, I can see that this issue has also been filed for graphviz under bug #1212: http://graphviz.org/bugs/b1212.html, so let's hope they'll fix it. In the mean time the workaround for systems such as mine seems to be to enable Java, not disable it. So can we please add a 'java' use flag to the graphviz package and make the --disable-java parameter optional?
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2008-03-18 12:46:13 UTC
Try your luck w/ 2.16.1-r3 or later and report back... Thanks.
Comment 5 Andy 2008-03-18 15:56:44 UTC
No change, both 2.16.1-r4 and 2.18 fail with the same error.
Comment 6 Petteri Räty (RETIRED) gentoo-dev 2008-03-20 23:47:14 UTC
(In reply to comment #5)
> No change, both 2.16.1-r4 and 2.18 fail with the same error.
> 

reopen
Comment 7 Markus Meier gentoo-dev 2008-04-12 09:49:12 UTC
java USE-flag added to media-gfx/graphviz-2.18 - so this should be fixed.