LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   OpenJDK 7 Install (https://www.linuxquestions.org/questions/slackware-14/openjdk-7-install-921285/)

VisionIncision 12-30-2011 05:12 PM

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

dugan 12-30-2011 05:51 PM

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/

VisionIncision 12-30-2011 05:56 PM

Quote:

Originally Posted by dugan (Post 4562148)
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.

55020 12-30-2011 05:58 PM

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"

Alien Bob 12-31-2011 12:04 PM

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

55020 12-31-2011 04:06 PM

Great news Eric -- I'll use tomorrow for something else then :D

OpenJDK built for ARMedslack would be truly awesome, at least one model railway could use that straight away ;-)

Alien Bob 01-01-2012 02:34 PM

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

lonestar_italy 01-02-2012 02:01 PM

Quote:

Originally Posted by Alien Bob (Post 4562639)
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.

dugan 01-02-2012 02:51 PM

Quote:

Originally Posted by lonestar_italy (Post 4563970)
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.

mlpa 01-02-2012 06:42 PM

Quote:

Originally Posted by Alien Bob (Post 4563271)
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 :)

Alien Bob 01-02-2012 06:51 PM

Quote:

Originally Posted by mlpa (Post 4564092)
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

mlpa 01-02-2012 06:55 PM

Quote:

Originally Posted by Alien Bob (Post 4564099)
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?

Alien Bob 01-02-2012 07:07 PM

Quote:

Originally Posted by mlpa (Post 4564104)
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

lonestar_italy 01-03-2012 07:01 AM

Quote:

Originally Posted by dugan (Post 4563993)
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!

VisionIncision 01-03-2012 10:44 AM

Quote:

Originally Posted by Alien Bob (Post 4563271)
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.

mlpa 02-24-2012 07:04 AM

Quote:

Originally Posted by Alien Bob (Post 4564113)
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

Hi I found out that the version of openJDK was a know bug (https://netbeans.org/bugzilla/show_bug.cgi?id=205348) that is resolved in newer version of openJDK.

Is it possible to build new packages with the new version?

mlpa 04-24-2012 05:52 PM

1 Attachment(s)
Hi, sorry to open this topic again.
I have installed alien bob openJDK packages.
Until now it work very well, I mostly develop command line programs.

But when I run a graphical program, the graphic is broken as show in the image.

Is it a problem of the openJDK or mine?

wildwizard 04-25-2012 06:35 AM

Quote:

Originally Posted by mlpa (Post 4662177)
But when I run a graphical program, the graphic is broken as show in the image.

I used 2 Java programs on a regular basis.

1. josm (Open Street Map editor)
2. psm (PlayStation Media Server)

Neither of those 2 applications show any issues with their displays, so if you want to test one of them out on your system and see if you have problems with them or not, to rule out your system setup.

Alien Bob 04-25-2012 08:23 AM

I run several GUI applications which are programmed in Java, using web start or the browser plugin, and never had issues. It looks like yours is a local issue.

Eric

slackass 04-26-2012 12:19 AM

I have AlienBob's openJDK on several boxes and it works perfect so far.
One program I run gives an error about it not being tested on openJDK but it still runs perfect.


All times are GMT -5. The time now is 07:23 AM.