Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 300401 - dev-java/fec-1.0.4 does not find jni.h file
Summary: dev-java/fec-1.0.4 does not find jni.h file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-10 12:07 UTC by Jouni Rinne
Modified: 2010-02-26 12:25 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,6.48 KB, text/plain)
2010-01-10 12:08 UTC, Jouni Rinne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jouni Rinne 2010-01-10 12:07:27 UTC
Fec-1.0.4 fails with errors about not finding jni.h header file (build.log included). It seems to search it from //opt/sun-jdk-1.6.0.17/include/linux/, but the jni.h is in /opt/sun-jdk-1.6.0.17/include/
Comment 1 Jouni Rinne 2010-01-10 12:08:13 UTC
Created attachment 215922 [details]
build.log
Comment 2 Kyle Milz 2010-01-10 19:28:17 UTC
+1, happens to me also 
Comment 3 Marco Confalonieri 2010-01-17 01:02:37 UTC
This workaround made the trick for me:

# cd $JAVA_HOME/include/linux
# ln -s ../jni.h .

Then you will have a "Bad descriptor" error. I resolved by using:

# CFLAGS=-fPIC emerge --oneshot fec
Comment 4 goffrie 2010-02-21 16:21:21 UTC
When the ebuild calls make, it sets the CFLAGS from make.conf. However, these flags override the CFLAGS set in the Makefile, removing the include directory for jni.h.

A solution is to add the relevant -I flag to CFLAGS. I don't know if this is good practice though.

In the ebuild, before the line

emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" || die

add

append-flags '-I$(JAVA_HOME)/include'


CFLAGS="${CFLAGS}" is also unnecessary, because the environment variable overrides the variable in the makefile (because it was declared with ?=, I suppose).
Comment 5 Alistair Bush (RETIRED) gentoo-dev 2010-02-26 12:25:48 UTC
Hopefully fixed give it a few hours to hit the mirrors.  Reopen this bug if it doesn't work.  Also *.so files should now have a soname entry as well.