Warning: Can't synchronize with the repository (Couldn't open Subversion repository /home/crystal/scm/crystal: SubversionException: ("Expected FS format between '1' and '3'; found format '4'", 160043)). Look in the Trac log for more information.

Ticket #377 (closed defect: fixed)

Opened 7 years ago

Last modified 2 years ago

Java SDK configure detection failing

Reported by: jorrit Owned by: admin
Priority: major Milestone: Version 1.2 RC2
Component: build system Version: V1.2rc1
Keywords: Cc:

Description (last modified by sunshine) (diff)

On Mingw configure fails to detect the Java SDK. The following environment variables are set:

export JAVAHOME="/c/Progra~1/Java/j2sdk1.4.2_07"
export JAVA_HOME="/c/Progra~1/Java/j2sdk1.4.2_07"
export PATH=$PATH:$JAVAHOME/bin:/c/apache-ant-1.6.0/bin

Java is detected but found unsuitable for CS because jni.h could not be found. Apparently the test for java fails to add -I$JAVA_HOME/include to the compiler flags. config.log is attached.

Attachments

config.log Download (439.1 KB) - added by jorrit 7 years ago.

Change History

Changed 7 years ago by jorrit

  Changed 7 years ago by sunshine

In fact, the -I$JAVA_HOME/include flag is being used. See line 1580 in config.log, so the problem is something other. I had Jorrit run the configure script with set -x/+x surrounding the code generated by the CS_JAVA_FLAGS macro from configure.ac, and the output is suspicious:

checking for javac... /c/Progra~1/Java/j2sdk1.4.2_07/bin/javac
+ test yes '!=' no
+ test -n /c/Progra~1/Java/j2sdk1.4.2_07/bin/javac
+ test -n /c/Progra~1/Java/j2sdk1.4.2_07/bin/java
+ test x = xyes
+ test -n /c/Progra~1/Java/j2sdk1.4.2_07
+ cs_java_dir=/c/Progra~1/Java/j2sdk1.4.2_07
+ test -n /c/Progra~1/Java/j2sdk1.4.2_07
++ echo x/c/Progra~1/Java/j2sdk1.4.2_07
++ tr '\\' /
++ sed 's/^x//;s/   */ /g;s/^ //;s/ $//'
+ javadir=/c/Progra~1/Java/j2sdk1.4.2_07
+ cs_java_cflags=-I"/c/Progra~1/Java/j2sdk1.4.2_07/include"
+ cs_java_platform=win32
+ test -n win32
+ cs_java_cflags=-I"/c/Progra~1/Java/j2sdk1.4.2_07/include"
		    -I"/c/Progra~1/Java/j2sdk1.4.2_07/include/win32"
+ test '' '!=' yes
+ echo 'configure:12268: checking if Java2 SDK is usable'
+ set -x
+ echo -n 'checking if Java2 SDK is usable... '
checking if Java2 SDK is usable... + test '' = set

The first questionable issue is that there are extra quotes surrounding the paths given as arguments to the -I options. These quotes later get specially escaped by the configure script and passed literally to the compiler, which results in it failing to find jni.h.

The second questionable issue is that the above output contains some trace statements (lines 9-12) which do not seem to belong to the CS_JAVA_FLAG macro. In fact, highly suspicious is the mention at line 12 of a shell variable named javadir which does not appear anywhere in configure.ac or configure. Whence does this code arise?

  Changed 7 years ago by sunshine

  • description modified (diff)
  • summary changed from Java configure detection failing to Java SDK configure detection failing

  Changed 7 years ago by jorrit

Fixed in trunk in r27592.

  Changed 7 years ago by jorrit

  • status changed from new to closed
  • resolution set to fixed

Fixed in 1.2 in r27594.

  Changed 2 years ago by bangerbro.comr

promotional codes for movietickets.com  http://soffa1.angelfire.com/mypolicy.geico.com.html world largest female labia.com  http://soffa1.angelfire.com/promotional-codes-for-movietickets.com.html promotional codes for movietickets.com

  Changed 2 years ago by www.menshealth.com paybill

lds.about.com  http://bdegmbh.tripod.com/www.menshealth.com-paybill.html www.menshealth.com paybill menshealth.com renew  http://bdegmbh.tripod.com/menshealth.com-renew.html menshealth.com renew

  Changed 2 years ago by always looking for sex.com

www nikefactoryoutlet.com  http://cheryloriz988.tripod.com/192.168.32.1.html 192.168.32.1 192.168.32.1  http://cheryloriz988.tripod.com/always-looking-for-sex.com.html always looking for sex.com

Note: See TracTickets for help on using tickets.