History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-2118
Type: Bug Bug
Status: Reopened Reopened
Priority: P2 P2
Assignee: Mamye Kratt
Reporter: Mamye Kratt
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

lzc and lzc.bat will not run in a standard Windows configuration

Created: 31/May/06 04:31 PM   Updated: 19/Mar/07 12:25 PM
Component/s: Installer
Affects Version/s: 3.3.1, 3.3.3
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. File lzc-bug.tar (60 kb)

Environment: WindowsXP with and without cygwin. I tested with cygwin, Yossie says will happen without cygwin.

Severity: Minor
Fixed in Change#: 43,571
Runtime: N/A
Fix in hand: False


 Description  « Hide
lzc and lzc.bat will not run on the standard Windows XP configuration. Installer puts files in "OpenLaszlo Server 3.3" directory inside the "Program Files" directory and the spaces in the names cause a problem.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Amy Muntz - 05/Jun/06 12:14 PM
Needs to be fixed for the 3.3.2 release.

Mamye Kratt - 12/Jun/06 02:59 PM
Seeing the same error in lzenv as the customer in line 21:

../WEB-INF/lps/server/bin/lzc: line 21: \WEB-INF\lps\server\bin\lzenv: No
such file or directory
../WEB-INF/lps/server/bin/lzc: line 27: /bin/java: No such file or directory

Then I set LPS_HOME and I see this error in lzc, line 21.

../WEB-INF/lps/server/bin/lzc: line 21: c:\Program: No such file or
directory
../WEB-INF/lps/server/bin/lzc: line 27: /bin/java: No such file or directory

Program should be "Program Files" (LPS_HOME="/cygdrive/c/Program
Files/OpenLaszlo Server 3.3/Server/lps-3.3/"). I think he needs to set
LPS_HOME, but I also think we have a problem running from the command line.

if [ "${OS}" == Windows_NT ]; then
  export LPS_HOME=`cygpath -w $LPS_HOME`
    . ${LPS_HOME}\\WEB-INF\\lps\\server\\bin\\lzenv <-------------Line 21
else
  export LPS_HOME
  . "${LPS_HOME}/WEB-INF/lps/server/bin/lzenv"

Java on my XP is in /cygdrive/c/WINDOWS/system32/java/, line 27 is below. I
let cygwin do the standard install when I loaded it.

${JAVA_HOME}/bin/java ${JAVA_OPTS} -DLPS_HOME="${LPS_HOME}" -cp "$LZCP"
org.openlaszlo.compiler.Main "$@" <-------------Line 27

I took the 4 files and replaced the originals (lzenv, lzc, lzdc, lzmc). With JAVA_HOME set to /cygdrive/c/j2sdk1.4.2_11, I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError:
 
When I ask "which java" in cygwin it tells me /cygdrive/c/WINDOWS/system32/java. However when I was using that version of java I got the following error:
../WEB-INF/lps/server/bin/lzc: Line 27: /bin/java: No such file or directory
lzc is looking for JAVA_HOME/bin/java, and doesn't find it when JAVA_HOME is set to ..../system32/java.

If user doesn't have JAVA_HOME set correctly (.bash_profile) , windows will pick up java from the system32 directory. Cygwin however will always return the wrong java when asked "which java".

Benjamin Shine - 14/Jun/06 12:59 AM
Related to LPP-2120.

Yossie Silverman - 22/Jun/06 02:34 PM
this "changeset" will overlap //depot/lps-3.3 updating:
installer/windows/lps-windows.nsi.proto
build-tools/prefetch.sh
WEB-INF/lps/server/bin/lzc
WEB-INF/lps/server/bin/lzc.bat
WEB-INF/lps/server/bin/lzc.bat.proto
WEB-INF/lps/server/bin/lzdc
WEB-INF/lps/server/bin/lzdc.bat
WEB-INF/lps/server/bin/lzdc.bat.proto
WEB-INF/lps/server/bin/lzdc
WEB-INF/lps/server/bin/lzdc.bat
WEB-INF/lps/server/bin/lzdc.bat.proto
WEB-INF/lps/server/bin/lzenv
WEB-INF/lps/server/bin/lzenv.bat
WEB-INF/lps/server/bin/lzo
WEB-INF/lps/server/sc/sci
WEB-INF/lps/server/sc/bin/lfcbuilder
WEB-INF/lps/server/bin/run-unit-tests
this will correct (hopefully) space in path issues for both dev install and build environment, on windows (and unix, for that matter!)

Jim Grandy - 07/Jul/06 12:45 PM
Tentatively moving to 3.3.3 pending availability of testing.

Benjamin Shine - 10/Jul/06 03:02 PM
These changes don't touch the ant build.xml files -- I have no problem with them. Basically it looks like many variables in scripts had quotes added around them.

One suggested change: add
export LZCP="${JAVAEXTDIRS}"
to the end of lzenv, because other scripts seem to rely on the value of $LZCP.


Jim Grandy - 10/Jul/06 08:25 PM
I will integrate to lps-3.3.

Jim Grandy - 11/Jul/06 01:06 AM
Integrated for 3.3.3 to lps-dev. This change must be merged into http://svn.openlaszlo.org/openlaszlo/trunk

Mamye Kratt - 11/Jul/06 08:05 PM
(nightly 1987 - 7/11/06)

 First tested Yossie's latest changes in lzc-bug.tar (tar in bug) and lzc now produces a swf file without errors. Then took Yossie's lzc-bug.tar and added Ben's suggestion to add export LZCP="${JAVAEXTDIRS}" to the end of lzenv and lzc still produces the swf file. This change should be checked into trunk. Ttrunk is tagged 3.3.x in this nightly version, soon to be 3.4.x to avoid future confusion.

Spinning a 3.3 version from Perforce this evening to test this bug for 3.3.x Assign back to me.


Amy Muntz - 13/Jul/06 11:38 AM
This bug should be verified in lps-3.3, not trunk. The change (see comments above) has not yet been integrated to trunk and therefore it should not be expected to work. Please talk to Mdavis about a lps-3.3 build. I believe he spun one earlier this week thatyou can use.

Mamye Kratt - 13/Jul/06 05:43 PM
The new 3.3.3 (1881 windows-builder/perforce) build is no different than the previous build behavior, in other words 2118 is still open.

Max Carlson - 13/Jul/06 06:50 PM
The issue is, you can't use the Windows standard Java install. You need to install a JDK and set $JAVA_HOME to the path. It helps to not have spaces in the path when you do the install... From Mamye's original note:

Java on my XP is in /cygdrive/c/WINDOWS/system32/java/, line 27 is below.

Benjamin Shine - 13/Jul/06 06:57 PM
Assigning back to Yossie because the first fix seems to have not worked.

Benjamin Shine - 13/Jul/06 07:28 PM
This works for me if I call lzc.bat from inside a cygwin shell. I have not set my JAVA_HOME to anything special.
Environment: cygwin, installed lps-3.3.3 build 1881, on mac mini/parallels/xp
Just "lzc" doesn't work. Is "lzc" expected to work on windows?


Benjamin Shine - 13/Jul/06 07:39 PM
To make it work, I did this:
cd /cygdrive/c/Program Files/OpenLaszlo Server 3.3.3
...create a file named hello.lzx
bin/lzc.bat hello.lzx
creates hello.swf, which I can view in IE -- no problems.
Mamye, let's figure out what you and the customer are doing differently from Yossie and me.

Mamye Kratt - 13/Jul/06 09:44 PM
Location of 3.3.3 (nightly 1881):
http://windows-builder.corp.laszlosystems.com/builds/Build-lps-3.3-001881/lps-3.3/openlaszlo-3.3.3-windows-dev-install.exe

Yossie says the customer is running lzc wrong. Customer does the following:
cd my-app, then runs
../WEB-INF/lps/server/bin/lzc copy-of-hello.lzx

 I found instructions 1.4.2. Using lzc the stand-along compiler
The standalone compiler is called lzc. It is located in $LPS_HOME/WEB-INF/lps/server/bin/lzc.
Here are the options available for compilation:
......

After reading these instructions I figured running lzc that way was fine, so I did.

Yossie says lzc should run from:
OpenLaszlo Server 3.3.1/bin/lzc

I ran from this location in 3.3.1 (release) and got the following error:
cd /cygdrive/c/Program Files/OpenLaszlo Server 3.3.1/bin
./lzc ../Server/lps-3.3.1/my-apps/copy-of-hello.lzx

./lzc: line 21: c:\Program: No such file or directory
java.lang.NoClassDefFoundError: org/openlaszlo/compiler/Main
Exception in thread "main"

I ran from this location in 3.3.3 (1881) and it works:
cd /cygdrive/c/Program Files/OpenLaszlo Server 3.3.3/bin
./lzc ../Server/lps-3.3.3/my-apps/copy-of-hello.lzx

ls ../Server/lps-3.3.3/my-apps/copy-of-hello.*
copy-of-hello.lzx copy-of-hello.swf

I ran from the location in the docs and the location the customer was using and got the following error:
cd OpenLaszlo\ Server\ 3.3.3/Server/lps-3.3.3/my-apps/,

 echo $JAVA_HOME
/cygdrive/c/j2sdk1.4.2_11

echo $LPS_HOME
/cygdrive/c/Program Files/OpenLaszlo Server 3.3.3/Server/lps-3.3.3/my-apps

then runs
../WEB-INF/lps/server/bin/lzc copy-of-hello.lzx

../WEB-INF/lps/server/bin/lzc: line 21: \WEB-INF\lps\server\bin\lzenv: No such file or directory
java.lang.NoClassDefFoundError: org/openlaszlo/compiler/Main
Exception in thread "main"

IMPORTANT
So the problem in 3.3.1 is fixed 3.3.3 if the user runs lzc from the bin directory, but the instructions say to run from WEB-INF. We need to make it run from WEB-INF or change the instructions.

Amy Muntz - 14/Jul/06 11:39 AM
The docs will be changed to reflect that the user has to run lzc from bin and not WEB-INF. I'll handle this in the release notes for now. I'll open another JIRA bug to correct it in the docs.

Mamye Kratt - 18/Jul/06 06:58 PM
Doc Issue, see 2334.

Jim Grandy - 30/Aug/06 01:50 PM
Mamye, this change broke at least one internal development tool (buildlfc in lps/lfc). We should take a second look at the entire change -- it touched a number of shell scripts -- and verify that it hasn't broken more of them. You should consult with one of the developers to determine how to test these scripts. (Be sure to test both Java 1.5 and Java 1.4; we care more about 1.5 but it would be good to know if it works in 1.4.)