Issue building Openjdk 8

Asked by Avin on 2016-06-22

Build issue

## Starting jdk
lib/CoreLibraries.gmk:405: *** SRC specified to SetupNativeCompilation BUILD_LIBJLI contains missing directory
/jdk8u-jdk8u91-b14/jdk/src/share/native/java/util/zip/zlib-1.2.8. Stop.
make[1]: *** [libs-only] Error 2
make: *** [jdk-only] Error 2

I have installed zlib:

$ dpkg -l | grep zlib
ii zlib1g:arm64 1:1.2.8.dfsg-1ubuntu1 arm64 compression library - runtime
ii zlib1g-dev:arm64 1:1.2.8.dfsg-1ubuntu1 arm64 compression library - development

also faced issues with : zlib, giflib, libpng, libjpeg

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu openjdk-8 Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
2016-06-24
Last query:
2016-06-24
Last reply:
2016-06-23
Manfred Hampl (m-hampl) said : #1

What are you trying to achieve?
What was the command that you gave to receive this error message?
Are you following some "how to ..." instruction? If yes, which one?

Avin (avinashub211) said : #2

What are you trying to achieve?

   I want to build a debug version of openjdk ( I am new to open source and I want to contrib to open source)

   I am trying to build openjdk8; from source
    openjdk-8_8u91-b14-0ubuntu4.debian.tar.xz

What was the command that you gave to receive this error message?

   $./configure all went fine
   $ make all ; here I got error resolving zlib

also tried

   $ ./configure --enable-debug
   $ make all ; same issue

please share me instruction or read mi or step to build from the source

Thanks

Are you following some "how to ..." instruction? If yes, which one?
   I did not find any instruction notes in the source.

Thanks.

Manfred Hampl (m-hampl) said : #3

Ubuntu provides debug symbols in separate packages, openjdk-8-jdk-dbgsym, openjdk-8-jdk-headless-dbgsym, openjdk-8-jre-dbgsym etc.
Can't you just install these additional packages?

Avin (avinashub211) said : #4

Thanks for the quick reply,

I am using those ubuntu debug images,
If I want to change any lines in the source
and to understand the behavior, how to build from the source?

Thanks

Best Manfred Hampl (m-hampl) said : #5

As already written on https://answers.launchpad.net/ubuntu/+question/294936 on Ubuntu the package building process uses two files: the original source tarball, and Ubuntu/Debian additions (and a third file with references to these two).

I recommend that you start building the packages as they are currently existing with the commands

sudo apt-get install build-essentials
sudo apt-get build-dep openjdk-8
sudo apt-get source --compile openjdk-8

This should create new copies of the .deb files for openjdk-8 on your system.
Afterwards you can modify the source or change flags and create a new version with your modification using the dpkg-buildpackage command (with appropriate options and parameters)

You might also read http://packaging.ubuntu.com/

Manfred Hampl (m-hampl) said : #6

Oops, one error in my previous message,
apt-get source --compile openjdk-8
does not need sudo in front.

Avin (avinashub211) said : #7

Thanks Manfred Hampl, that solved my question.