jblas-project / jblas

Linear Algebra for Java
http://jblas.org
BSD 3-Clause "New" or "Revised" License
590 stars 149 forks source link

configure script unable to cope with spaces in JDK-path on Windows #1

Closed JoSchaback closed 14 years ago

JoSchaback commented 14 years ago

On my Windows Vista 64 bit box, I get the following error when invoking ./configure on the most recent sources:

codinghero@codinghero-PC /cygdrive/d/tmp/jblas/jblas $ ./configure checking for java, javac... ok checking for nm... ok determining operating system... checking for cygpath... ok Windows determining architecture... x86 locating the Java Development Kit... sh: -c: line 0: syntax error near unexpected token (' sh: -c: line 0:cygpath -u C:\Program Files (x86)\Java' failed Configuration failed! Reason: couldn't find /include/jni.h

I believe this has something to do with spaces in the JDK path....

JoSchaback commented 14 years ago

a quick fix is to copy your JDK to a space free directory and overwrite your PATH enviornment variable:

eg.

$ export PATH=/cygdrive/d/tmp/jblas/jdk1.6.0_16/bin:$PATH

mikiobraun commented 14 years ago

Added parentheses aroung the cygpath call. Have to check, though

JoSchaback commented 14 years ago

Hi Mikio,

I got trouble on my brand new Windows 7 64 bit box and most recent jBlas. On calling the configure script, i get

Schabby@Schabby-PC ~/jblas $ ./configure checking for java, javac... ok determining operating system... ok (Windows) determining architecture... ok (x86) looking for nm... ok checking for cygpath... true locating the Java Development Kit... failed

Configuration failed!

Reason: couldn't find /cygdrive/c/Program Files (x86)/Java/include/jni.h

This may still be a whitespace-in-paths iusse?

Cheerio, Johannes

JoSchaback commented 14 years ago

my JAVA_HOME variable is set to

$ echo $JAVA_HOME C:\Program Files\Java\jdk1.6.0_17

so it is strange that the script tries to find the JDK somewhere in "Program Files (x86)"

mikiobraun commented 14 years ago

Oh yes, I need to fix that... . The script is asking the java executable itself what it's directory is. I probably should add a test which looks whether JAVA_HOME is set... .

mikiobraun commented 14 years ago

Hey schabby,

please pull and try the newest version. At least under Windows, it can now deal with spaces in paths. Somehow, the way ruby parses spaces is a bit broken. So if you have a space in an option, it is better to enclose everything in quotes. Note that your shell may not expand $HOME, or ~/ in quotes, so but in the full path.

BTW, does that mean, you were able to compile ATLAS successfully?

mikiobraun commented 14 years ago

I guess this is also closed now. Probably reopen later.