OpenJDK7 compilation in Ubuntu12.04

Source: Internet
Author: User
At the beginning, I chose to compile the program under Cygwin of Windows. The problem may occur after two days. Only change to Ubuntu. Record that Ubuntu 12.04 only uses the 3.2 kernel, but the kernel supported in the hotspot Makefile of openJDK is not that high, so some problems may occur. Therefore, we recommend that you use Ubuntu 9 or 10. The compilation process is not complex: Download the source code. Click ubuntu in readme-builds.html

At the beginning, I chose to compile the program under Cygwin of Windows. The problem may occur after two days. Only change to Ubuntu. Record

However, Ubuntu 12.04 uses the 3.2 kernel, but the kernel supported in the hotspot Makefile of openJDK is not that high, so some problems may occur. Therefore, we recommend that you use Ubuntu 9 or 10.

The compilation process is not complex: Download the source code. Follow the steps of ubuntu or linux in readme-builds.html. Although a lot of README-builds.html, but must have looked at, it is possible to successfully compile.

Only the following problems are listed:

1. There will be a lot of libraries at the beginning, and make sanity will not be able to pass. Just download as prompted.

2. The drops file (need access to drops.) is missing .).

Set ALT_DROPS_DIR to point to the drops directory. The so-called drops directory is a directory containing JAXP and JAX-WS source code. It is not included in openJDK source code by default. You can download it at http://download.java.net/openjdk/jdk7.

In addition, you can also choose not to set the drops directory for this problem. In compilation, use:

Make ALLOW_DOWNLOADS = true

In this way, ant will automatically download

3. OS Version is not supported

Because 3.2 kernel is not supported. To solve this problem, you can modify the hotspot/make/linux/Makefile and add the 3.2 kernel to the Support List:

Http://mail.openjdk.java.net/pipermail/porters-dev/2011-October/000367.html

4. _ LEAF redefined. Since the definition of _ LEAF is added in the g ++ version, and the definition of _ LEAF is also included in the openJDK source code, it is repeated. The following references can be modified for this bug:

Http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/a6eef545f1a2

I want to modify 6 files (I won't use hg, So I replaced these 6 files with the correct one)

5. undefined reference to 'snd _ pcm_format_mask_malloc '(many undefined reference to 'snd _****')

This seems to be a bug. The link order is incorrect. You can reference this method:

Http://sunnycomputerlab.com/roller/sunny/entry/openjdk_compile_problem_on_ubuntu

Add lasound to extra_libs.

6. If shape. h cannot be found, you can install libxtst-dev and libxrender-dev, update freetype version, and download its dev version.

It's a lot of trouble, but it's okay. After a few hours, I was very excited.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.