OESF Portables Forum
Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: cortez on December 15, 2004, 10:22:08 am
-
Hi,
I've tried to compile Sun's J2SDK for Zaurus, but man is this difficult!
Following the instructions as described here (http://www.linuxfromscratch.org/blfs/view/stable/general/j2sdk.html) I am currently stuck with the compilation of Motif, and this is only the first step
Can any of you guys tell me if it is even worth considering that I continue?
Looking at the hotspot code, it has loads of i586 specific code. I don't know if the runtime system can do without it.
Any help would be appriciated here!
cortez
-
I would like to get 142 on my zaurus. How can I help ?
-
Ooh, sounds great, I wasn't even aware you could get a source copy of JDK.
I would suggest that there must be a build setting that compiles for non x86 targets otherwise how would you run it on your Sparcstation ?
You won't forget the firefox plugin will you ?
- Andy
-
Just out of interest why arn't you looking at J2SE 5 (1.5.0)?
-
Have you read the license?
Will you be able to redistribute the jdk if you manage to build it?
-
@iamasmith:
Firefox/Mozilla plugin is included in the the source, so, if this works out fine, I guess the answer is yes
@ltrm:
My first aim is 1.4.2 because I'm using it in my daily work, that's why. But hey, I will give it a try later, okay?
@pgas2:
Of course I've read the license (yawn), otherwise I wouldn't be able to download the source. If I only succeed in building it first, I will find a way to redistribute it one way or the other. Worste case scenario would be to post a step by step instruction on how to build it yourself
-
Following the instructions as described here (http://www.linuxfromscratch.org/blfs/view/stable/general/j2sdk.html) I am currently stuck with the compilation of Motif, and this is only the first step
Can any of you guys tell me if it is even worth considering that I continue?
Really cool that anybody try to compile java !! The hope of being able to run full java on the Z is what makes pdaXrom the thing for me.
You say you have problems with Motif . How can we help? What kind of problems?
-
I too want the Firefox JRE plugin so that I can use my 860 as a laptop replacement at work. Currently I cannot access email within our corporate portal as it is all java based.
I would be happy to compile it for myself, if someone can lead me through it.
If I can help with testing / debugging etc then please let me know.
Andrew
-
Wow,
Small OpenOffice viewer [ http://www.engg.upd.edu.ph/~ooview/ (http://www.engg.upd.edu.ph/~ooview/) ] (100kB .jar) required JAVA 1.4.2,
if 1.4.2 running on pdaXrom - next Christmas present ;-))
(download link: http://os.up.edu.ph/modules.php?name=Downl...fice.org_Viewer (http://os.up.edu.ph/modules.php?name=Downloads&d_op=viewdownloaddetails&lid=27&ttitle=OpenOffice.org_Viewer) )
-
I hate to break the news to you all, but I don't think that Java 1.4.2 or 1.5.0 will be your next Christmas present
The code is full of cpu dependant code. The Hotspot Just-In-Time compiler generates machinecode on-the-fly. Currently only i486, amd64, ia64 and sparc are supported out of the box.
My first hope was that it would be possible to disable the JIT feature completely. Java is after all an interpreted language, and the JIT feature only speeds up code execution of classes executed more than once. By disabling the JIT feature we would lose speed, but hey, I could live with that. But removing the cpu dependant code is not easily done.
And my knowledge of ARM assembler is nearly zero, so porting the code to the ARM architecture is no option for me. This is far, far more complex than I thought. Porting the code to the ARM CPU would be quite a job.
I don't know if the guys from the Blackdown project have put any effort into this, do any of you guys know anything about that?
-
On my todo list is try out the Jeode JVM with a hacked Swing jar file I have on PDAXROM. It obviously won't support 1.4 and 1.5 specific javaisms, but it would be better than a poke in the eye.
James
-
I just succesfully compiled JamVM 1.2.2 with GNU classpath 0.12
I still have to test it on my SL-C750 to see how it works though.
I also tried to compile SableVM, but it needs libffi, which is a pain to compile.
-
Just to make sure that you don't miss the info:
According to this thread (https://www.oesf.org/forums/index.php?showtopic=2181) the blackdown 1.3 java port seems to be working on pdaxrom rc5.
-
Most of the new api in java 1.4 and 1.5 are written in java itself . If I read the Sun documentation right almost all Swing code is written in java. Maybe one could use the VM code from the blackdown 1.3 and take other stuff that is written in java from 1.4 or 1.5 . Some api wil not function but most will do the job ... Just a thought ...
-
Hi !
I have tested the blackdown 1.3 version om RC 8 with two rather heavy Swing applications and it worked just fine. After install of ipkg package then reboot (a must!) and export JAVA_HOME and update PATH to point to the folder with the java program file (as documented elsewhere in this forum). It takes some time to start java programs, but once started they behave like ordinary programs. I will try out to move the java programmed parts from java 1.4 and 1.5 to the Z to see if it is possible to get some of the new function on top of the 1.3 JVM.
-
I'm currently testing JamVM on RC8.
The 100K executable is what I like, apart from the fact that it supports the full "blue book" JVM specification, is open source and uses the GNU Classpath Java class library. IBM's Jikes compiler is also working by the way.
I guess it won't be possible to run Eclipse on the Zaurus, due to the heavy memory requirements, but the smaller programs should work fine. A comparison with the Blackdown release concerning speed would also be interesting.
So, for anyone who is interested, following JDK is compiled and working on pdaXrom:- JamVM 1.2.3
- Classpath 0.12
- Jikes 1.22
Freedom of choice, that is
-
I'm currently testing JamVM on RC8.
I guess it won't be possible to run Eclipse on the Zaurus, due to the heavy memory requirements, but the smaller programs should work fine. A comparison with the Blackdown release concerning speed would also be interesting.
So, for anyone who is interested, following JDK is compiled and working on pdaXrom:- JamVM 1.2.3
- Classpath 0.12
- Jikes 1.22
hi cortez,
sounds good... have you any experiences with swt under pdaXrom... i want to port a part of a project we are developing under jdk 1.4.2 and swt to the zaurus in near future... i'm new to pdaXrom but i can imaging, that the swt.jar for linux.gtk maybe works...
where can i download the files... i have no crosscompiler installed yet and think only installing the development system doesn't work from scratch...
thanks,
titus
-
ehm, yeah, I'm trying to find out how to upload the IPK files.
Is there still an unstable feed and do I need an account to upload?
Any help is appreciated here
I don't have any experience with SWT, but since it's an "all-Java" solution, it's at least worth a try. You have to find it out for yourself I guess
-
ehm, yeah, I'm trying to find out how to upload the IPK files.
Is there still an unstable feed and do I need an account to upload?
Any help is appreciated here
hmmm... if you like can you upload it to my server and we can provide a section for java at pdaXrom to the world... full mirroring of the feed on my server is maybe possible too, if i can get statistics of the current transfervolumes of the mirrors for planning the amount of costs...
if you are interested, i mail you an account for my server...
titus
-
Laze will set me up a developer account
Soon after that I will upload the files
If you can't wait that long, just PM your email address and I will sent you the files.
-
hi cortez,
yes... a developer account makes sense...
i think it will be set up soon, so i can download it from feed. if not, i'll sent you a mail ;-)
thank you for publishing your work!
titus
-
The 100K executable is what I like, apart from the fact that it supports the full "blue book" JVM specification, is open source and uses the GNU Classpath Java class library. I
Hi !
Great work and I will try it out when it is in some feed. Have you tested any Swing application? Is it possible to say which version of Sun java the JVM is compatible with.
Thanks.
-
http://www.kaffe.org/~stuart/japi/htmlout/...-classpath.html (http://www.kaffe.org/~stuart/japi/htmlout/h-jdk10-classpath.html)
http://www.kaffe.org/~stuart/japi/htmlout/...-classpath.html (http://www.kaffe.org/~stuart/japi/htmlout/h-jdk11-classpath.html)
http://www.kaffe.org/~stuart/japi/htmlout/...-classpath.html (http://www.kaffe.org/~stuart/japi/htmlout/h-jdk12-classpath.html)
http://www.kaffe.org/~stuart/japi/htmlout/...-classpath.html (http://www.kaffe.org/~stuart/japi/htmlout/h-jdk13-classpath.html)
http://www.kaffe.org/~stuart/japi/htmlout/...-classpath.html (http://www.kaffe.org/~stuart/japi/htmlout/h-jdk14-classpath.html)
http://www.gnu.org/software/classpath/ (http://www.gnu.org/software/classpath/)
-
I've uploaded JamVM, Classpath and Jikes to the unstable feed at www.pdaXrom.org (http://www.pdaXrom.org).
Free drinks for uploader of package number 100?
Programs will be installed in /usr/java
Use following script to get you set up:
#!/bin/sh
export PATH=$PATH:/usr/java/bin
export CLASSPATH=/usr/java/share/classpath/glibj.zip
echo
echo "Java Development Kit"
echo "Powered by:"
echo " * JamVM-1.2.3"
echo " * Jikes-1.22"
echo " * Classpath-0.12"
echo
/bin/sh
See GNU Classpath Project (http://www.gnu.org/software/classpath/classpath.html) for info on current status of compatibility with Sun's JVM's.
Happy hacking
-
hi cortez,
just installed... it's working fine!
i havn't tested swt yet, but in a few days i can tell more about...
thanks!
titus
-
titus,
I've investigated SWT al little. It seems that SWT is only supported for a few architectures, and ARM is not one of them.
BUT...
There's an interesting article called A small cup of SWT (http://www.eclipse.org/articles/Article-small-cup-of-swt/pocket-PC.html) in which a somewhat stripped version of SWT is described. For PocketPC, I know, but that's the best I could find so far
-
hi cortez,
you're right...
swt.jar for linux.gtk depends on some libraries compiled for the i86 architecture... so it wouldn't work on arm's...
the pocket PC version for arm contains dll's which useless under linux, so that the result is that no way leads to SWT on zaurus for the moment...
the parts of the projects i want to port to zaurus contains a lot of components which we developed on base of swt components in our framework... so switching to swing is impossible...
i'll take a look for source codes from ibm, but have not much hope to get them.
i hate pocket PC's, it would be a pity if i would be forced to port it to PocketWin...
titus
-
The IBM J9VM is working for pdaXrom!
I've just been able to compile and run a simple "Hello World"
The IPK can be downloaded for free (after signing up) from here (https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?source=wctme57&S_PKG=dl)
Choose either the windows or linux host from WebSphere Everyplace Micro Environment Personal Profile 1.0 for Sharp Zaurus near the bottom.
After installation of this rather large package (37Mb), copy and install the much smaller (3Mb) weme-ppro10-zaurus_22_arm.ipk on your Zaurus.
sh-3.00# java -version
java version "1.3.0"
Licenced Materials - Property of IBM
J9 - VM for the Java(tm) platform, version 2.2
© Copyright IBM Corp. 1991, 2004 All Rights Reserved
Target: 20040706_1501_lHdFMq (Linux 2.4.18-rmk7-pxa3-embedix arm)
IBM is a registered trademark of IBM Corp.
Java and all Java-based marks and logos are trademarks or registered
trademarks of Sun Microsystems, Inc.
Enjoy!
-
Well, the J9VM runtime in combination with Jikes works just great!
Since it is build for Qt/E I still don't have support for AWT or Swing. I'm now experimenting with the -Xbootclasspath parameter, to see if it is possible to bypass the default class library and use a different one (eg. GNU Classpath) with support for Swing.
Just curious to know, is there anyone else experimenting with this?
Should I keep you all updated?
-
Thanks for working on this!
Please keep us posted on your progress. It would be nice to be able to run my Java programs on pdaxrom. Thanks again!
-
hi, I'm trying to install Mr.Postman jar with jamvm and I receive some errors - they really seem to be related to gui use.
Should I have to try another VM?
That jar could be a good - and useful - test for java vm gui classes support.
Getting Mr.Postman working would mean having a definitive mail client machine in our zaurus, with just one tool more than our favourite mail client
-
hi, I'm trying to install Mr.Postman jar with jamvm and I receive some errors
Could you give a description of the stack trace?
Does the -verbose command line parameter give a clue?
-
this is the output
sh-3.00# jamvm -jar install-mrpostman-20041121.jar
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative (Native Method)
at java.lang.reflect.Method.invoke (Method.java:355)
at jamvm.java.lang.JarLauncher.main (JarLauncher.java:50)
Caused by: java.lang.NoClassDefFoundError: com/izforge/izpack/gui/IzPackMetalTheme
at com.izforge.izpack.installer.GUIInstaller.loadLookAndFeel (Unknown Source)
at com.izforge.izpack.installer.GUIInstaller.<init> (Unknown Source)
at java.lang.reflect.Constructor.constructNative (Native Method)
at java.lang.reflect.Constructor.newInstance (Constructor.java:265)
at java.lang.Class.newInstance (Class.java:1139)
at com.izforge.izpack.installer.Installer.main (Unknown Source)
at java.lang.reflect.Method.invokeNative (Native Method)
...2 more
-
Hi,
It means the VM can't find one or more classes needed. In most cases, a jar runnable with -jar should be stand-alone, i.e. all the classes needed should be in the jar file, or be standard Java classes that are included in the Java runtime (i.e. GNU Classpath).
To check you need to unpack the jar file, using jar xvf foo.jar (unzip or winzip should also work). Then look for:
com/izforge/izpack/gui/IzPackMetalTheme.class
If it's there, something's gone wrong. If it isn't (and I expect this to be the case), the jar needs external classes. As the class isn't a standard class, the jar _must_ extend the classpath to find it. To check this, look in the jar's manifest file:
META-INF/MANIFEST.MF
There should be a Class-Path: attribute, setting up the classpath to where to find the extra classes. If there isn't the jar's bad.
If there is a Class-Path: attribute, and you've got everything it wants, then I know the problem. GNU Classpath has a bug, which means it doesn't take any notice of it. Unfortunately, there's nothing I can do to work round it in JamVM.
So for now, the easiest way to run it will be to run the classes directly from the unpacked jar file.
You can find out the main class by looking at the Main-Class attribute in the manifest.
Then, if you setup the CLASSPATH variable to point to the unpacked jar file directory, and everything else the jar needs you can run it by typing
jamvm <main.class.from.manifest>
i.e. if Main-Class: foo.bar
jamvm foo.bar
The -verbose option will print out which classes are loaded and from where.
Rob.
P.S. Where did the jar come from? Any chance you could email it to me? rob.lougher AT gmail.com.
-
OK, I googled for it and found it on sourceforge...
Rob.
-
hi,
i've tried to compile gnu's java compilier gcj, but didn't succeeded...
i've downloaded gcc-java-3.3.2 from gnu.org, but got too many errors on compiling, where the configure script didn't succeeded too...
i'm very new in compiling such stuff, maybe anyone else have more success or any hints?
i need gcj for compiling swt for arm...
titus
-
i've tried to compile gnu's java compilier gcj, but didn't succeeded...
i've downloaded gcc-java-3.3.2 from gnu.org, but got too many errors on compiling, where the configure script didn't succeeded too...
this error-message i've got on compiling many programs:
checking for a sed that does not truncate output... ./configure: line 3972: cmp: command not found
sed was missing!!!
just compiling wzdftpd-0.4.4, later i retry gcj...
-
OK, I googled for it and found it on sourceforge...
Rob.
let me/us know what you get from it
-
've tried to compile gnu's java compilier gcj, but didn't succeeded...
i've downloaded gcc-java-3.3.2 from gnu.org, but got too many errors on compiling, where the configure script didn't succeeded too...
Correct me if I'm wrong, but compiling gcj means compiling gcc, and compiling gcc means compiling libc and compiling libc means... horror
At least when you need a newer gcc version than the current 3.3.2. Did you look at the dependencies?
i need gcj for compiling swt for arm...
What makes you belief gcj makes it possible to compile swt? The native parts aren't provided for the ARM architecture, or did I miss something...
No offense, just curious
-
hi cortez,
i'm very new with compiling such stuff, but as far as i understand it (it's possible i'm wrong, it had been a long weekend *g)
gcc-java-3.3.2 is part of the gnu compiler collection but not included in the main package... you can get it at gnu.org...
it is able to compile java to byte code and what i needed more: compile java or byte code to native machine code...
ibm provides the source of swt2 in the file j-nativegui2.zip, which includes java source for building the native libraries you needed, in the instructions you are advised to use gcj for this work...
http://www-106.ibm.com/developerworks/java...y/j-nativegui2/ (http://www-106.ibm.com/developerworks/java/library/j-nativegui2/)
gcc-java isn't avaiable for arm, so i need to compile it.
i think my problem are missing switches i probably have to start with the configure script... on gnu's page i found an instruction with example switches for arm architectures, but didn't succeeded... make fails on one or some later sourcefiles because of 'i686' instructions (the first 30min it was compiling fine *g)... i don't know what went wrong with the configure script...
http://www.gnu.org/software/gcc/java/ (http://www.gnu.org/software/gcc/java/)
these i686 error i've got on some other programs i tried to compile, in the according installations note always stand: ./configure, make, make install, ready.... paaaah!!!
in past i have compiled some programs on i86 linux without problems, but compiling for arm seems to be very difficult
do you or someone else knows where i can find a good howto for compiling on arm?
thanks,
titus
-
You're right, compiling code is tricky, and information is fragmented and scattered around the internet. Most of the time it's trial-error and you're on your own I guess
But that where forums like this come in, so we can share our experiences
The steps I use most of the times are:
1. Run the script from the pdaXrom SDK:
#!/bin/sh
export BASEDIR=/opt/arm/3.3.2-vfp
export SDK_VERSION="1.1.0 softfloat(VFP)"
export X11DIR=$BASEDIR/armv5tel-cacko-linux/X11R6
export X11INC=$X11DIR/include
export X11LIB=$X11DIR/lib
export QTDIR=$BASEDIR/armv5tel-cacko-linux/qt
#export QMAKEDIR=$QTDIR/mkspecs
#export QMAKESPEC=linux-arm-g++
export PATH=$BASEDIR/bin:$QTDIR/bin:$X11DIR/bin:$PATH
export LD_LIBRARY_PATH=$BASEDIR/lib
export PKG_CONFIG_PATH=$BASEDIR/armv5tel-cacko-linux/lib/pkgconfig:$X11LIB/pkgconfig:$QTDIR/lib/pkgconfig
2. Set following vars also
export CC=$BASEDIR/bin/armv5tel-cacko-linux-gcc
export AS=$BASEDIR/bin/armv5tel-cacko-linux-as
export AR=$BASEDIR/bin/armv5tel-cacko-linux-ar
export NM=$BASEDIR/bin/armv5tel-cacko-linux-nm
export RANLIB=$BASEDIR/bin/armv5tel-cacko-linux-ranlib
export LD=$BASEDIR/bin/armv5tel-cacko-linux-ld
export STRIP=$BASEDIR/bin/armv5tel-cacko-linux-strip
export LIBTOOL=$BASEDIR/share/libtool
export READELF=$BASEDIR/bin/armv5tel-cacko-linux-readelf
Tricky, but to be sure that the right linker is used, I renamed the one in /usr/bin to some fake name.
3. Configure your code with at least following:
./configure --host=arm-linux --target=arm-linux --prefix=/your/dest/dir
Run the ./configure --help to make sure you don't miss any special configuration options.
4. Then run make and keep your fingers crossed
5. When succesfull, run make install-strip, copy the resulting files from /your/dest/dir to your Zaurus and give it a try.
I hope this will help for starters. I know a lot of you all probably know this already, but please add info so we can all learn from this.
Thanks
-
Just a quick status update.
SableVM is finally compiled. Thanks to Grzegorz B. Prokopski, one of the lead developers of SableVM, for helping me out.
I am able to run the gnu-classpath AWT and Swing examples, although they crash occasionally.
It took me some time to find out that libart-lgpl has to be installed for AWT and/or Swing. This package can be found in the pdaXrom Stable Feed (http://www.pdaxrom.org/ipk_feed.php?menuid=11#qlL)
-
hi cortez,
sorry for my long disappearing, but i was very busy last time...
thank you for your help, it makes the situation more clearly...
the first program i get compiled was epic2, which conundrum wants to use...
the final solution on my system was removing flex...
in this moment wzdftpd-0.4.4 is compiling, i need an ftp daemon, the next project is compiling firebird sql server
when i'm finished with these tasks i switch to compile the gjc and make a try on swt...
but first i need to find out how to make an ipk.. ;-)
titus