Hi,
I just tried to build java-fam-0.1 on redhat-9.0 (which ships with fam).
Seems to work (see attached out file [had to add "include/linux" to get
it to work]). Upon running it, i get the following:
[doggy /tmp/tmp2/java-fam-0.1] ./run-example.sh .
Exception in thread "main" java.lang.UnsatisfiedLinkError:
/tmp/tmp2/java-fam-0.1/src/c/libjavafam.so:
/tmp/tmp2/java-fam-0.1/src/c/libjavafam.so: undefined symbol: FAMOpen2
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1485)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at com.arosii.io.fam.FAM.<clinit>(FAM.java:94)
at DirectoryMonitor.start(DirectoryMonitor.java:61)
at DirectoryMonitor.main(DirectoryMonitor.java:118)
I tried this against the fam included in RH9.0 and fam-2.6.10, both to
no avail. Not being a great C/C++ wizard, I'd be thankful for any advice...
Wolfgang.
Buildfile: build.xml
prepare-build:
build-javac:
build-javah:
[javah] ClassArgument.name=com.arosii.io.fam.FAM
[javah] ClassArgument.name=com.arosii.io.fam.FAMConnection
[javah] ClassArgument.name=com.arosii.io.fam.FAMRequest
[javah] ClassArgument.name=com.arosii.io.fam.FAMEvent
build-c:
[exec] make: Entering directory `/tmp/tmp2/java-fam-0.1/src/c'
[exec] gcc -Wall
-I/home/portnoy/u5/hoschek/java/i386_redhat61/jdk/sun-1.4.2/include:I/home/portnoy/u5/hoschek/java/i386_redhat61/jdk/sun-1.4.2/include/linux
-c fam-jni.c
[exec] fam-jni.c: In function `Java_com_arosii_io_fam_FAM__1open':
[exec] fam-jni.c:87: warning: implicit declaration of function `malloc'
[exec] fam-jni.c:104: warning: implicit declaration of function `free'
[exec] gcc -Wall
-I/home/portnoy/u5/hoschek/java/i386_redhat61/jdk/sun-1.4.2/include:I/home/portnoy/u5/hoschek/java/i386_redhat61/jdk/sun-1.4.2/include/linux
-shared -o libjavafam.so fam-jni.o
[exec] make: Leaving directory `/tmp/tmp2/java-fam-0.1/src/c'
build:
BUILD SUCCESSFUL
Total time: 1 second
|