Skip to contentSkip to conversation

Building openjdk without X11 dependencies

DISCUSSION Mario Domenech Goulart 3 participants 4 messages Apr 23, 2015

lore
Share & tools
lore
#0 lore raw

Hi,

I'm under the impression building openjdk without X11 is not feasible. As far as I understand, the headless package is (or should be) generated by building openjdk with the X11 dependencies, then selecting the components which are not linked against X11 libraries and putthing them into a separate package. Does that sound correct?

Is it possible to build openjdk without X11 dependencies?

Best wishes.
Mario

Signature · 1 line
http://www.ossystems.com.br
#1 lore raw

Hello Mario,

I am adding Max and Sven on Cc as they've been active on the packaging.

Quoted 7 lines · Mario Domenech Goulart

I'm under the impression building openjdk without X11 is not feasible. As far as I understand, the headless package is (or should be) generated by building openjdk with the X11 dependencies, then selecting the components which are not linked against X11 libraries and putthing them into a separate package. Does that sound correct?

Is it possible to build openjdk without X11 dependencies?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#2 lore raw

Hi

Quoted 8 lines
Quoted 7 lines · <[email protected]> wrote:

I'm under the impression building openjdk without X11 is not feasible. As far as I understand, the headless package is (or should be) generated by building openjdk with the X11 dependencies, then selecting the components which are not linked against X11 libraries and putthing them into a separate package. Does that sound correct?

Is it possible to build openjdk without X11 dependencies?

My interests actually went into the other direction. Adding a packageconfig which re-enables xawt.

While looking at it I tried to remove the DEPENDS on X11/GTK+ and came to the conclusion that you would need to heavily change the source tree / Makefiles to leave all the sources which include X11 (or GTK+) headers out of the way.

The sources react to the symbol BUILD_HEADLESS_ONLY which promised to keep the X11 dependencies out. However that is either broken in the current versions of OpenJDK or never worked at all.
Some mailinglist post underlined that. e.g.
http://mail.openjdk.java.net/pipermail/build-dev/2012-March/005700.html

Maybe one could split openjdk-7-common and openjdk7-jre into packages without X11 dependencies and the rest as Mario proposes. However I don't know if that would lead to a working headless java installation.

Regards
Max

#3 lore raw

Hello Max,

Quoted 11 lines · Max Krummenacher
Quoted 8 lines
Quoted 7 lines · <[email protected]> wrote:

I'm under the impression building openjdk without X11 is not feasible. As far as I understand, the headless package is (or should be) generated by building openjdk with the X11 dependencies, then selecting the components which are not linked against X11 libraries and putthing them into a separate package. Does that sound correct?

Is it possible to build openjdk without X11 dependencies?

My interests actually went into the other direction. Adding a packageconfig which re-enables xawt.

I see.

Quoted 4 lines

While looking at it I tried to remove the DEPENDS on X11/GTK+ and came to the conclusion that you would need to heavily change the source tree / Makefiles to leave all the sources which include X11 (or GTK+) headers out of the way.

It seems like it will be necessary. More below...

Quoted 9 lines

The sources react to the symbol BUILD_HEADLESS_ONLY which promised to keep the X11 dependencies out. However that is either broken in the current versions of OpenJDK or never worked at all.
Some mailinglist post underlined that. e.g.
http://mail.openjdk.java.net/pipermail/build-dev/2012-March/005700.html

Maybe one could split openjdk-7-common and openjdk7-jre into packages without X11 dependencies and the rest as Mario proposes. However I don't know if that would lead to a working headless java installation.

The packaging splitting does not work for this case as we need to build in a framebuffer only environment. So the build dependencies are not available.

Regards,

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750