swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swarm-Support] gcj - swarm - exe


From: Paul E. Johnson
Subject: Re: [Swarm-Support] gcj - swarm - exe
Date: Fri, 15 Aug 2003 22:26:22 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703

WHy don't you test with jheatbugs-2001-03-28. It works for me exactly like in Marcus's directions that I have in my web site.


address@hidden jheatbugs-2001-03-28]$ export LD_LIBRARY_PATH=/usr/lib/swarm:$LD_LIBRARY_PATH

address@hidden jheatbugs-2001-03-28]$ CLASSPATH=/usr/share/swarm/swarm.jar:$CLASSPATH gcj -O2 -g --main=StartHeatbugs -o model *.java /usr/lib/swarm/gcjswarm.so

That builds the file model and it runs.

Here are the swarm rpms I have installed:

address@hidden pauljohn]$ rpm -qa | grep swarm
swarm-jdk-2.1.147.20030812-2RH9.0
swarm-2.1.147.20030812-2RH9.0
swarm-gcjswarm-2.1.147.20030812-2RH9.0


I don't know what setup you have, but I am sure that is where the problem lies. I've just realized that I build these rpms against gcc-3.3 and the gcj library "so" name changed from gcc-3.2 to gcc-3-3. So if you have a stock RedHat system and you install my rpms, the objc and java things will go fine, but the gcj will not install. I think in order to make it go, you'd need gcc-3.3 because that supplies the

/usr/lib/libgcj.so.4

So from this I conclude you are not using the rpms I provide, and after I realize that I just have to say we need to bug shoot your installation. SO tell us about your OS, how you built swarm, did you have gcc-3.3, what did you do to build the gcj part, and does your java app compile against jdk, etc etc.

In case you make this work, I'd be interested to know if it is indeed faster on your system. On my system, there appears to be no difference in speed, if anything the jdk version is faster.

pj

Suman Kanuganti wrote:

Paul, help me out here, looking forward to listen from
you.

--- Suman Kanuganti <address@hidden> wrote:
Well, I tried something similar to what you said
before, I get various errors, now following your
exact
way, it is here.


address@hidden FluBug14]$
CLASSPATH=/usr/share/swarm/swarm.jar gcj -02 -g
--main=StartFluModel -L/usr/lib/swarm *.class
/usr/lib/swarm/gcj_{swarm,gnubytecode}.o -o start
gcj: /usr/lib/swarm/gcj_swarm.o: No such file or
directory
gcj: /usr/lib/swarm/gcj_gnubytecode.o: No such file
or
directory
gcj: unrecognized option `-02'


-- I set my CLASSPATH, and all variables you
mentioned
in my bashrc file, also tried mentioned at the
command
line itself.


address@hidden FluBug14]$ CLASSPATH=$CLASSPATH gcj
-02 -g --main=StartFluModel -L/usr/lib/swarm *.class
/usr/lib/swarm/gcj_{swarm,gnubytecode}.o -o start
gcj: /usr/lib/swarm/gcj_swarm.o: No such file or
directory
gcj: /usr/lib/swarm/gcj_gnubytecode.o: No such file
or
directory
gcj: unrecognized option `-02'
java/lang/Object.java:0: the `java.lang.Object' that
was found in
`/usr/java/j2sdk1.4.1_03/jre/lib/rt.jar'
didn't have the special zero-length
`gnu.gcj.gcj-compiled' attribute.  This
generally means that your classpath is incorrectly
set.  Use `info gcj "Input Options"' to see the info
page describing how to set the classpath
compilation terminated.

--Here is my classpath

address@hidden FluBug14]$ echo $CLASSPATH

.:/usr/share/swarm/swarm.jar:/usr/share/swarm/kawa.jar:/usr/java/j2sdk1.4.1_03/jre/lib/rt.jar:.:/usr/java/j2sdk1.4.1_03/src.zip
Also, I hate working with java on windows and for
whatever reason I was too lazy to get swarm working
on
windows at my office. So I taught them some linux
and
working with the project, now to run the simulations
I
thought I would make an executable (for linux and
also
windows) never mind if its like a package, I treid
using programs like install4j, installAnywhere, but
in
vain, I was not happy with that.
So gcj - linux - exe ; also I need a windows exe ;
never mind if I need to supply with jre, I dont want
to compile it on windows, I want to provide them
with
an executable.

I greatly appreciate any help,
Thanks,
Suman K

--- "Paul E. Johnson" <address@hidden> wrote:
The last time I fiddled with this, I wrote
directions on compiling swarm programs
with swarm-gcj here:


http://lark.cc.ku.edu/~pauljohn/Swarm/Swarm-2.x_RPMSforRH7/
On August 12, 2003 Marcus Daniels posted a note
called "Pretest 8" which announced a new MS Windows/Cygwin package,
and in there he mentioned that he followed this
route to use gcj.

"
To use GCJ to build Swarm executables of Java
Swarm
models, you can add rules like this to your model implementation
Makefile:

Here's an example for Java heatbugs:   (one line)

CLASSPATH=/Swarm-2.2/share/swarm/swarm.jar gcj -O2
-g --main=StartHeatbugs -L/Swarm-2.2/lib *.class /Swarm-2.2/lib/gcj_{swarm,gnubytecode}.o -o
jheatbugs

Then you will need to inform the dynamic linker as
to the location of the libraries:

export LTDL_LIBRARY_PATH=/Swarm-2.2/lib

Finally, run it:

./jheatbugs
"

It seems to me that the only difference is that
this
one sets LTDL_LIBRARY_PATH rather than LD_LIBRARY_PATH


Suman Kanuganti wrote:

Well,
I love gcj, allows to make native linux
executables.
Few a times I was wondering how to make use of
gcj
to
make linux executables for the java programs
using
the
api other than which gcj supports, I mean which
uses
an external jars such as swarm, biojava, and
others.
Even I came to know awt, swings are not supported
by
gcj yet. I did some study in shared libraries for
gcj
with java support, but was not successfull
anytime.
Suddenly, the swarm-gcj rpm took my attention
about
which I doesnt know why it was used in swarm, I
didnt
notice all these days, so is that helpfull in
making
native linux executables for the programs using
swarm?
If so, can anyone give me an example, I have
swarm-gcj
rpm installed succesfully (RH9). I also really
wonder
how do you share those libraries with gcj to make
exe.
Like I want to use some other external jar to
make
an
executable, how do I do that using gcj?

Ohh, lot of questions, could anyone explain me
this?
Thanks a lot.
Suman K

=====
Suman Kanuganti,
Swarm Group, Anth Dept., University of Missouri, Columbia.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site
design software
http://sitebuilder.yahoo.com
_______________________________________________
Support mailing list
address@hidden
http://www.swarm.org/mailman/listinfo/support


--
Paul E. Johnson                       email:
address@hidden
Dept. of Political Science http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office:
(785)
864-9086
Lawrence, Kansas 66045                FAX: (785)
864-5700


_______________________________________________
Support mailing list
address@hidden
=== message truncated ===


=====
Suman Kanuganti,
Swarm Group, Anth Dept., University of Missouri, Columbia.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
_______________________________________________
Support mailing list
address@hidden
http://www.swarm.org/mailman/listinfo/support


--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700




reply via email to

[Prev in Thread] Current Thread [Next in Thread]