Bug 88961 - Error building eclipse-sdk 3.1_pre6: jni.h: No such file
|
Bug#:
88961
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: x86
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: java@gentoo.org
|
Reported By: hermetica@gmail.com
|
|
Component: Ebuilds
|
|
|
URL:
|
|
Summary: Error building eclipse-sdk 3.1_pre6: jni.h: No such file
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2005-04-13 06:52 0000
|
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 :)
does it work without distcc? looks like it's related to distcc, only guessing
however
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.
indeed
added the include, thanks
(lucky it was probably picking up yours from gcc with +gcj)