Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GCJ as Java SDK, dead, long live IcedTea!
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, ... 24, 25, 26  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2387
Location: Germania

PostPosted: Tue May 23, 2006 12:24 pm    Post subject: Reply with quote

davidgurvich wrote:
There are various isssues, but no show-stoppers.

Please report the issues.
They should be fixed! As far as it is possible... ;)

davidgurvich wrote:
GCJ uses 2*RAM ...

It loads the native libraries which are three or more times the size than its Jar files. :o

davidgurvich wrote:
... and half the CPU as ibm-jdk-bin running eclipse.

Sounds good.

davidgurvich wrote:
The result is an eclipse which runs quickly.

That is what makes me love GCJ.

Though, comparing azureus with GCJ and Sun JDK 1.5 I do not see a difference in its responsiveness. :?
And azureus just disappears with GCJ after some days.
Again, run from console it did not do that. :roll:

Well, I guess gcj-4.2 will improve a lot again.
And with GNU Classpath generics branch being merged will do another move forward.
_________________
hear hear
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2387
Location: Germania

PostPosted: Sat May 27, 2006 11:45 am    Post subject: Reply with quote

irondog
this may be of interest for your ImageIO issue
http://developer.classpath.org/pipermail/classpath/2006-May/000922.html

... CVS or waiting for 0.92
_________________
hear hear
Back to top
View user's profile Send private message
irondog
l33t
l33t


Joined: 07 Jul 2003
Posts: 715
Location: Voor mijn TV. Achter mijn pc.

PostPosted: Sat May 27, 2006 12:25 pm    Post subject: Reply with quote

Geki, thank you very much for your help.

I ported some of the code to C++ and I'm not in the need for java (GCJ) anymore now. This was a lot of work and it's still half assed now, but I succeeded to get rid of the need for java.

Only a very small part of the Java code wasn't doing the right thing when using GCJ. A well working GCJ could have saved me much time.

GCJ is still interesting, but not for the current project I'm working on.
_________________
Alle dingen moeten onzin zijn.
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2387
Location: Germania

PostPosted: Sat May 27, 2006 12:38 pm    Post subject: Reply with quote

like I say in first post.
it is just no true replacement. ;)

GCJ is doing fine for what it is used in my overlay.
the problem is in its bootclasspath used, GNU Classpath.
there is no stable release yet.
_________________
hear hear
Back to top
View user's profile Send private message
irondog
l33t
l33t


Joined: 07 Jul 2003
Posts: 715
Location: Voor mijn TV. Achter mijn pc.

PostPosted: Sat May 27, 2006 5:16 pm    Post subject: Reply with quote

geki wrote:
like I say in first post.
it is just no true replacement. ;)
No, not yet. It's interesting however.

You can mix C/C++ with java. With gcjh you can generate headers and if you compile classes to .o you can link it against your C++ app. Very cool technology.

I'm an eclipse CDT user (not by choice, but my boss forces me to use an IDE).
Maybe I'll try to make eclipse native some time. I'm curious if that works without too many bugs.
_________________
Alle dingen moeten onzin zijn.
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2387
Location: Germania

PostPosted: Sat May 27, 2006 5:54 pm    Post subject: Reply with quote

eclipse is native in gcj-overlay. ;)
btw, 'svn up' gives some new stuff :P
_________________
hear hear
Back to top
View user's profile Send private message
irondog
l33t
l33t


Joined: 07 Jul 2003
Posts: 715
Location: Voor mijn TV. Achter mijn pc.

PostPosted: Sat May 27, 2006 6:56 pm    Post subject: Reply with quote

Normally I never install Eclipse via portage. Emerging it always gives a lot of troubles, like: unmasking, compilation failures and stability troubles. Installation of CDT is a "no go" when using portage's Eclipse.

If I have some spare time, I'll try your overlay Eclipse stuff on my second Gentoo machine.
_________________
Alle dingen moeten onzin zijn.
Back to top
View user's profile Send private message
davidgurvich
Veteran
Veteran


Joined: 23 Apr 2004
Posts: 1063

PostPosted: Sun May 28, 2006 1:07 am    Post subject: Reply with quote

I couldn't get eclipse to run at all without gcj. With gcj I've actually gotten pydev and cdt running. I can use the IBM-JDK (1.5.0) for individual projects with no problems.
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2387
Location: Germania

PostPosted: Sun May 28, 2006 1:12 am    Post subject: Reply with quote

at the moment you install eclipse-sdk and use its update manager to install plugins.
this may change at some point when the Gentoo Java developers find a sane way to package eclipse plugins.

this is if you use gentoo-java-experimental, migration-packages or gcj-overlay.
_________________
hear hear
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2387
Location: Germania

PostPosted: Mon May 29, 2006 11:07 am    Post subject: Reply with quote

it seems like gcj-4.1.1 is broken.
azureus does not show UI.
eclipse does not start at all.
I hope a downgrade to gcj-4.1.0 solves the issues...
edit downgrade helps :o

just wanted to warn about this.

edit
and a gcc upgrade to 4.1.1 helps either but for dev-libs/swt ... uhhh??!
_________________
hear hear
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2387
Location: Germania

PostPosted: Thu Jun 01, 2006 3:10 pm    Post subject: Reply with quote

added rhino-1.5.5 with hack for bsf-2.3.0 to compile.
added azureus with workaround so UI initialization won't fail. hurray!

gcj-4.1.1 is ready! :o
_________________
hear hear
Back to top
View user's profile Send private message
piwacet
Guru
Guru


Joined: 30 Dec 2004
Posts: 486

PostPosted: Sun Jun 04, 2006 3:11 am    Post subject: Reply with quote

FYI, I followed the gcj guide as written, and kept running into gjdoc compile errors (don't have the error around as I think I've solved it, but it had 'classpath' in the file paths, and the TimerDoclet.java kept appearing in the error messages.)

I changed /etc/java-config-2/build/jdk.conf

to:

Code:
*=gcj-jdk-4.1


and got gjdoc to compile successfully. Then I changed it back to the way it was written in the guide:

Code:
*=gcj-jdk-SLOT


I'm not sure if what I've done is good or bad, but it got gjdoc to compile.
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2387
Location: Germania

PostPosted: Sun Jun 04, 2006 10:54 pm    Post subject: Reply with quote

piwacet wrote:
I changed /etc/java-config-2/build/jdk.conf to:
Code:
*=gcj-jdk-4.1

That is just correct.

piwacet wrote:
Then I changed it back to the way it was written in the guide:
Code:
*=gcj-jdk-SLOT

Huh? Why don't you just follow the examples in the file? ;)

May be it helps if I put '<' '>' around SLOT. :roll:
_________________
hear hear
Back to top
View user's profile Send private message
piwacet
Guru
Guru


Joined: 30 Dec 2004
Posts: 486

PostPosted: Mon Jun 05, 2006 12:59 am    Post subject: Reply with quote

It's the way it's written in the guide:

https://projects.gentooexperimental.org/expj/wiki/GCJ_as_a_JDK

Quote:
GCJ as JDK at build-time

Edit /etc/java-config-2/build/jdk.conf.

Code:
*=gcj-jdk-SLOT



So, yes, '<>' around would have helped :P Sometimes I'm too literal :roll:
Back to top
View user's profile Send private message
Uzytkownik
Guru
Guru


Joined: 31 Oct 2004
Posts: 399
Location: Bay Area, US

PostPosted: Thu Jun 08, 2006 8:35 am    Post subject: Reply with quote

a) I cannot compile eclipse from gcj-overlay:
1) It start to compile some x86-64 packages - I have pure 32-bits system on 32-bit processor
2) It crash:
Code:
     [exec] In file included from xpcom_structs.h:29,
     [exec]                  from xpcom.cpp:30:
     [exec] xpcom.h:35:25: error: nsEmbedAPI.h: Nie ma takiego pliku ani katalogu
     [exec] xpcom.cpp: In function ‘jint Java_org_eclipse_swt_internal_mozilla_XPCOM_NS_1InitEmbedding(JNIEnv*, __jclass*, jint, jint)’:
     [exec] xpcom.cpp:94: error: ‘NS_InitEmbedding’ was not declared in this scope
     [exec] xpcom.cpp: In function ‘jint Java_org_eclipse_swt_internal_mozilla_XPCOM_NS_1TermEmbedding(JNIEnv*, __jclass*)’:
     [exec] xpcom.cpp:122: error: ‘NS_TermEmbedding’ was not declared in this scope
     [exec] make: *** [xpcom.o] Błąd 1

Specially I incase swap to 2 GB (with memory was 2,5 GB)!
If I try to compile form portage:
Code:

 * Found offending option -fomit-frame-pointer in your CFLAGS
true
 * Found offending option -msse2 in your CFLAGS

 * One or more potentially gruesome CFLAGS detected. When you run into trouble,
 * please edit /etc/make.conf and remove all offending flags, then recompile
 * Eclipse and all its dependencies before submitting a bug report.

 * In particular, gtk+ is extremely sensitive to which which flags it was
 * compiled with.

 * Tip: use equery depgraph "=eclipse-sdk-3.1.2-r2" to list all dependencies.

Detected a JDK < 1.4.2
 * This package requires a Java VM version >= 1 4 2
 * Please use java-config -S to set the correct one

!!! ERROR: dev-util/eclipse-sdk-3.1.2-r2 failed.
Call stack:
  ebuild.sh, line 1555:   Called dyn_setup
  ebuild.sh, line 668:   Called pkg_setup
  eclipse-sdk-3.1.2-r2.ebuild, line 55:   Called java-utils_ensure-vm-version-ge '1' '4' '2'
  java-utils.eclass, line 77:   Called die

!!! Active Java VM too old
!!! If you need support, post the topmost build error, and the call stack if relevant.


b) If some program use AC_PROG_JAVAC it shows that there is no correct javac. Which package should I recompile.

Regards.
PS. Precompiled eclipse works.

added
I've got this error:
Code:
/var/tmp/portage/swt-3.2_rc2/work/build.xml:11: Unable to find a javac compiler;com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK

I think I have to recompile some ant package - which. emerge -e ant will take a lot of time...
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2387
Location: Germania

PostPosted: Thu Jun 08, 2006 9:55 am    Post subject: Reply with quote

2a) what gecko-sdk version is installed? should be 1.7.x.
newer versions fail like this because mozilla.org rewrote their code which is unusable with eclipse-sdk.

2b) follow the guide -> section hacks
_________________
hear hear
Back to top
View user's profile Send private message
Uzytkownik
Guru
Guru


Joined: 31 Oct 2004
Posts: 399
Location: Bay Area, US

PostPosted: Thu Jun 08, 2006 10:14 am    Post subject: Reply with quote

2a) I have gecko-sdk 1.7.13
2b) I followed. I'll rerun it for eclipse (which is in dev-util not in dev-java).
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2387
Location: Germania

PostPosted: Thu Jun 08, 2006 10:40 am    Post subject: Reply with quote

where in /usr/lib/gecko-sdk is that nsEmbedAPI.h header?
_________________
hear hear
Back to top
View user's profile Send private message
Uzytkownik
Guru
Guru


Joined: 31 Oct 2004
Posts: 399
Location: Bay Area, US

PostPosted: Thu Jun 08, 2006 10:17 pm    Post subject: Reply with quote

b) Sorry. I have something wrong with java config
added) Simple hack:
Code:
# cat /etc/portage/bashrc
alias ant="ant -Dbuild.compiler=nativeEcj"


added
PS. Not only main portage should be updated but also overlays.
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2387
Location: Germania

PostPosted: Thu Jun 08, 2006 10:31 pm    Post subject: Reply with quote

Please follow the guide and do not do such ugly thing. That is just wrong.
If you had read the guide you would have only done 'ant' -> 'eant' in the ebuilds that fail.

I know, I know. Things are like they are... :P
But Gentoo Java herd is too busy to push migration overlay into portage.
Then all would be fine...
_________________
hear hear


Last edited by geki on Thu Jun 08, 2006 10:33 pm; edited 1 time in total
Back to top
View user's profile Send private message
Uzytkownik
Guru
Guru


Joined: 31 Oct 2004
Posts: 399
Location: Bay Area, US

PostPosted: Thu Jun 08, 2006 10:33 pm    Post subject: Reply with quote

Sorry. I forgot.
Back to top
View user's profile Send private message
GNUtoo
Veteran
Veteran


Joined: 05 May 2005
Posts: 1919

PostPosted: Thu Jun 08, 2006 11:07 pm    Post subject: Reply with quote

you could help the google of code student that migrate gentoo to gcj
lol
you should realy get in touch with him or with the java dev that manage the student
http://www.gentoo.org/proj/en/devrel/user-relations/summerofcode/


personaly i wait for the integration of GCJ(that will be GREAT!!!)
Back to top
View user's profile Send private message
Uzytkownik
Guru
Guru


Joined: 31 Oct 2004
Posts: 399
Location: Bay Area, US

PostPosted: Fri Jun 09, 2006 9:41 am    Post subject: Reply with quote

I've another problem with eclipse-sdk:
Code:
>>> Compiling source in /var/tmp/portage/eclipse-sdk-3.2_rc6/work ...
 * Using bootclasspath /opt/gcj-4.1.1/share/java/libgcj-4.1.1.jar
 * Using JVM library path /opt/gcj-4.1.1/lib
 * Not building embedded Mozilla support
 * Using ecj-native-3.2 for compilation
     [echo] TARGET: compiler
     [echo] UPDATE ecj.jar

BUILD SUCCESSFUL
Total time: 9 seconds
     [echo] TARGET: compiler2

BUILD FAILED
/var/tmp/portage/eclipse-sdk-3.2_rc6/work/jdtcoresrc/compilejdtcore.xml:20: The Eclipse compiler (ecj.jar) cannot be found.

Total time: 0 seconds

!!! ERROR: dev-util/eclipse-sdk-3.2_rc6 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  eclipse-sdk-3.2_rc6.ebuild, line 114:   Called die

!!! Failed to bootstrap ecj
!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! When you file a bug report, please include the following information:
GENTOO_VM=gcj-jdk-4.1  CLASSPATH="" JAVA_HOME="/opt/gcj-4.1.1"
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER="ecj-native-3.2"
and of course, the output of emerge --info

ecj is in:
Code:
work # find | grep ecj
./jdtcoresrc/src/ecj.zip
./jdtcoresrc/ecj.jar
./plugins/org.eclipse.jdt.core/scripts/export-ecj.xml

What do I do wrong?

added
Why ./configure scripts try to use gcj -C like java compiler (and crash) i n ebuilds?
If I run it by hand it's ok.
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2387
Location: Germania

PostPosted: Fri Jun 09, 2006 10:24 am    Post subject: Reply with quote

new_to_non_X86
the gcj-overlay is my overlay/playground. :o

Uzytkownik
I hope I can add rc8 of eclipse-sdk 3.2 today.
could it be sourced from your hacks?! ;)
just because I do not have the problem.

to your addition: read the guide. the ebuild needs some love.
_________________
hear hear
Back to top
View user's profile Send private message
Uzytkownik
Guru
Guru


Joined: 31 Oct 2004
Posts: 399
Location: Bay Area, US

PostPosted: Fri Jun 09, 2006 10:50 am    Post subject: Reply with quote

@geki:
Yes. I don't understen why, but it's source :(
Sorry - I've read this manual 3 times and I always forget something.

Problem with eclipse and gecko is still actual(both 3.2 versions). I'll try with with gecko-sdk use flag.

Added
On my machine eclipse could be emerged with gecko-sdk only...


Last edited by Uzytkownik on Sun Jun 11, 2006 8:14 am; edited 1 time in total
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page Previous  1, 2, 3, ... 24, 25, 26  Next
Page 2 of 26

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum