Issue 91325 - DEV300_m22: java syntax error in cygwin
Summary: DEV300_m22: java syntax error in cygwin
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: code (show other issues)
Version: DEV300m22
Hardware: All Windows Server 2003
: P1 (highest) Trivial (vote)
Target Milestone: ---
Assignee: hjs
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-03 06:57 UTC by pavel
Modified: 2008-07-11 21:35 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
A patch for helpcontent2/util/target.pmk (1.11 KB, patch)
2008-07-03 13:39 UTC, tono
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description pavel 2008-07-03 06:57:06 UTC
Hi, I got syntax errors in new helpcontent2 build in cygwin:

java -
Djava.library.path=f:/home/pavel/BuildDir/ooo_DEV300_m22_src/solver/300/wntmsci10.pro/bin -cp 
.;../../wntmsci10.pro/class;c:/J2SDK1~1.2_0/jre/lib/rt.jar;.;f:/home/pavel/BuildDir/ooo_DEV300_m22_
src/solver/300/wntmsci10.pro/bin/jaxp.jar;f:/home/pavel/BuildDir/ooo_DEV300_m22_src/solver/300
/wntmsci10.pro/bin/parser.jar;f:/home/pavel/BuildDir/ooo_DEV300_m22_src/solver/300/wntmsci10.p
ro/bin/xt.jar;f:/home/pavel/BuildDir/ooo_DEV300_m22_src/solver/300/wntmsci10.pro/bin/unoil.jar;f:
/home/pavel/BuildDir/ooo_DEV300_m22_src/solver/300/wntmsci10.pro/bin/ridl.jar;f:/home/pavel/Bu
ildDir/ooo_DEV300_m22_src/solver/300/wntmsci10.pro/bin/jurt.jar;f:/home/pavel/BuildDir/ooo_DEV3
00_m22_src/solver/300/wntmsci10.pro/bin/jut.jar;f:/home/pavel/BuildDir/ooo_DEV300_m22_src/solv
er/300/wntmsci10.pro/bin/xmlsearch.jar;f:/home/pavel/BuildDir/ooo_DEV300_m22_src/solver/300/w
ntmsci10.pro/bin/LuceneHelpWrapper.jar;f:/home/pavel/BuildDir/ooo_DEV300_m22_src/solver/300/w
ntmsci10.pro/bin/lucene-core-2.3.jar com.sun.star.help.HelpIndexer -foo -mod sbasic -zipdir 
../../wntmsci10.pro/misc/ziptmpsbasic_en-US -o ../../wntmsci10.pro/bin/sbasic_en-US.zip
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)

where options include:
    -client       to select the "client" VM
    -server       to select the "server" VM
    -hotspot      is a synonym for the "client" VM  [deprecated]
                  The default VM is client.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A ; separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose[:class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -showversion  print product version and continue
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
/usr/bin/bash: ../../wntmsci10.pro/class: is a directory
/cygdrive/c/J2SDK1~1.2_0/jre/lib/rt.jar: line 1: $'PK\003\004': command not found
...
Comment 1 ab 2008-07-03 07:48:54 UTC
To start I did a comparison between your command line and one of 
mine not using cygwin. Some questions to sort out simple reasons:

- In my environment wntmsci12 is used instead of wntmsci10.
  I assume, wntmsci10 is still a valid environment for your
  build or could this be a problem? I doubt in this context.

- Which java do you use? J2SDK1~1.2_0 does not sound like a
  1.3.1 which is the OOo Java base line. According to the
  lucene documentation it needs at least JDK 1.3 to run.
  
- Any idea what $'PK\003\004' is? Looks like some Java in-
  ternal stuff or does this somehow refer to your build en-
  vironment?
  
Currently I don't have any further "easy" ideas. STARTED
Comment 2 pavel 2008-07-03 07:54:52 UTC
1. yes, I use older compiler for now, but it doesn't have any meaning now.

2. welcome to Windows :-)

pavel@drogo:/cygdrive/c/j2sdk1.4.2_04> pwd
/cygdrive/c/j2sdk1.4.2_04
pavel@drogo:/cygdrive/c/j2sdk1.4.2_04> 

3. sounds like some ZIP/JAR ile (PK) being executed as a script 8)

Comment 3 ab 2008-07-03 08:05:42 UTC
I knew it would have been to easy... :-)
Comment 4 ab 2008-07-03 09:36:35 UTC
Another question is: Do pathes like f:/... work in cygwin at all?
If I remember correctly this is all mapped to /cygdrive/f/...

If this is the problem I have to investigate further how this
can be changed as in helpcontent2/settings.pmk and helpcontent2/
util/target.pmk I only use variables to define the class path.
So this should be mapped to the right platform specific syntax
automatically, shouldn't it?
Comment 5 tono 2008-07-03 13:37:33 UTC
Taking a look at makefiles in solenv, I think the classpath parameter should 
be enclosed within double quotes. Actually the dmake variable my_cp contains 
semicolons and they are harmful for cygwin shell.
Comment 6 tono 2008-07-03 13:39:14 UTC
Created attachment 54916 [details]
A patch for helpcontent2/util/target.pmk
Comment 7 ab 2008-07-03 13:51:25 UTC
That's the same, hjs told me... :-)

ab->tono: Have you tried to build with your patch? I've asked Pavel if he
could check it on his environment but currently that's not possible and
creating my own environment would take much time.

ab->hjs: If someone can verify that your/tono's patch works, we should 
consider to add it as master fix.
Comment 8 vg 2008-07-03 13:56:38 UTC
fixed on DEV300 (m23) master
Comment 9 ab 2008-07-03 14:07:34 UTC
Has anyone an idea why this was no problem on early src680 versions where
the HelpLinker also was a Java app and $(my_cp) was used without quoting?
I used src680/src.m145/helpcontent2 as template for my Java entry.
Comment 10 hjs 2008-07-03 15:10:39 UTC
at that time guw (grand unified wrapper :)) was still active and probably took
care of this
Comment 11 pavel 2008-07-11 21:35:51 UTC
verified, closing.