Closed Bug 272662 Opened 20 years ago Closed 19 years ago

configure check fails if JAVA_HOME has a space in it

Categories

(Core Graveyard :: Java to XPCOM Bridge, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: darin.moz, Assigned: benjamin)

References

Details

(Keywords: fixed1.8.0.1, fixed1.8.1, Whiteboard: javaconnect-to-branch)

Attachments

(2 files, 3 obsolete files)

configure check fails if JAVA_HOME has a space in it, e.g.:

  $ export JAVA_HOME="/cygdrive/c/Program Files/jdk1.5.0"

I fixed this by adding double-quotes in a few places.  I also added a call to
"cygpath -w" to ensure that JAVA_INCLUDE_PATH is given as a windows path and not
a cygwin path.
Attached patch v1 patch (obsolete) — Splinter Review
Attachment #167587 - Flags: review?(jhpedemonte)
this patch actually seems to cause problems
Attached patch v1.1 patch (obsolete) — Splinter Review
ok, this works.
Attachment #167587 - Attachment is obsolete: true
Attachment #167587 - Flags: review?(jhpedemonte)
Attachment #167588 - Flags: review+
this isn't even sufficient.  JAVA_INCLUDE_PATH has spaces in it still, and "cl"
doesn't like those spaces.

feel free to WONTFIX this bug if you like.  i'm happy to just replace 'Program
Files' with 'progra~1' to get by.
Attached patch My versionSplinter Review
This uses the "-s" option of cygpath to convert JAVA_HOME to a short path before using it. This gets through configure properly, I haven't built it yet but it looks like it will work.
Assignee: jhpedemonte → benjamin
Attachment #167588 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #202536 - Flags: review?(jhpedemonte)
Comment on attachment 202536 [details] [diff] [review]
My version

Sweet!  It builds for me.  Thanks for helping me out.
Attachment #202536 - Flags: review?(jhpedemonte) → review+
Fixed on trunk.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
I'd like this for post-ffox1.5 so we can do xulrunner 1.8 with javaxpcom support, but I don't see an appropriate approval flag.
Flags: blocking1.8.1?
What about people trying to build using MSYS?
Neil, I don't know anything about msys, but I'd be happy to accept a patch.
(In reply to comment #8)
> I'd like this for post-ffox1.5 so we can do xulrunner 1.8 with javaxpcom
> support, but I don't see an appropriate approval flag.

Copying the XForms guys, I'll just add "javaconnect-to-branch" to the status whiteboard for all bugs that need to be checked to branch after FF1.5 ships.
Whiteboard: javaconnect-to-branch
Attached patch MSYS fix (obsolete) — Splinter Review
Steps to verify patch:
1. Use linux, to avoid the block completely
2. export JAVA_HOME=~/JAVA\ HOME
3. mkdir "$JAVA_HOME"; mkdir "$JAVA_HOME/include"; mkdir "$JAVA_HOME/bin"
4. touch "$JAVA_HOME/include/jni.h"
5. touch "$JAVA_HOME/bin/javac"; touch "$JAVA_HOME/bin/jar"
6. ./configure --enable-extensions=java
Attachment #202877 - Flags: review?(benjamin)
Comment on attachment 202877 [details] [diff] [review]
MSYS fix

I don't get it... I had to add this code to get cygwin to work because cygwin doesn't automatically convert JAVA_HOME from a win-style path to a unix-style path.
Attached patch v1.1 fixSplinter Review
Sorry, I didn't realize that JAVA_HOME was the wrong sort of path.

Note that other parts of configure (should) use FOO=`cd "$BAR" && pwd`
Attachment #202877 - Attachment is obsolete: true
Attachment #203271 - Flags: review?(benjamin)
Attachment #202877 - Flags: review?(benjamin)
Attachment #203271 - Flags: review?(benjamin) → review+
Comment on attachment 202536 [details] [diff] [review]
My version

With Neil's mingw fix also.
Attachment #202536 - Flags: approval1.8.0.1?
Attachment #202536 - Flags: approval1.8.1?
Comment on attachment 202536 [details] [diff] [review]
My version

Please consider for 1.8.1 - 1.8.0.1 is for major security and crash issues only.
Attachment #202536 - Flags: approval1.8.0.1? → approval1.8.0.1-
Comment on attachment 202536 [details] [diff] [review]
My version

Re-requesting approval per drivers email, this is javaxpcom-only and has baked on trunk (with the mingw fix).
Attachment #202536 - Flags: approval1.8.0.1- → approval1.8.0.1?
Comment on attachment 202536 [details] [diff] [review]
My version

a=drivers
Attachment #202536 - Flags: approval1.8.1?
Attachment #202536 - Flags: approval1.8.1+
Attachment #202536 - Flags: approval1.8.0.1?
Attachment #202536 - Flags: approval1.8.0.1+
Fixed on MOZILLA_1_8_BRANCH and MOZILLA_1_8_0_BRANCH.
Flags: blocking1.8.1?
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: