Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 88961 - Error building eclipse-sdk 3.1_pre6: jni.h: No such file
Summary: Error building eclipse-sdk 3.1_pre6: jni.h: No such file
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: 2005-04-13 06:52 UTC by Sebastian
Modified: 2005-04-13 14:10 UTC (History)
0 users

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 Sebastian 2005-04-13 06:52:50 UTC
When I emerge eclipse-sdk with USE="mozilla" it fails because dont found jni.h, that file is in $JAVA_HOME/include, but the "-I$JAVA_HOME/include" is not in the ebuild:

---------------------------------------------------------------------------
export SWT_PTR_CFLAGS="${swt_ptr_cflags} -I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux"
---------------------------------------------------------------------------

Adding "-I${JAVA_HOME}/include" in file /usr/portage/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre6.ebuild, line 481 fix the problem.

Reproducible: Always
Steps to Reproduce:
1. USE="mozilla" emerge -av eclipse-sdk
2. Wait start the compilation for xpcom.cpp
3. Get the error:
7/include/linux  -I/opt/sun-jdk-1.4.2.07/include/linux -c xpcom.cpp
distcc[3302] ERROR: compile (null) on localhost failed
In file included from xpcom.cpp:29:
swt.h:23:17: jni.h: No such file or directory
In file included from xpcom.cpp:29:
swt.h:64: error: `JNIEnv' was not declared in this scope
swt.h:64: error: `env' was not declared in this scope
swt.h:64: error: variable or field `throwOutOfMemory' declared void
In file included from xpcom.cpp:30:
xpcom_structs.h:32: error: `JNIEnv' was not declared in this scope
xpcom_structs.h:32: error: `env' was not declared in this scope
xpcom_structs.h:32: error: `jobject' was not declared in this scope
xpcom_structs.h:32: error: parse error before `)' token
xpcom_structs.h:33: error: `JNIEnv' was not declared in this scope


Actual Results:  
Error:
7/include/linux  -I/opt/sun-jdk-1.4.2.07/include/linux -c xpcom.cpp
distcc[3302] ERROR: compile (null) on localhost failed
In file included from xpcom.cpp:29:
swt.h:23:17: jni.h: No such file or directory
In file included from xpcom.cpp:29:
swt.h:64: error: `JNIEnv' was not declared in this scope
swt.h:64: error: `env' was not declared in this scope
swt.h:64: error: variable or field `throwOutOfMemory' declared void
In file included from xpcom.cpp:30:
xpcom_structs.h:32: error: `JNIEnv' was not declared in this scope
xpcom_structs.h:32: error: `env' was not declared in this scope
xpcom_structs.h:32: error: `jobject' was not declared in this scope
xpcom_structs.h:32: error: parse error before `)' token
xpcom_structs.h:33: error: `JNIEnv' was not declared in this scope


Expected Results:  
Emerge ends succefully :)
Comment 1 Jan Brinkmann (RETIRED) gentoo-dev 2005-04-13 12:29:50 UTC
does it work without distcc? looks like it's related to distcc, only guessing however
Comment 2 Sebastian 2005-04-13 12:58:42 UTC
With and without distcc I get the same error, the fix/workaround I found is editing the ebuild and add the gcc's "-I...." option.
Comment 3 Thomas Matthijs (RETIRED) gentoo-dev 2005-04-13 13:48:06 UTC
indeed
added the include, thanks

(lucky it was probably picking up yours from gcc with +gcj)
Comment 4 Jan Brinkmann (RETIRED) gentoo-dev 2005-04-13 14:08:55 UTC
ah, i see.
Comment 5 Thomas Matthijs (RETIRED) gentoo-dev 2005-04-13 14:10:29 UTC
forgot to mark fixed :-)