Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Java

Journal LarsWestergren's Journal: Building JDK7 on Suse10.1 part 2

My second attempt to do build the whole JDK, and to make life a bit exiting I am going to use a newer OS and gcc version than is recommended. I wouldn't do this if I was building a production ready runtime, but I am just trying to fix and verify a few starter bugs. I simply followed the directions here. Pretty straightforward, all required C source files are available to install through YAST.

When doing make dev-sanity to test system setup first time, I got the following errors.

ERROR: You do not have a valid GCC29_COMPILER_PATH setting.
    Please check your access to /java/devtools/linux/gcc29/usr/
    and/or check your value of ALT_GCC29_COMPILER_PATH.
    This will affect you if you build the plugin target.

ERROR: You do not have access to valid Mozilla header files.
              Please check your access to /java/devtools/share/plugin/mozilla_headers_18/java/bool.h
              and/or check your value of ALT_JDK_DEVTOOLS_DIR, ALT_MOZILLA_HEADERS_PATH,

ERROR: Missing ./../src/share/lib/fonts/LucidaTypewriterRegular.ttf.
              Verify you have downloaded and overlayed on the source area all the binary files.

To fix the font error, download the JDK 7 binaries jar, unpack with java -jar JARNAME and copy the files -r into the source tree.

Mozilla error, download Mozilla headers jar, unpack anywhere, export ALT_MOZILLA_HEADERS_PATH=${WHERE_YOU_UNPACKED_IT}/share/plugin/.

The last error is that GNU GCC egcs 2.91.66 (that EXACT version) is needed to build Mozilla java plugin. The installation instructions state, if you don't want to build the plugin, this is not needed. But it doesn't really say HOW to skip building the plugin. Well, if you already have an earlier installation, you can try this, which I found at Cay Hortmanns blog:
  export ALT_GCC29_PLUGIN_LIB_PATH=/usr/local/java/jdk1.6.0/jre/plugin/i386/ns7-gcc29

Next error I get was something like this:
>ERROR: You do not have access to the previous java release jre bundles.
>ERROR: You do not have access to the previous java release sdk bundles.

You can fix this by downloading these bundles and messing about with the variables ALT_PREVIOUS_RELEASE_PATH, ALT_PREVIOUS_JDK_FILE and ALT_PREVIOUS_JRE_FILE. Last time I tried that I never got it to work. But there is an easier way, and that is just to skip building the images target. And the solution to this I got from Tim Bell
Export the environment variable SKIP_COMPARE_IMAGES

Now I passed the make dev-sanity test. Horray! Now I go on to try "make dev".

Next error:
make[3]: Entering directory `/home/larsw/java/jdk7src/trunk/motif/lib/Xm/util'
make[3]: *** No rule to make target `/usr/X11R6/lib/X11/config/Imake.tmpl', needed by `xmkmf'. Stop.
make[3]: Leaving directory `/home/larsw/java/jdk7src/trunk/motif/lib/Xm/util'

Installing motif-devel headers through YAST fixed this.

Next error: ../../../../src/solaris/hpi/native_threads/src/interrupt_md.c:115: error: static declaration of 'sigignore' follows non-static declaration /usr/include/signal.h:377: error: previous declaration of 'sigignore' was here

Ivan Tarasov had the solution for this.

Next error: ../../../../src/solaris/bin/java_md.c: In function 'get_cpuid': ../../../../src/solaris/bin/java_md.c:1119: error: PIC register '%ebx' clobbered in 'asm'

If my knowledge of C is weak, when it comes to assembler it is non-existant. :-)
However, both Cay and Ivan get by this by commenting out the clobbering of the ebx register. I join the line of those waiting to hear from the experts if this is an acceptable solution. The code comments just say: "ebx is callee-save, so push it even though it's in the clobbers section". Doesn't feel good to comment away stuff I don't understand until it works, but for now I guess I'll just put a book on assembler on my Christmas wish list. I hoped to get some sleep during the holidays, but there is always next year I suppose...

Next error:
t/JTop/JTop/classes ../../../../src/share/demo/management/JTop/JTop.java ../../../../src/share/demo/management/JTop/JTopPlugin.java ../../../../src/share/demo/management/JTop/JTopPlugin.java:53: package com.sun.tools.jconsole does not exist
import com.sun.tools.jconsole.JConsolePlugin;

First attempt: In the file j2se/make/mkdemo/Makefile I removed management and scripting as targets. They are only demos after all.

Second attempt: After looking around, I found this! Do NOT export J2SE_ONLY, it is an old, probably non-working, option! I tried to build as small as possible of course to make it easy, but it was that which caused management/JMX to not build, but these are needed later. Hopefully this option will be removed.

Final errors: /bin/cp: cannot stat `/usr/local/java/jdk1.6.0/jre/plugin/i386/ns7-gcc29/ns7/libjavaplugin_oji.so': No such file or directory /bin/cp: cannot stat `/usr/local/java/jdk1.6.0/jre/plugin/i386/ns7-gcc29/libjavaplugin_nscp_gcc29.so': No such file or directory

These are caused by bugs(?) in the Makefiles. When I Googled for it, I found that once again Ivan had the solution.

Now it all builds, for real this time.

This will also be the last entry in this series, since I am going to remove Suse from all my home and work computers until Novell gets a clue. I guess my next distro will be Ubuntu. I really really like KDE, but Kubuntu doesn't feel as polished yet. Hmm...maybe Fedora?

This discussion has been archived. No new comments can be posted.

Building JDK7 on Suse10.1 part 2

Comments Filter:

The one day you'd sell your soul for something, souls are a glut.

Working...