linux build problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

linux build problem

calathus
hi,
I tried to build grails on Linux(SuSE 10.0) following the instruction, but there were several issues. I wonder this was tested on Linux..( on the other hand, I could run the book sample on windows 2k)

1) in ant, -cp is used, but it is not recognized, it seems -lib should be used instead..

#ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch
.Launcher $ANT_ARGS -cp \"$CLASSPATH\" $ant_exec_args"
==>
ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\ "$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher $ANT_ARGS -lib \"$CLASSPATH\" $ant_exec_args"

2) <groovy> .. will cause classcast error.

3) because of these problems, I could not run web app.

I was quite impressed for this project.
So I hope this is supported well on Linux too.

regards,
c

Reply | Threaded
Open this post in threaded view
|

Re: linux build problem

graemer
Hi calathus,

We have had some users try it out on various flavours of unix (mainly
MacOS X) with no trouble and it works on cygwin (unix emulator for
windows). Can you tell me if changing the -cp to -lib fixes the
problem for you?

Thanks for the report
Graeme

On 15/03/06, calathus <[hidden email]> wrote:

> hi,
> I tried to build grails on Linux(SuSE 10.0) following the instruction, but
> there were several issues. I wonder this was tested on Linux..( on the other
> hand, I could run the book sample on windows 2k)
>
> 1) in ant, -cp is used, but it is not recognized, it seems -lib should be
> used instead..
>
> #ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath
> \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\"$ANT_LIB\"
> $ant_sys_opts org.apache.tools.ant.launch
> .Launcher $ANT_ARGS -cp \"$CLASSPATH\" $ant_exec_args"
> ==>
> ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath \"$LOCALCLASSPATH\"
> -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\ "$ANT_LIB\" $ant_sys_opts
> org.apache.tools.ant.launch.Launcher $ANT_ARGS -lib
> \"$CLASSPATH\" $ant_exec_args"
>
> 2) <groovy> .. will cause classcast error.
>
> 3) because of these problems, I could not run web app.
>
> I was quite impressed for this project.
> So I hope this is supported well on Linux too.
>
> regards,
> c
>
>
Reply | Threaded
Open this post in threaded view
|

Re: linux build problem

Russel Winder
In reply to this post by calathus
Calthus,

> I tried to build grails on Linux(SuSE 10.0) following the instruction,
> but there were several issues. I wonder this was tested on Linux..( on
> the other hand, I could run the book sample on windows 2k)

It all worked fine for me on Ubuntu 5.10 Breezy Badger without having to
make any changes to scripts.  I wonder if the issue is related to you
environment rather than Grails per se?  (Certainly I came up with a few
issues but none that stopped Grails working effectively "out of the
box".

--
Russel.
====================================================
Dr Russel Winder                +44 20 7585 2200
41 Buckmaster Road              +44 7770 465 077
London SW11 1EN, UK             [hidden email]

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: linux build problem

calathus
Thanks for reply.
I debugged the problem, and could run the book sample app(although it is sort of hack).

there were two  problems:
1) when I execute ant, rpm_mode were turned on(true). this creates wrong LOCALCLASSPATH which assign system ant directory instead of specialized grails ant directory.
2) in my environment, ANT_HOME is already set, and this ant does not change the ANT_HOME to grails's ant directory. to avoid this, I forced to use grails's ant directory(I changed ant file).

So this depends on environments, and I don't know the intention of rpm_mode, so I just enforced to make it false.
I'll attach the modified ant.
I think the current ant file have some issue.

the -cp problem I mentioned was resolved by pointing to correct ant.jar file.

regards,
c
----
following the log, using modified ant file, this fixes the problem.

:~/workspace/grails_apps/my_app # grails run-app
>> /root/workspace/grails/lib/bsf.jar:/root/workspace/grails/lib/groovy-all-1.0-RC-01-SNAPSHOT.jar:/root/workspace/grails/lib/org.mortbay.jetty.jar:/root/workspace/grails/lib/commons-logging.jar:/root/workspace/grails/lib/commons-el.jar:/root/workspace/grails/lib/javax.servlet.jar:/root/workspace/grails/lib/log4j-1.2.8.jar:/root/workspace/grails/lib/jasper-compiler.jar:/root/workspace/grails/lib/jasper-runtime.jar:/root/workspace/grails/lib/xml-apis.jar:/root/workspace/grails/lib/xercesImpl.jar
>>> rpm_mode=true
>>0 ANT_HOME=/usr/share/ant
>>1 ANT_HOME=/usr/share/ant
>>2 ANT_HOME=/usr/share/ant
>>3 ANT_HOME=/root/workspace/grails/ant
>> ANT_LIB=/root/workspace/grails/ant/lib
exec "/usr/lib/java/bin/java" -classpath "/root/workspace/grails/ant/lib/ant-launcher.jar" -Dant.home="/root/workspace/grails/ant" -Dant.library.dir="/root/workspace/grails/ant/lib" org.apache.tools.ant.launch.Launcher -cp "" "-lib" "/root/workspace/grails/lib/bsf.jar:/root/workspace/grails/lib/groovy-all-1.0-RC-01-SNAPSHOT.jar:/root/workspace/grails/lib/org.mortbay.jetty.jar:/root/workspace/grails/lib/commons-logging.jar:/root/workspace/grails/lib/commons-el.jar:/root/workspace/grails/lib/javax.servlet.jar:/root/workspace/grails/lib/log4j-1.2.8.jar:/root/workspace/grails/lib/jasper-compiler.jar:/root/workspace/grails/lib/jasper-runtime.jar:/root/workspace/grails/lib/xml-apis.jar:/root/workspace/grails/lib/xercesImpl.jar " "-f" "/root/workspace/grails/src/grails/build.xml" "-Dbasedir=/root/workspace/grails_apps/my_app" "-Dgrails.home=/root/workspace/grails" "run-app"
Buildfile: /root/workspace/grails/src/grails/build.xml


On 3/15/06, Russel Winder <[hidden email]> wrote:
Calthus,

> I tried to build grails on Linux(SuSE 10.0) following the instruction,
> but there were several issues. I wonder this was tested on Linux..( on
> the other hand, I could run the book sample on windows 2k)

It all worked fine for me on Ubuntu 5.10 Breezy Badger without having to
make any changes to scripts.  I wonder if the issue is related to you
environment rather than Grails per se?  (Certainly I came up with a few
issues but none that stopped Grails working effectively "out of the
box".

--
Russel.
====================================================
Dr Russel Winder                +44 20 7585 2200
41 Buckmaster Road              +44 7770 465 077
London SW11 1EN, UK             [hidden email]


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBEF9FTr2EGkixYSboRAp68AJ4mL9s3caMGI/yRUPmVTZV5h0wujgCeJcf4
n5mOLwn8pmNZEvWi8RERouI=
=Khb4
-----END PGP SIGNATURE-----