LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-30-2011, 05:12 PM   #1
VisionIncision
Member
 
Registered: Dec 2011
Location: London, UK
Distribution: Slackware64 14
Posts: 98

Rep: Reputation: Disabled
OpenJDK 7 Install


Hi all,
So I tried to compile OpenJDK 7 with the following:
Code:
LANG=C make
I was then given the following error:
Code:
ERROR: Your JAVA_HOME environment variable is set.  This will 
       most likely cause the build to fail.  Please unset it 
       and start your build again.
So I unset my $JAVA_HOME using the unset command. When I tried to compile again, I was given this error:

Code:
Error: JAVA_HOME is not defined correctly.
  We cannot execute /NO_BOOTDIR/bin/java
make[2]: *** [build] Error 1
make[2]: Leaving directory `/home/jack/build/openjdk/langtools/make'
make[1]: *** [langtools-build] Error 2
make[1]: Leaving directory `/home/jack/build/openjdk'
make: *** [build_product_image] Error 2
Where have I gone wrong. I have Googled this with no success. I have unset the environment variable as asked. Scratching my head a little now.

Regards,
Jack
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 12-30-2011, 05:51 PM   #2
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,534

Rep: Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384
This is the only person who has ever claimed to have succeeded in building OpenJDK on Slackware:

http://martinusadyh.web.id/2011/05/2...-on-slackware/
 
Old 12-30-2011, 05:56 PM   #3
VisionIncision
Member
 
Registered: Dec 2011
Location: London, UK
Distribution: Slackware64 14
Posts: 98

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dugan View Post
This is the only person who has ever claimed to have succeeded in building OpenJDK on Slackware:

http://martinusadyh.web.id/2011/05/2...-on-slackware/
Hmm, that looks like its pretty hit and miss. Are there any binaries or SlackBuilds that you know of?

Thanks,
Jack.
 
Old 12-30-2011, 05:58 PM   #4
55020
Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 299
Blog Entries: 4

Rep: Reputation: 280Reputation: 280Reputation: 280
I've nearly finished a SlackBuild for OpenJDK, and I don't want to put you off, but you're in for a few more challenges.

The primary documentation is here: http://hg.openjdk.java.net/jdk7/buil...ME-builds.html

You may also benefit from reading this: http://translate.googleusercontent.c...YFwrj8YIQRNyzQ [note that the translation process garbles the actual commands and output, so refer also to the original web page]

Your proximate problem is caused by not setting ALT_BOOTDIR. If you want solutions for your next three problems [1][2][3], try this:

Code:
unset JAVA_HOME

LANG=C \
ALT_BOOTDIR=/usr/lib${LIBDIRSUFFIX}/java \
ALT_DROPS_DIR=$(pwd) \
ALT_FREETYPE_LIB_PATH=/usr/lib${LIBDIRSUFFIX} \
ALT_PARALLEL_COMPILE_JOBS=1 \
DISABLE_HOTSPOT_OS_VERSION_CHECK=ok \
  make
... where LIBDIRSUFFIX has its conventional meaning. You'll need jaxp and jaxws sources in the current directory from http://download.java.net/jaxp/1.4.5/jaxp145_01.zip and
http://download.java.net/glassfish/c...2011_05_27.zip and
https://java.net/downloads/jax-ws/JD...2010_08_19.zip

[1] The build doesn't parallelize properly, see http://mail.openjdk.java.net/piperma...er/016062.html
[2] When README-builds.html says "NOTE: The Complete OpenJDK Source Bundles will contain the JAXP and JAX-WS sources", it's lying
[3] If you're running kernel 3.0 or 3.1, the build fails -- towards the end -- with "This OS is not supported"
 
Old 12-31-2011, 12:04 PM   #5
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,175

Rep: Reputation: Disabled
I have packages for OpenJDK (a jdk and a jre package) which I created for Slackware-current. It took a while because I wanted OpenJDK to compile against the GCC java compiler after removing all traces of the Oracle java packages.

That "bootstrapping" of OpenJDK is quite complicated and it also required that I modified Slackware's gcc and seamonkey packages.
The reason for wanting to bootstrap the compilation is that I want to see if I can get OpenJDK built for ARMedslack. That does not yet have a JRE or JDK package at all (apart from "gcc-java").

I hope (once I re-built them from scratch to test the script and added a browser plugin for Java) that Pat Volkerding will accept all of this so that we can have a free JDK in Slackware (Oracle no longer allows for the new releases of their JDK and JRE to be bundled with distros).

Also, I have not even tried the packages to see if they actually work :-) I literally just finished compiling them. Today's post reminded me that I had a failed attempt at building OpenJDK sitting on my computer (I promised Pat early november that I would come up with a package to replace the Oracle stuff). And today I saw the flaw in my SlackBuild which prevented me from bootstrapping it against gnu java.

Eric
 
7 members found this post helpful.
Old 12-31-2011, 04:06 PM   #6
55020
Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 299
Blog Entries: 4

Rep: Reputation: 280Reputation: 280Reputation: 280
Great news Eric -- I'll use tomorrow for something else then

OpenJDK built for ARMedslack would be truly awesome, at least one model railway could use that straight away ;-)
 
1 members found this post helpful.
Old 01-01-2012, 02:34 PM   #7
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,175

Rep: Reputation: Disabled
I can confirm that the OpenJDK package works on my Slackware-current laptop - including the separate browser plugin package (icedtea-web) which I also created.
I have uploaded the sources and scripts to Pat Volkerding's server so he can have a look at the required changes to gcc and seamonkey.

Let's hope we'll see movement in slackware-current soon.

Eric
 
2 members found this post helpful.
Old 01-02-2012, 02:01 PM   #8
lonestar_italy
Member
 
Registered: Nov 2010
Location: Italy
Distribution: Slackware
Posts: 62

Rep: Reputation: 0
Quote:
Originally Posted by Alien Bob View Post
I hope (once I re-built them from scratch to test the script and added a browser plugin for Java) that Pat Volkerding will accept all of this so that we can have a free JDK in Slackware (Oracle no longer allows for the new releases of their JDK and JRE to be bundled with distros).
But, would it still be allowed for an end user to download the official Oracle binaries and install them by repackaging them using a local SlackBuild? eg: what we do for Google Chrome or Google Earth?

Is there room for a third-party developed SlackBuild (SBo, for instance) that simply downloads the official Oracle binaries and converts them into a Slackware package?

Will the OpenJDK be full compliant with the official Oracle java binaries? I ask this because I've happened to use OpenJDK browser plugin on an Ubuntu distribution some months ago, and some specific applet did not work correctly until I removed the OpenJDK packages and installed the official ones.
 
Old 01-02-2012, 02:51 PM   #9
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,534

Rep: Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384Reputation: 1384
Quote:
Originally Posted by lonestar_italy View Post
Is there room for a third-party developed SlackBuild (SBo, for instance) that simply downloads the official Oracle binaries and converts them into a Slackware package?
Of course. There will definitely be a Sun JDK7 SlackBuild on SBo.

If you want to have Sun JDK 7 *now*, btw, you can use Pat's Sun JDK6 SlackBuild to build it.
 
1 members found this post helpful.
Old 01-02-2012, 06:42 PM   #10
mlpa
Member
 
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 481

Rep: Reputation: 34
Quote:
Originally Posted by Alien Bob View Post
I can confirm that the OpenJDK package works on my Slackware-current laptop - including the separate browser plugin package (icedtea-web) which I also created.
I have uploaded the sources and scripts to Pat Volkerding's server so he can have a look at the required changes to gcc and seamonkey.

Let's hope we'll see movement in slackware-current soon.

Eric
The slackbuild of OpenJDK is available somewhere?
If not it is possible to make it public?

Thanks for your effort
 
Old 01-02-2012, 06:51 PM   #11
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,175

Rep: Reputation: Disabled
Quote:
Originally Posted by mlpa View Post
The slackbuild of OpenJDK is available somewhere?
If not it is possible to make it public?

Thanks for your effort
I have uploaded all sources, patches and scripts as well as 64bit packages to Pat Volkerding's server. I hope he approves those and adds them as updates to slackware-current soon.
Otherwise, if Pat does not show signs of activity, I will make all of that stuff public and create 32bit packages as well.

Eric
 
3 members found this post helpful.
Old 01-02-2012, 06:55 PM   #12
mlpa
Member
 
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 481

Rep: Reputation: 34
Quote:
Originally Posted by Alien Bob View Post
I have uploaded all sources, patches and scripts as well as 64bit packages to Pat Volkerding's server. I hope he approves those and adds them as updates to slackware-current soon.
Otherwise, if Pat does not show signs of activity, I will make all of that stuff public and create 32bit packages as well.

Eric
Thanks.

Is there any advantage or disadvantage on using OpenJDK instead of JDK?
 
Old 01-02-2012, 07:07 PM   #13
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,175

Rep: Reputation: Disabled
Quote:
Originally Posted by mlpa View Post
Thanks.

Is there any advantage or disadvantage on using OpenJDK instead of JDK?
I have no idea. My guess is that Oracle adds stuff to its own JDK which is not part of OpenJDK. The OpenJDK packages which I built are my first attempt and there are several variations in the choice of VM's and JIT compilers. I picked the defaults and it remains to be seen if that is the optimal choice. Also, the open source java webbbrowser plugin (icedtea-web) is not as good as the plugin which is included with the binary builds from Oracle. It will be a matter of choice and/or principle which version you choose to install.

The good thing is that this choice exists of course. I presume that Slackware will be shipping OpenJDK/JRE packages in future and http://slackbuilds.org/ would be a good place to provide a version of Slackware's current jdk.SlackBuild script which simply re-packages the Oracle binaries. It is absolutely allowed to download the Oracle binaries for private use. Oracle's binary license just no longer allows 3rd parties to re-distribute those. A shame, and illustrative of Oracle's view of the Open Source community and Free Software, but that's how it is.

Eric
 
1 members found this post helpful.
Old 01-03-2012, 07:01 AM   #14
lonestar_italy
Member
 
Registered: Nov 2010
Location: Italy
Distribution: Slackware
Posts: 62

Rep: Reputation: 0
Quote:
Originally Posted by dugan View Post
Of course. There will definitely be a Sun JDK7 SlackBuild on SBo.

If you want to have Sun JDK 7 *now*, btw, you can use Pat's Sun JDK6 SlackBuild to build it.
Cool. Thanks for clarification!
 
Old 01-03-2012, 10:44 AM   #15
VisionIncision
Member
 
Registered: Dec 2011
Location: London, UK
Distribution: Slackware64 14
Posts: 98

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Alien Bob View Post
I can confirm that the OpenJDK package works on my Slackware-current laptop - including the separate browser plugin package (icedtea-web) which I also created.
I have uploaded the sources and scripts to Pat Volkerding's server so he can have a look at the required changes to gcc and seamonkey.

Let's hope we'll see movement in slackware-current soon.

Eric
Oh great. Thanks, I shall have a look on your site.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: SAP joins OpenJDK LXer Syndicated Linux News 0 07-15-2011 04:50 PM
Unable to build openjdk/icedtea on Slack 13.1 robertjinx Slackware 4 11-15-2010 07:03 AM
OpenJDK does tick/tock - why does it do that? Pls hlp Thor_2.0 Arch 0 08-27-2010 02:44 AM
About openjdk-6-jdk satimis Programming 3 05-03-2010 06:07 PM
Installing OpenJDK MTK358 Linux - Software 2 11-18-2009 08:35 AM


All times are GMT -5. The time now is 06:55 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration