Closed
Bug 351194
Opened 20 years ago
Closed 20 years ago
javac/jar not found
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: abwillis1, Assigned: jhpedemonte)
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
|
981 bytes,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
Bug 350489 broke the OS/2 build of javaxpcom.
Removing the quotes restores functionality. Not sure how best to either if or || this.
| Reporter | ||
Comment 1•20 years ago
|
||
That is removing the quotes in the configure.in not anywhere else.
| Reporter | ||
Comment 2•20 years ago
|
||
I don't understand configure scripts well enough so I thought about the following:
AC_PATH_PROG(JAVAC, javac, :, "$JAVA_PATH")
AC_PATH_PROG(JAR, jar, :, "$JAVA_PATH")
if test -z "$JAVAC" || test "$JAVAC" = ":" || test -z "$JAR" || test "$JAR" = ":"; then
AC_PATH_PROG(JAVAC, javac, :, $JAVA_PATH)
AC_PATH_PROG(JAR, jar, :, $JAVA_PATH)
if test -z "$JAVAC" || test "$JAVAC" = ":" || test -z "$JAR" || test "$JAR" = ":"; then
AC_MSG_ERROR([The programs javac and jar were not found. Set \$JAVA_HOME or use --with-java-bin-path={java-bin-dir}.])
fi
fi
fi
but the second AC_PATH_PROG's are already cached at that point and so is pulled from cache where they were not found so the test still fails.
You have the following choic
Comment 3•20 years ago
|
||
Andy, something was missing from your last comment...
How do you get around the same problem with "${JAVA_INCLUDE_PATH}"?
(Also wondering why you build with --enable-javaxpcom. Java itself is broken anyway because ipluginw is too old, right?)
Hardware: Other → PC
| Reporter | ||
Comment 4•20 years ago
|
||
The last line came about due to a midair collision and I copied a bit too much and didn't realize it. That was bugzilla telling me I could either flush the previous changes or drop mine. I copied mine and pasted it in after saying to drop mine.
The "${JAVA_INCLUDE_PATH}" may actually be an issue... I am not using it so I don't actually know.
javaxpcom is not using ipluginw as far as I know. It is a direct java interface that is not using a plugin. I am using using javaxpcom for two reasons... one is it is the default for xulrunner and two the group that asked me to get xulrunner working and I supply builds for wanted it.
Even if it were using ipluginw, Java works in my Seamonkey builds.
Comment 5•20 years ago
|
||
What do I need to build JavaXPCOM on OS/2?
| Assignee | ||
Comment 6•20 years ago
|
||
Andy, what error do you get when running the unmodified configure.in? Seems odd that this would be a problem on OS/2 only. I'm wondering if there is a bug in the OS/2 autoconf scripts.
| Reporter | ||
Comment 7•20 years ago
|
||
When configure ran it came back and didn't find javac or jar. Config.log didn't give me any hints as to why. I knew it had been working and went searched lxr until I found the change that had broken it. The only error that is reported is that javac and/or jar is not found:
The programs javac and jar were not found. Set $JAVA_HOME or use --with-java-bin-path={java-bin-dir}.
| Assignee | ||
Comment 8•20 years ago
|
||
Well, we were trying out some things yesterday on Kaply's machine. First, there seems to be an error in the autoconf scripts. I think it was in acspecific.m4: there is a call to "echo -E", but echo doesn't have such a flag. So first remove that and see what happens.
Then, in configure.in, JAVA_PATH is set to "$JAVA_HOME/bin:$PATH". But for OS/2, that should probably be a ";" rather than ":". So try that, too.
| Reporter | ||
Comment 9•20 years ago
|
||
Neither of those made a difference.
checking for LC_MESSAGES... yes
checking for javac... :
checking for jar... :
configure: error: The programs javac and jar were not found. Set $JAVA_HOME or
use --with-java-bin-path={java-bin-dir}.
I don't understand why quotes would hurt it anyway. Quotes are accepted both at an OS/2 command prompt and the ash shell. The only way I can see them being a problem is if quotes are being nested.
I.E. If I run
which "javac"
from a command prompt it finds javac.exe. But if I run:
which ""javac""
then it does not find it. I am going to see if I can get it to echo the java_path and java_home for me.
Comment 10•20 years ago
|
||
dumb question. Where is your java installed?
| Reporter | ||
Comment 11•20 years ago
|
||
Mine is installed in e:\programs\java142.
I call a script from setmozenv that sets the path and sets java_home.
I also did try --with-java-bin-path=e:\programs\java142\bin but same result.
Hmm, when I answered the question about "${JAVA_INCLUDE_PATH}" I was thinking of
--with-java-include-path. I am not sure why "${JAVA_INCLUDE_PATH}" is not a problem.
| Assignee | ||
Comment 12•20 years ago
|
||
Let's give this a shot. Andy, please test on OS/2. Benjamin, can you test on your MSYS machine?
Comment 13•20 years ago
|
||
I don't think the separator code is correct. In particular both cygwin and MSYS shell munge the PATH in both directions such that when you're in the shell:
PATH=.:/usr/local/bin:/mingw/bin etc
| Assignee | ||
Comment 14•20 years ago
|
||
So the old code works fine for you?
Andy, please also test this patch without the "SEP" changes (just the bracket change).
Comment 15•20 years ago
|
||
> So the old code works fine for you?
The patch you sent me with [] works fine... I didn't try removing the quotes completely.
| Reporter | ||
Comment 16•20 years ago
|
||
This was enough:
+ AC_PATH_PROG(JAVAC, javac, :, [$JAVA_PATH])
+ AC_PATH_PROG(JAR, jar, :, [$JAVA_PATH])
| Assignee | ||
Comment 17•20 years ago
|
||
Attachment #237787 -
Attachment is obsolete: true
Attachment #237805 -
Flags: review?(benjamin)
Updated•20 years ago
|
Attachment #237805 -
Flags: review?(benjamin) → review+
| Assignee | ||
Comment 18•20 years ago
|
||
Checked in to trunk. ->FIXED
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 19•19 years ago
|
||
(In reply to comment #16)
> This was enough:
>
> + AC_PATH_PROG(JAVAC, javac, :, [$JAVA_PATH])
> + AC_PATH_PROG(JAR, jar, :, [$JAVA_PATH])
>
Andy, I tried to build Xulrunner after the check in of the patch, for me configure failed at the same point jar and javac not found, though I tried set JAVA_HOME and pointed in .mozconfig to d:\programs\java142\bin (tried also w/o) the bin.
For me I helped only adding explicitly javac.exe and jar.exe
+ AC_PATH_PROG(JAVAC, javac, javac.exe, :, [$JAVA_PATH])
+ AC_PATH_PROG(JAR, jar, jar.exe :, [$JAVA_PATH])
Then it worked even with the quotes.
Did I miss sth?
| Reporter | ||
Comment 20•19 years ago
|
||
Works here... may be a difference in our java setup.
I am using Innotek Java so there may be some slight difference needed for Golden Code Java setup required (not sure). I call my java setup script from setmozenv (at the beginning) which contains:
SET PATH=e:\programs\java142\bin;%PATH%
SET CLASSPATH=
set java_home=e:\programs\java142
SET JAVA2_USERHOME=e:\usr\abwillis
Path to find javac and jar of course, Java_home for more or less the same reasons and java2_userhome is probably not needed here at all. Clearing Classpath is just because my classpath is full of java11 stuff that seemed to be causing me issues at times.
Comment 21•19 years ago
|
||
(In reply to comment #20)
> Works here... may be a difference in our java setup.
> I am using Innotek Java
me too
> SET PATH=e:\programs\java142\bin;%PATH%
> set java_home=e:\programs\java142
that was the missing link, you have to set both in the environment
first I did set java_home w/o setting the path (didn't work)
then I thought it may be the best to add ac_add_options --with-java-bin-path=d:/programs/java142/bin in .mozconfig AND setting the path in the environment, but strange that this didn't work as it is recommended in configure to set either java_home or the bin-path in .mozconfig (btw the headers are found correctly by setting in .mozconfig) I tried all possible combinations with .mozconfig and environment but indeed only to set both in the environment helps to find the files. Sorry for the noise.
| Assignee | ||
Comment 22•19 years ago
|
||
Are javac.exe and jar.exe self contained EXEs, or do they depend on a DLL? I'm guessing that you need to have java\bin in your PATH so it picks up the necessary DLL.
Updated•8 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•