Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Half-automated build-script for Java J2SDK from source
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page Previous  1, 2, 3, 4, 5  Next  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
cujo
Tux's lil' helper
Tux's lil' helper


Joined: 30 Oct 2002
Posts: 84

PostPosted: Sun Nov 10, 2002 8:39 pm    Post subject: Reply with quote

does that ebuild actually build it from source though? glancing a the ebuild i would think that it does, but i dont know enough about them to know for sure.
Back to top
View user's profile Send private message
cujo
Tux's lil' helper
Tux's lil' helper


Joined: 30 Oct 2002
Posts: 84

PostPosted: Sun Nov 10, 2002 8:53 pm    Post subject: Reply with quote

anyone know why the new ebuild depends on blackdown-jdk-1.4.1_beta?
Back to top
View user's profile Send private message
ronmon
Veteran
Veteran


Joined: 15 Apr 2002
Posts: 1043
Location: Key West, FL

PostPosted: Sun Nov 10, 2002 10:23 pm    Post subject: Reply with quote

Yes, the new ebuild builds from source, or at least attempts to. I have not gotten it to work yet. Even on a dual Athlon 1800+ system it compiles for over two hours before it craps out, so the frustration level can get pretty high. Personally, I've had enough for a while.

It requires the blackdown sdk (probably the sun-jdk would do) because you have to have the java compiler to build it. I think that is 'javac' in /opt/blackdown-jdk-1.4.1_beta/bin but not sure. I encountered errors very early in my first couple attempts at building saying that javac could not be found, so I added the above dir to my path. That did not work so I put a link to it in /usr/bin and that did the trick. It died much later on an unrelated error that I don't remember offhand.

Fortunately my lappy's Gentoo is still built on 2.95.3 so I can get my NY Times crossword fix there.
Back to top
View user's profile Send private message
cujo
Tux's lil' helper
Tux's lil' helper


Joined: 30 Oct 2002
Posts: 84

PostPosted: Mon Nov 11, 2002 6:51 am    Post subject: Reply with quote

gosh, i am just full of questions.

so i did the ebuild and it completed successfully. but when i do a
Code:
java --version


i get this..

Code:
Unrecognized option: --version
Could not create the Java virtual machine.


why do you think that is?
Back to top
View user's profile Send private message
stegmaie
n00b
n00b


Joined: 31 Aug 2002
Posts: 34

PostPosted: Mon Nov 11, 2002 11:48 am    Post subject: Reply with quote

cujo wrote:
gosh, i am just full of questions.

so i did the ebuild and it completed successfully. but when i do a
Code:
java --version


i get this..

Code:
Unrecognized option: --version
Could not create the Java virtual machine.


why do you think that is?


Every SUN JVM I know on Unix does this...
try
Code:
java -version

and be happy... :)

stegmaie
Back to top
View user's profile Send private message
Cretin
Retired Dev
Retired Dev


Joined: 11 Nov 2002
Posts: 23
Location: UK

PostPosted: Mon Nov 11, 2002 12:43 pm    Post subject: Reply with quote

Hi there people,
I am the developer who commited and wrote the current java source ebuild in portage. (sun-j2sdk)

The current version in portage, to my knowledge, works fine.

A few points though,

* you have to unmerge openmotif before compiling, you can remerge it latter, it is just to stop java linking to it.

* A java development kit version 1.4 or greater is needed to compile. I have tested it with sun-jdk-1.4.1.01 and blackdown-jdk-1.4.1_beta. Both are fine.
Blackdown is used as default due to the virtual/jdk settings in the profile. Use java-config to change the jdk used after emerging the jdk.

* the ./man/ja error which was seen before was due to libsandbox, that is why I disable sandbox in this ebuild.

* It is very sensitive to CFLAGS!!

Finally a question, anyone had luck compiling java on non-X86 platforms?

See ya,
Stefan (Cretin on IRC)
Back to top
View user's profile Send private message
cujo
Tux's lil' helper
Tux's lil' helper


Joined: 30 Oct 2002
Posts: 84

PostPosted: Mon Nov 11, 2002 3:34 pm    Post subject: Reply with quote

now that all my questions have been answered, props to all who put in time, especially Cretin!
Back to top
View user's profile Send private message
gaplo
n00b
n00b


Joined: 21 Apr 2002
Posts: 25

PostPosted: Mon Nov 11, 2002 4:51 pm    Post subject: Reply with quote

I still can't get the sun-j2sdk compile successful, even followed the way stated in this thread before.
Code:

cp ../../../../src/share/javac/com/sun/tools/javadoc/PrimitiveType.java /var/tmp/portage/sun-j2sdk-1.4                                        .0-r1/work/j2sdk/control/build/linux-i386/gensrc/com/sun/tools/javadoc/PrimitiveType.java
/var/tmp/portage/sun-j2sdk-1.4.0-r1/work/j2sdk/control/build/linux-i386/bin/java -classpath ../../../t                                        ools/strip StripProperties < ../../../../src/share/javac/com/sun/tools/javac/v8/resources/compiler.pro                                        perties > /var/tmp/portage/sun-j2sdk-1.4.0-r1/work/j2sdk/control/build/linux-i386/gensrc/com/sun/tools                                        /javac/v8/resources/compiler.properties
make[5]: *** [/var/tmp/portage/sun-j2sdk-1.4.0-r1/work/j2sdk/control/build/linux-i386/gensrc/com/sun/t                                        ools/javac/v8/resources/compiler.properties] Error 1
make[5]: Leaving directory `/var/tmp/portage/sun-j2sdk-1.4.0-r1/work/j2sdk/j2se/make/sun/javac/sources                                        '
make[4]: *** [all] Error 1
make[4]: Leaving directory `/var/tmp/portage/sun-j2sdk-1.4.0-r1/work/j2sdk/j2se/make/sun/javac'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/var/tmp/portage/sun-j2sdk-1.4.0-r1/work/j2sdk/j2se/make/java/javac'
make[2]: *** [all] Error 1
make[2]: Leaving directory `/var/tmp/portage/sun-j2sdk-1.4.0-r1/work/j2sdk/j2se/make/java'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/var/tmp/portage/sun-j2sdk-1.4.0-r1/work/j2sdk/j2se/make'
make: *** [j2se-build] Error 2

!!! ERROR: The ebuild did not complete successfully.
!!! Function src_compile, Line 32, Exitcode 2
!!! (no error message)

Back to top
View user's profile Send private message
Cretin
Retired Dev
Retired Dev


Joined: 11 Nov 2002
Posts: 23
Location: UK

PostPosted: Mon Nov 11, 2002 6:41 pm    Post subject: Reply with quote

gaplo said:
Quote:
I still can't get the sun-j2sdk compile successful, even followed the way stated in this thread before.


Not sure where this error has come from, my only idea is that you ran out of disk space, but the ebuild checks for this.
I am not even sure what produces the error from that error output.
The java binary seems to have compiled ok, but it could be a dud!
Back to top
View user's profile Send private message
kyonos
n00b
n00b


Joined: 04 Nov 2002
Posts: 48

PostPosted: Mon Nov 11, 2002 8:46 pm    Post subject: Compiling java Reply with quote

Hi,

Cretin wrote:

* It is very sensitive to CFLAGS!!


What do I need for CFLAGS then?
Back to top
View user's profile Send private message
Cretin
Retired Dev
Retired Dev


Joined: 11 Nov 2002
Posts: 23
Location: UK

PostPosted: Mon Nov 11, 2002 9:29 pm    Post subject: Re: Compiling java Reply with quote

kyonos wrote:


What do I need for CFLAGS then?


All CFLAGS and CXXFLAGS settings are disabled in the ebuild in portage,
you can uncomment the two export lines in src_compile in the ebuild if you want to experament, but don't come to me if it fails!

So the answer is: it doesn't matter, it ignores them!
Back to top
View user's profile Send private message
tg-it
n00b
n00b


Joined: 11 Nov 2002
Posts: 12
Location: somewhere in germany :D

PostPosted: Tue Nov 12, 2002 12:04 am    Post subject: Reply with quote

i get an nearly error like gaplo. enough disk space is availible on my machine

Code:


lect/NativeMethodAccessorImpl.java ;\
fi
javac: invalid flag: -source
Usage: javac <options> <source files>
where possible options include:
  -g                        Generate all debugging info
  -g:none                   Generate no debugging info
  -g:{lines,vars,source}    Generate only some debugging info
  -O                        Optimize; may hinder debugging or enlarge class file
  -nowarn                   Generate no warnings
  -verbose                  Output messages about what the compiler is doing
  -deprecation              Output source locations where deprecated APIs are used
  -classpath <path>         Specify where to find user class files
  -sourcepath <path>        Specify where to find input source files
  -bootclasspath <path>     Override location of bootstrap class files
  -extdirs <dirs>           Override location of installed extensions
  -d <directory>            Specify where to place generated class files
  -encoding <encoding>      Specify character encoding used by source files
  -target <release>         Generate class files for specific VM version

make[4] *** [.compile.classlist] Error 2
make[4]: Leaving directory `/var/tmp/portage/sun-j2sdk-1.4.0-r1/work/j2sdk/j2se/make/java/java'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/var/tmp/portage/sun-j2sdk-1.4.0-r1/work/j2sdk/j2se/make/java/java'
make[2]: *** [all] Error 1
make[2]: Leaving directory `/var/tmp/portage/sun-j2sdk-1.4.0-r1/work/j2sdk/j2se/make/java'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/var/tmp/portage/sun-j2sdk-1.4.0-r1/work/j2sdk/j2se/make'
make: *** [j2se-build] Error 2

!!! ERROR: The ebuild did not complete successfully.
!!! Function src_compile, Line 32, Exitcode 2
!!! (no error message)




any ideas what to do?

thanks :)
Back to top
View user's profile Send private message
Cretin
Retired Dev
Retired Dev


Joined: 11 Nov 2002
Posts: 23
Location: UK

PostPosted: Tue Nov 12, 2002 8:09 am    Post subject: Reply with quote

This is because your java-config setting point to a jdk < 1.4. Please adjust your java settings using java-config to use a jdk >= 1.4.
I updated the portage ebuild to check for this at the beginning.

tg-it wrote:
i get an nearly error like gaplo. enough disk space is availible on my machine

Code:


lect/NativeMethodAccessorImpl.java ;\
fi
javac: invalid flag: -source
Usage: javac <options> <source files>


any ideas what to do?

thanks :)
Back to top
View user's profile Send private message
tg-it
n00b
n00b


Joined: 11 Nov 2002
Posts: 12
Location: somewhere in germany :D

PostPosted: Tue Nov 12, 2002 8:14 am    Post subject: Reply with quote

yeah i'm using java 1.3.1 for other tools.

i'm working this out later.

thanks
Back to top
View user's profile Send private message
ronmon
Veteran
Veteran


Joined: 15 Apr 2002
Posts: 1043
Location: Key West, FL

PostPosted: Tue Nov 12, 2002 10:13 am    Post subject: Reply with quote

It was just like christmas when I got up this morning and found a shiny new java-jdk on my desktop :-) Thanks Cretin.

I did an rsync, double checked my java-config settings, and started the build before bedtime. Voila!
Back to top
View user's profile Send private message
GaMMa
l33t
l33t


Joined: 23 Aug 2002
Posts: 684
Location: USA

PostPosted: Tue Nov 12, 2002 11:13 am    Post subject: Reply with quote

I'm getting an error like Gaplo, it's because I don't have a 1.4.1 JDK? I'm using Blackdown 1.3.1 right now, I'll switch to Sun 1.4.1 later I guess... Plenty of disk space.
Back to top
View user's profile Send private message
Delphiki
Guru
Guru


Joined: 04 Oct 2002
Posts: 337
Location: A2

PostPosted: Tue Nov 12, 2002 4:36 pm    Post subject: java-config Reply with quote

I realize this is a total newbie question, but could someone explain to me how to switch from using blackdown-jdk-1.3.1 to blackdown-jdk-1.4.1_beta?

Thanks in advance.
_________________
Excellent..
Back to top
View user's profile Send private message
crashman
n00b
n00b


Joined: 13 Apr 2002
Posts: 23
Location: Midwest City, Ok

PostPosted: Tue Nov 12, 2002 6:30 pm    Post subject: java-config Reply with quote

to set your jvm try as root:

#java-config --list-available-vms

to get a liat of whats available

and then:

#java-config --set-system-vm=blackdown-jdk-1.4.1_beta
Back to top
View user's profile Send private message
Cretin
Retired Dev
Retired Dev


Joined: 11 Nov 2002
Posts: 23
Location: UK

PostPosted: Tue Nov 12, 2002 6:33 pm    Post subject: Reply with quote

Hi there people, update time:
sun-j2sdk-1.4.0-r2 is now realesed!

I have fixed the problem with sun-j2sdk's java plugin crashing on some websites. This update is highly recommended!

I have yet to make any headway on the compile problems found here, for most people it compiles fine.

to set your java version use
java-config --set-system-vm=blackdown-jdk-1.4.1_beta
or whatever java version you want.
It requires a JDK version 1.4 or greater, sun and blackdown versions work fine for me.

I thank you for your patience, this is my first ebuild from scratch!
Back to top
View user's profile Send private message
Delphiki
Guru
Guru


Joined: 04 Oct 2002
Posts: 337
Location: A2

PostPosted: Tue Nov 12, 2002 7:18 pm    Post subject: java-config Reply with quote

Ok, thanks for pointing that out :) I knew it would be something that would make me feel dumb for having to have asked. I'm rsyncing to get the new ebuild and then I will try this again. I've tried doing it manually, tried doing it with the script on this thread, and have tried the first ebuild (though with the wrong version java), but hopefully fourth time is the charm.
_________________
Excellent..
Back to top
View user's profile Send private message
tg-it
n00b
n00b


Joined: 11 Nov 2002
Posts: 12
Location: somewhere in germany :D

PostPosted: Tue Nov 12, 2002 7:47 pm    Post subject: Reply with quote

Cretin wrote:
Hi there people, update time:
sun-j2sdk-1.4.0-r2 is now realesed!

I have fixed the problem with sun-j2sdk's java plugin crashing on some websites. This update is highly recommended!


thanks a lot for your work. i'm having a problem with tightvnc javaclient which kill mozilla.

i'll try r2 now :D
Back to top
View user's profile Send private message
HotShotDJ
Apprentice
Apprentice


Joined: 06 Nov 2002
Posts: 166

PostPosted: Tue Nov 12, 2002 9:18 pm    Post subject: Reply with quote

Cretin - GREAT job, and thank you so much. I haven't compiled Mozilla yet... just finished java. On to emerge mozilla. YEAH.

I only ran into one problem which resulted in the java compile exiting with an error (after over an hour.. argh!).... it couldn't find "zip." Sure enough, when I typed "emerge -p zip" it showed up as not installed. I emerged zip and re-ran your ebuild (r2) and it finished up with no problem. Perhaps this needs to be included as a dependency in your ebuild?

(btw, this is my first post to the gentoo forums - there was no need prior to this, as the "search" engine answered all my questions. :))

EDIT: Finished emerging Mozilla and linking java plugin... works PERFECTLY (so far!) Again, THANK YOU, Cretin!


Last edited by HotShotDJ on Tue Nov 12, 2002 11:02 pm; edited 1 time in total
Back to top
View user's profile Send private message
Delphiki
Guru
Guru


Joined: 04 Oct 2002
Posts: 337
Location: A2

PostPosted: Tue Nov 12, 2002 9:45 pm    Post subject: java plug-in Reply with quote

I used the ebuild, it complete successfully and I moved the plug-in to ~/.mozilla/plugins. Mozilla sees the plug-in but it still says I don't have the needed plug-in when I get to a page that requires java. I used java-config to change to the newly compiled java. If anyone has some advice they think might be helpful it would be greatly appreciated..

Also on a related note, Phoenix doesn't see this plug-in or any of my other plug-ins. Anyone know where I need to put them to get Phoenix to see them?

EDIT - I got this fixed. Turns out it was caused by the fact that I had linked from /usr/lib/mozilla/plugins to ~/.mozilla/plugins because another thread had said that was where phoenix checked for plugins.. but I realized that was obviously the wrong way to go about that. Java works. Yay. Good ebuild btw.
_________________
Excellent..


Last edited by Delphiki on Tue Nov 12, 2002 10:23 pm; edited 1 time in total
Back to top
View user's profile Send private message
HotShotDJ
Apprentice
Apprentice


Joined: 06 Nov 2002
Posts: 166

PostPosted: Tue Nov 12, 2002 10:09 pm    Post subject: Re: java plug-in Reply with quote

Delphiki wrote:
I used the ebuild, it complete successfully and I moved the plug-in to ~/.mozilla/plugins.
I believe you need to leave the plugin where you found it and make a link to it (ln -s path/to/plugin /path/to/mozilla/plugins). I hope this helps!
Back to top
View user's profile Send private message
tg-it
n00b
n00b


Joined: 11 Nov 2002
Posts: 12
Location: somewhere in germany :D

PostPosted: Wed Nov 13, 2002 12:28 am    Post subject: Reply with quote

i tried r2 and all installed well

next when i try to connect to my vnserver the status bar of mozilla says applet vncviewer loaded and then the browser will be killed. vncserver is thightvnc 1.2.6 installed on a w2k system.

i don't see any buttons on this applet.

i also recompiled mozilla with java env to r2 set.

anyone know how to debug this error or where to look at.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Goto page Previous  1, 2, 3, 4, 5  Next
Page 4 of 5

 
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