Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Linux build? (simple ZIP, not DEB or RPM package) #1

Closed
vorburger opened this issue May 9, 2016 · 13 comments
Closed

Linux build? (simple ZIP, not DEB or RPM package) #1

vorburger opened this issue May 9, 2016 · 13 comments

Comments

@vorburger
Copy link

hello, are you planning to offer a ready made Linux build, simple ZIP, not DEB or RPM package?

I'm basically looking for the equivalent of something like Oracle's jdk-8u91-linux-x64.tar.gz they put up on http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html, but OpenJDK ..

http://download.java.net/openjdk/jdk8/ only has what appears to be a very old build. And http://openjdk.java.net/install/index.html only refers to packages, but has no ZIPs for download.

I'm obviously aware of the DEB or RPM packages that are available in distro repos. For run-time servers, Docker images and the like, I do understand the advantages of auto-updates of packages for security updates etc. But for local development personally I don't much like to use the DEB or RPM packages for system wide installation, because I want full control over what of my stuff uses which of my (typically different) Java installations, so I keep them all in my ~/bin. (Or is that dumb - would you just get a DEB or RPM package from somewhere (where?), and unzip it? Do you know if there is there a deb / rpm command to just unzip what's in a package into a "normal" ~/bin structure?)

Or are there some legal reasons or something I'm not aware of (enlighten me) that this should not be done? Is the only solution here really for everyone to rebuild such a ZIP yourself? I have actually done that in the past (using someone else's scripts; I would be too dumb myself), see http://blog2.vorburger.ch/2014/06/build-your-own-jdk-at-home.html, but it just seems a bit... strange that this doesn't exist as-is out there. So upon finding that this project repo already offers a OpenJDK binary built for Windows, I'm wondering if we could perhaps add Linux to it.

Maybe we could even set-up a real continuous integration for latest nightly OpenJDK buildt ZIPs?

@ojdkbuild
Copy link
Owner

ojdkbuild commented May 9, 2016

edit: github ate email quoting markup, editing to add context to replies

Hi,

[ on plans ]

There are some ideas about the Linux builds, but no concrete plans yet.

[ on main part ]

IANAL but think there are no legal impediments here.

The main "problem" here is that building vanilla OpenJDK on Linux is not
a hard task (for jdk8 - close to trivial actually, see [1]). And distros
provide packaged OpenJDK, that are tuned specially for Linux and (at
least for CentOS/Fedora) are well-tested. And binary compatibility for
userspace programs in mainstream Linux is less than stellar. Distro
packages (local ones on inside Docker) and self-built images will be
compatible with your system for sure. In their turn "portable" builds
"pay the price" for their portability - they are built against very old
glibc, linked statically with some common libs that are present in Linux
anyway (C++ stdlib, Zlib, libpng etc) and still have weak guarantees
that they will work correctly on less-popular Linux distros.

For windows, builds are still not trivial (though much less brittle than
they were in jdk6), so there are some "demand" for windows binaries. But
in Linux the "demand niche" between "packaged" and "self-build" OpenJDK
is quite narrow IMO, it is for users who:

  1. want to use "non-commercial" OpenJDK
  2. want some control over the versions and other installation details
    (multiple versions side-by-side, PATH tuning etc)
  3. not interested in building OpenJDK themselves

For such requirements it may be better unpack DEB/RPM packages you
mention. Yes that method should work. And the unpacked binaries will be
"relatively portable" - they will work on the same distro, should work
fine on newer versions of it and probably should work on other distros
that are not much older than the original one. All the distros mentioned
should have OpenJDK dependencies installed - so either packaged OpenJDK
should be installed too, or its dependencies should be installed
manually using something like "yum deplist".

I haven't tried that myself, but for CentOS/Fedora it should be enough
to unpack "java-1.8.0-openjdk-devel" and "java-1.8.0-openjdk-headless"
RPMs using rpm2cpio and cpio tools.

If you'll go that "unpacking" way - please let me know the results for
distro you use. If there are no serious problems with unpacked images,
it may make sense to add such binaries from CentOS as ZIP Linux
downloads to this project next to Windows ones.

[ on CI ]

If we narrow the scope here only to stable jdk8 releases for x86_64 -
then such releases are done (tag created in upstream mercurial repo)
once in 3 months. The nightly builds between these releases will likely
be usable only for devs who work on OpenJDK itself and only for testing.
For devs, who want to use OpenJDK binaries it is probably better to use
only "release" builds, not interim ones. So I think the possible CI is
tangential to the goals of this project - "provide stable, well-tested,
ready-to-use binaries" (CI still may be relevant to early pre-release
builds of jdk9 though).

[1]
alexkasko/openjdk-unofficial-builds#17 (comment)

-Alex

@ojdkbuild
Copy link
Owner

Added Linux ZIP bundle to downloads, see announce - https://groups.google.com/d/msg/ojdkbuild/CyhLLruQF0Y/NesYKYa7AAAJ

Generally this bundle is not guaranteed to work outside of CentOS. In practice CentOS 6 should be an "old enough" platform to have it's binaries "relatively portable" on other distros.

Depending on what part of JDK is used, some system libraries are required. Installation of a system JDK (openjdk-7-jdk on Debian/Ubuntu) probably will be enough for that.

Closing the issue.

@vorburger
Copy link
Author

@ojdkbuild cool! Tx. Sorry I had not replied earlier.

@desertkun
Copy link

@ojdkbuild Thank you very much for your work! Do you have any plans for Mac Os X?

@ojdkbuild
Copy link
Owner

@vorburger no problem!

@desertkun no, Mac Os X is not planned. It is quite straightforward to build, and can also be built in Hackintosh VM without Apple hardware. The problem with Mac is that after Oracle JDK8 public EOL happens, Linux and Windows versions of OpenJDK 8 most probably will continue to be maintained and updated with security fixes in upstream repository by non-Oracle contributors. So I will be able to publish Windows and Linux builds here. But Mac version most probably won't be supported upstream and likely to become broken soon after EOL. I don't want to maintain it myself - so I won't build it here.

@erickwill
Copy link

Awesome news! Thank you very much for this!

On Fri, May 27, 2016 at 6:23 AM, ojdkbuild notifications@github.com wrote:

Added Linux ZIP bundle to downloads, see announce -
https://groups.google.com/d/msg/ojdkbuild/CyhLLruQF0Y/NesYKYa7AAAJ

Generally this bundle is not guaranteed to work outside of CentOS. In
practice CentOS 6 should be an "old enough" platform to have it's binaries
"relatively portable" on other distros.

Depending on what part of JDK is used, some system libraries are required.
Installation of a system JDK (openjdk-7-jdk on Debian/Ubuntu) probably
will be enough for that.

Closing the issue.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAhiBUxDceYW7XFPIlsQIOP8Of19YkAHks5qFvA-gaJpZM4IaAjL
.

@desertkun
Copy link

@ojdkbuild Can you please share instructions how to build for Mac Os X?

@ojdkbuild
Copy link
Owner

@desertkun sure,

My knowledge on it may be a bit dated, but I think it is highly unlikely that anything related to Mac build environment has been changed after the jdk8 release - build platforms are usually frozen on release.

Official instruction is here: https://wiki.openjdk.java.net/display/MacOSXPort/Main

The only tricky part may be to setup the OS. You generally need either Mac 10.7 or 10.8. And there are the limitations for the processor types support depending on version. If you are running Haswell CPU, probably only later versions of 10.8 will work. You'll need a latest point release. On 10.8 you also need to install XQuartz (and AFAIR - run it once to init).

You also need Xcode + Xcode CLI tools with a GCC as a main compiler. This is important. According to this - http://mail.openjdk.java.net/pipermail/jdk8-dev/2013-September/003159.html - jdk8 should have been switched to clang, but AFAIK that switch hasn't happen. It is probably Xcode 4.5 or 4.4 that last time it was shipped with GCC. You'll need a latest one with GCC and a CLI tools corresponding to it. All versions of Xcode are available for download for free (with registration) from Apple. You may experiment with installing different versions of Xcode+CLI to find out one with GCC, but it is better to have an OS snapshot before this because uninstalling Xcode completely can be non-trivial.

After GCC version of Xcode+CLI works - the build itself is just configure+make. Some details on optional build config are in README-builds in top-level repo. You can get a cacerts file for it here - https://github.com/ojdkbuild/lookaside_ca-certificates . I don't remember details about freetype - I think it is preinstalled on Mac.

You may also check this project https://github.com/hgomez/obuildfactory , it looks Mac is not built there now, but it had Mac builds for a long time and may have more info on them.

@desertkun
Copy link

@ojdkbuild thank you

@erickwill
Copy link

@ojdkbuild any new update? Thanks

@ojdkbuild
Copy link
Owner

Yes, it is coming, it was not yet available when windows builds were uploaded.

@ojdkbuild
Copy link
Owner

Done, this concludes 8u141 updates. Please also note, that 8u144 update, that was released after that, probably won't be released separately (going to be included into the next release in October).

@ojdkbuild
Copy link
Owner

Just for the record, setup for plain ZIP 8u Linux builds was added here. See discussion about it in a maillist.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants