Does the "undefined reference to `_imp__jni_getcreatedjava...@12'" error 
in the JDK check disappear if you add "-Wl,--kill-at" to the linker 
flags? If so, we may need to re-organize things a bit so that the JDK 
check can make use of the --kill-at check performed elsewhere by configure.

-- ES


On 1/6/2011 2:00 PM, Sp4M wrote:
> Hi !
>
> - The log extract was probably too short sorry, here is a longuest version.
> - The 'java' command was already found by the shell (and JAVA_HOME is
> set), no problem here.
> - All the paths in the -L directives (and -I ones) are correct.
> - If "jvm.dll" (under windows) file isn't correctly located, we get a
> normal "cannot find -ljvm ..." error. I located mine by adding the
> /-L/F/PROG/Java///jdk1.6.0_23/jre/bin/client /directive. Note that if I
> use the "/jdk1.6.0_23/jre/bin/server/jvm.dll" /instead of the
> "/jdk1.6.0_23/jre/bin/client/jvm.dll/' one, we get the following error :
> "/f:/PROG/Java/jdk1.6.0_23/jre/bin/server/jvm.dll: file not recognized:
> File format not recognized/"
> - The remaining error always seems to be linked with that jvm.dll file
> but how (...?)
>
> Longuer extract :
> /.../
>
>     /configure:14457: checking for java/
>     /configure:14475: found /f/PROG/Java/jdk1.6.0_23/bin/java/
>     /configure:14487: result: /f/PROG/Java/jdk1.6.0_23/bin/java/
>     /configure:14518: checking for javac/
>     /configure:14536: found /f/PROG/Java/jdk1.6.0_23/bin/javac/
>     /configure:14548: result: /f/PROG/Java/jdk1.6.0_23/bin/javac/
>     /configure:14580: checking for Java SDK/
>     /configure:14593: $JAVAC conftest.java/
>     /configure:14596: $? = 0/
>     /configure:14628: CLASSPATH=. /f/PROG/Java/jdk1.6.0_23/bin/java
>     conftest java.home/
>     /configure:14631: 0 = 0/
>     /configure:14657: CLASSPATH=. /f/PROG/Java/jdk1.6.0_23/bin/java
>     conftest java.library.path/
>     /configure:14660: 0 = 0/
>     /configure:14686: result: yes/
>     /configure:14689: checking if Java SDK is usable/
>     /configure:14805: gcc -o conftest.exe
>     -I/F/PROG/Java/jdk1.6.0_23/include
>     -I/F/PROG/Java/jdk1.6.0_23/include/win32
>     -I/F/PROG/CrystalSpaceLibs/mingw/include
>     -I/F/PROG/CrystalSpaceLibs/common/include -L/F/PROG/Java/jdk1.6.0_23
>     -L/F/PROG/Java/jdk1.6.0_23/bin -L/F/PROG/CrystalSpaceLibs/bin
>     -L/F/PROG/CrystalSpaceLibs/dlls/mingw
>     -L/F/PROG/CrystalSpaceLibs/dlls -L/F/PROG/CrystalSpaceLibs/tools
>     -L/F/PROG/MinGW/msys/1.0/bin -L/F/PROG/MinGW/msys/1.0/local/bin
>     -L/F/PROG/MinGW/msys/1.0/sw/bin -L/F/PROG/MinGW/bin
>     -L/F/PROG/CrystalSpace -L/F/PROG/CrystalSpaceLibs/mingw-gcc-4.5/lib
>     -L/F/PROG/CrystalSpaceLibs/mingw/lib
>     -L/F/PROG/CrystalSpaceLibs/common/lib
>     -L/F/PROG/Java///jdk1.6.0_23/jre/bin/client conftest.c -ljvm >&5/
>     /C:\Users\Sp4M\AppData\Local\Temp\cc4OcxxW.o:conftest.c:(.text+0x2e): 
> undefined
>     reference to `_imp__jni_getcreatedjava...@12'/
>     /collect2: ld returned 1 exit status/
>     /configure:14812: $? = 1/
>     /configure: failed program was:/
>     /| /* confdefs.h.  *//
>     /| #define PACKAGE_NAME "crystalspace"/
>     /| #define PACKAGE_TARNAME "crystalspace"/
>     /| #define PACKAGE_VERSION "1.4.0"/
>     /| #define PACKAGE_STRING "crystalspace 1.4.0"/
>     /| #define PACKAGE_BUGREPORT "[email protected]
>     <mailto:[email protected]>"/
>     /| #define STDC_HEADERS 1/
>     /| #define HAVE_SYS_TYPES_H 1/
>     /| #define HAVE_SYS_STAT_H 1/
>     /| #define HAVE_STDLIB_H 1/
>     /| #define HAVE_STRING_H 1/
>     /| #define HAVE_MEMORY_H 1/
>     /| #define HAVE_STRINGS_H 1/
>     /| #define HAVE_INTTYPES_H 1/
>     /| #define HAVE_STDINT_H 1/
>     /| #define HAVE_UNISTD_H 1/
>     /| #define HAVE_CMATH 1/
>     /| #define HAVE_MATH_H 1/
>     /| #define CS_PLATFORM_WIN32 /**//
>     /| /* end confdefs.h.  *//
>     /| #if defined(__GNUC__)/
>     /| typedef long long __int64; /* For GCC on Windows *//
>     /| #endif/
>     /| /* Fix for 'jlong' on x86_64. *//
>     /| #if defined(__x86_64)/
>     /| #ifdef _LP64 /* 64-bit Solaris *//
>     /| #undef _LP64/
>     /| #endif/
>     /| #endif/
>     /| #include <jni.h>/
>     /| JNIEXPORT void JNICALL f(JNIEnv* env, jobject obj);/
>     /| int/
>     /| main ()/
>     /| {/
>     /| JNI_GetCreatedJavaVMs(0,0,0);/
>     /|   ;/
>     /|   return 0;/
>     /| }/
>     /configure:14805: gcc -o conftest.exe
>     -I/F/PROG/Java/jdk1.6.0_23/include
>     -I/F/PROG/Java/jdk1.6.0_23/include/win32
>     -I/F/PROG/CrystalSpaceLibs/mingw/include
>     -I/F/PROG/CrystalSpaceLibs/common/include -L/F/PROG/Java/jdk1.6.0_23
>     -L/F/PROG/Java/jdk1.6.0_23/bin -L/F/PROG/CrystalSpaceLibs/bin
>     -L/F/PROG/CrystalSpaceLibs/dlls/mingw
>     -L/F/PROG/CrystalSpaceLibs/dlls -L/F/PROG/CrystalSpaceLibs/tools
>     -L/F/PROG/MinGW/msys/1.0/bin -L/F/PROG/MinGW/msys/1.0/local/bin
>     -L/F/PROG/MinGW/msys/1.0/sw/bin -L/F/PROG/MinGW/bin
>     -L/F/PROG/CrystalSpace -L/F/PROG/CrystalSpaceLibs/mingw-gcc-4.5/lib
>     -L/F/PROG/CrystalSpaceLibs/mingw/lib
>     -L/F/PROG/CrystalSpaceLibs/common/lib
>     -L/F/PROG/Java/jdk1.4/jdk/jre/bin/server conftest.c -ljvm >&5/
>     /C:\Users\Sp4M\AppData\Local\Temp\ccGjZxPP.o:conftest.c:(.text+0x2e): 
> undefined
>     reference to `_imp__jni_getcreatedjava...@12'/
>     /collect2: ld returned 1 exit status/
>     /configure:14812: $? = 1/
>     /configure: failed program was:/
>     /| /* confdefs.h.  *//
>     /| #define PACKAGE_NAME "crystalspace"/
>     /| #define PACKAGE_TARNAME "crystalspace"/
>     /| #define PACKAGE_VERSION "1.4.0"/
>     /| #define PACKAGE_STRING "crystalspace 1.4.0"/
>     /| #define PACKAGE_BUGREPORT "[email protected]
>     <mailto:[email protected]>"/
>     /| #define STDC_HEADERS 1/
>     /| #define HAVE_SYS_TYPES_H 1/
>     /| #define HAVE_SYS_STAT_H 1/
>     /| #define HAVE_STDLIB_H 1/
>     /| #define HAVE_STRING_H 1/
>     /| #define HAVE_MEMORY_H 1/
>     /| #define HAVE_STRINGS_H 1/
>     /| #define HAVE_INTTYPES_H 1/
>     /| #define HAVE_STDINT_H 1/
>     /| #define HAVE_UNISTD_H 1/
>     /| #define HAVE_CMATH 1/
>     /| #define HAVE_MATH_H 1/
>     /| #define CS_PLATFORM_WIN32 /**//
>     /| /* end confdefs.h.  *//
>     /| #if defined(__GNUC__)/
>     /| typedef long long __int64; /* For GCC on Windows *//
>     /| #endif/
>     /| /* Fix for 'jlong' on x86_64. *//
>     /| #if defined(__x86_64)/
>     /| #ifdef _LP64 /* 64-bit Solaris *//
>     /| #undef _LP64/
>     /| #endif/
>     /| #endif/
>     /| #include <jni.h>/
>     /| JNIEXPORT void JNICALL f(JNIEnv* env, jobject obj);/
>     /| int/
>     /| main ()/
>     /| {/
>     /| JNI_GetCreatedJavaVMs(0,0,0);/
>     /|   ;/
>     /|   return 0;/
>     /| }/
>     /configure:14861: result: no/
>     /configure:15078: checking for ant/
>     /configure:15096: found /f/PROG/apache-ant-1.8.2/bin/ant/
>     /configure:15108: result: /f/PROG/apache-ant-1.8.2/bin/ant /
>     /.../
>
>
> 2011/1/4 Eric Sunshine <[email protected]
> <mailto:[email protected]>>
>
>     On 12/30/2010 9:34 PM, Sp4M wrote:
>      > I followed your suggestions and installed MSYS/MinGW.
>      > Quite everything looks fine when I ./configure, but the java SDK
>     usability.
>      > *Problem 1)*
>      > Extract of the config.log
>      >     /configure:14689: checking if Java SDK is usable/
>      >     /configure:14802: gcc -o conftest.exe
>      >       -I/F/PROG/CrystalSpaceLibs/mingw/include
>      >     -I/F/PROG/CrystalSpaceLibs/common/include
>      >       -I/F/PROG/CrystalSpaceLibs/mingw/include
>      >     -I/F/PROG/CrystalSpaceLibs/common/include
>      >       -L/F/PROG/CrystalSpaceLibs/mingw-gcc-4.5/lib
>      >     -L/F/PROG/CrystalSpaceLibs/mingw/lib
>      >     -L/F/PROG/CrystalSpaceLibs/common/lib conftest.c >&5/
>      >     /conftest.c:30:19: fatal error: jni.h: No such file or directory/
>
>     This extract is probably too short. You need to look at everything
>     between the "checking if..." message and the final "no" message. There
>     should be a series of "gcc" attempts (five or more) before the final
>     "no". Some or all of them will be failures (depending upon platform and
>     setup).
>
>      > I tried to add '/F:\PROG\Java\jdk1.4\jdk\include/' and
>      > '/F:\PROG\Java\jdk1.4\jdk\include\win32/' to the PATH: same problem.
>
>     To PATH, you should add the path containing java.exe. Alternately, as I
>     recall, you can set JAVAHOME to the root of the Java installation. In
>     either case, the configure check will query java.exe for the location of
>     the Java headers and libraries.
>
>      > I tried to by-pass the problem by calling: configure
>     "CPPFLAGS=$CPPFLAGS
>      > -I/F/PROG/Java/jdk1.4/jdk/include
>     -I/F/PROG/Java/jdk1.4/jdk/include/win32"
>      > Here it seems to find jni.h correctly, but ...
>      > *Problem 2)*
>      > Extract of the config.log
>      >     /configure:14689: checking if Java SDK is usable/
>      >     /configure:14802: gcc -o conftest.exe
>      >       -I/F/PROG/CrystalSpaceLibs/mingw/include
>      >     -I/F/PROG/CrystalSpaceLibs/common/include
>      >       -I/f/PROG/Java/jdk1.4/jdk/include/
>      >     -I/f/PROG/Java/jdk1.4/jdk/include/win32
>      >     -I/F/PROG/CrystalSpaceLibs/mingw/include
>      >     -I/F/PROG/CrystalSpaceLibs/common/include
>      >       -L/F/PROG/CrystalSpaceLibs/mingw-gcc-4.5/lib
>      >     -L/F/PROG/CrystalSpaceLibs/mingw/lib
>      >     -L/F/PROG/CrystalSpaceLibs/common/lib conftest.c >&5/
>      >
>     /C:\Users\Sp4M\AppData\Local\Temp\ccKB2qIc.o:conftest.c:(.text+0x2e): 
> undefined
>      >     reference to `_imp__jni_getcreatedjava...@12'/
>      >     /collect2: ld returned 1 exit status/
>
>     Are the paths in the -L directives correct? Also, in the above output, I
>     don't see it actually linking against the Java libraries.
>
>      > Question 1: Can we consider to find a better way to solve the jni.h
>      > finding problem ?
>
>     See above about making sure that java.exe is found. It should be
>     automatic. If that isn't working, then we need to determine why.
>
>      > Question 2: Do you have an idea about this second error ? I read some
>      > stuff about ld version, or jvm.dll, tried many things, but
>     nothing worked.
>
>     We will need to determine why it is not linking with the library.
>
>     -- ES
>
>     
> ------------------------------------------------------------------------------
>     Learn how Oracle Real Application Clusters (RAC) One Node allows
>     customers
>     to consolidate database storage, standardize their database
>     environment, and,
>     should the need arise, upgrade to a full multi-node Oracle RAC database
>     without downtime or disruption
>     http://p.sf.net/sfu/oracle-sfdevnl
>     _______________________________________________
>     Crystal-main mailing list
>     [email protected]
>     <mailto:[email protected]>
>     https://lists.sourceforge.net/lists/listinfo/crystal-main
>     Unsubscribe: mailto:[email protected]
>     <mailto:[email protected]>?subject=unsubscribe
>
>
>
>
> ------------------------------------------------------------------------------
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment, and,
> should the need arise, upgrade to a full multi-node Oracle RAC database
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
>
>
>
> _______________________________________________
> Crystal-main mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/crystal-main
> Unsubscribe: 
> mailto:[email protected]?subject=unsubscribe

------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: 
mailto:[email protected]?subject=unsubscribe

Reply via email to