Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add linux 32bit x86 release #986

Open
gchauvet opened this issue Nov 27, 2018 · 49 comments
Open

Add linux 32bit x86 release #986

gchauvet opened this issue Nov 27, 2018 · 49 comments

Comments

@gchauvet
Copy link

@gchauvet gchauvet commented Nov 27, 2018

I've noticed there is no linux x86 target from adoptopenjdk.
Is it scheduled to add this ?

@gchauvet gchauvet changed the title Add linux x86 jre release Add linux x86 release Nov 27, 2018
@karianna

This comment has been minimized.

Copy link
Member

@karianna karianna commented Nov 28, 2018

There is yes, we were producing these and then stopped a few weeks ago, this is a bug.

@gchauvet

This comment has been minimized.

Copy link
Author

@gchauvet gchauvet commented Nov 28, 2018

Great ! Is downloading from https://adoptopenjdk.net/releases.html will be automatically added ?

@sxa555

This comment has been minimized.

Copy link
Member

@sxa555 sxa555 commented Nov 28, 2018

@gchauvet - to clarify - are you talking about 32-bit x86?

@gchauvet

This comment has been minimized.

Copy link
Author

@gchauvet gchauvet commented Nov 28, 2018

yes, 32-bit x86.

@sxa555

This comment has been minimized.

Copy link
Member

@sxa555 sxa555 commented Nov 28, 2018

Hmmm I didn't think we had ever produced them but maybe @karianna's seen something I missed ;-)

@gchauvet

This comment has been minimized.

Copy link
Author

@gchauvet gchauvet commented Nov 28, 2018

That's why I don't see this target on your release page :-)
Unfortunately, we have some users who always used a x86 32-bits linux :/

@karianna karianna changed the title Add linux x86 release Add linux 32bit x86 release Nov 28, 2018
@karianna

This comment has been minimized.

Copy link
Member

@karianna karianna commented Nov 28, 2018

Ah apologies for some reason I saw ARM and not x86 - no I don't think we've ever built those..

@sxa555

This comment has been minimized.

Copy link
Member

@sxa555 sxa555 commented Nov 29, 2018

I'm not sure if JDK11 can still be built on Linux/x86-32 ... Oracle don't release one on that platform, although JDK8 should build for it.

@gchauvet

This comment has been minimized.

Copy link
Author

@gchauvet gchauvet commented Nov 29, 2018

note: I've successfully build the linux x86-32bits target on my computer with your scripts.
However, i'm not able to build openJ9 variante (unsupported arch i686)

@sxa555

This comment has been minimized.

Copy link
Member

@sxa555 sxa555 commented Nov 29, 2018

Thanks. Hopefully it won't prove too hard to make that work, although I don't think anyone's tried it for a while ;-)

@rarguello

This comment has been minimized.

Copy link

@rarguello rarguello commented Dec 17, 2018

note: I've successfully build the linux x86-32bits target on my computer with your scripts.

What OS did you use?
I build it on CentOS 6.10 (32 bits) and it works. I'll post the instructions here soon.

@gchauvet

This comment has been minimized.

Copy link
Author

@gchauvet gchauvet commented Dec 21, 2018

@rarguello Ubuntu Server 16.04.5 32 bits (Virtual Box)

@bdw429s

This comment has been minimized.

Copy link

@bdw429s bdw429s commented Jan 8, 2019

I'm bundling Adopt builds with a couple products and since we started, we've had a few users asking about 32 bit Linux builds. Looking forward to this not only being added, but backfilled into previous versions as well.

@gdams

This comment has been minimized.

Copy link
Member

@gdams gdams commented Jan 25, 2019

Is someone able to champion this and help us setup the builds/provide additional hardware if needed?

@pinhead84

This comment has been minimized.

Copy link
Contributor

@pinhead84 pinhead84 commented Feb 25, 2019

I would also highly appreciate having OpenJDK11 for Linux x86 provided by AdoptOpenJDK.

What is the current state of AdoptOpenJDK11 for Linux x86? - As far as I know, there is already a Debian package for OpenJDK11 on x86 available. So I guess it should be possible to build it for this architecture as well.

Or have you discarded your plans in supporting this architecture?

@karianna

This comment has been minimized.

Copy link
Member

@karianna karianna commented Feb 25, 2019

I would also highly appreciate having OpenJDK11 for Linux x86 provided by AdoptOpenJDK.

What is the current state of AdoptOpenJDK11 for Linux x86? - As far as I know, there is already a Debian package for OpenJDK11 on x86 available. So I guess it should be possible to build it for this architecture as well.

Or have you discarded your plans in supporting this architecture?

We will be supporting 32bit on ARM as long as upstream also maintains it. We're working with our friends a Packet.net to get some beefier hardware to support this effort.

@pinhead84

This comment has been minimized.

Copy link
Contributor

@pinhead84 pinhead84 commented Feb 25, 2019

We will be supporting 32bit on ARM as long as upstream also maintains it.

Thanks for your response. I was asking about x86 (32bit) aka i386 or i686 - not ARM. Are you still planning to support this? - If yes, what's the current state or when do you think a binary is available on the website?

@karianna

This comment has been minimized.

Copy link
Member

@karianna karianna commented Feb 25, 2019

We will be supporting 32bit on ARM as long as upstream also maintains it.

Thanks for your response. I was asking about x86 (32bit) aka i386 or i686 - not ARM. Are you still planning to support this? - If yes, what's the current state or when do you think a binary is available on the website?

Good question, the typical answer at Adopt is "yes as long as upstream maintain it".

@pinhead84

This comment has been minimized.

Copy link
Contributor

@pinhead84 pinhead84 commented Feb 26, 2019

Thanks for your response - even if it does not answer all of my questions. ;)

I was playing around a little bit with your scripts (btw thanks for the great work) and was able to build OpenJDK11 for Linux x86 with not too much effort. I've published the resulting binaries into this GitHub project - maybe it's helpful for others, too. But I would definitely prefer to see an official package provided by AdoptOpenJDK in the future instead...

@gdams

This comment has been minimized.

Copy link
Member

@gdams gdams commented Feb 26, 2019

Are you building on 64 bit hosts or 32 bit hosts?

@pinhead84

This comment has been minimized.

Copy link
Contributor

@pinhead84 pinhead84 commented Feb 26, 2019

Are you building on 64 bit hosts or 32 bit hosts?

I've used Debian i386 in a virtual machine. I guess there are more elegant solutions - but it was enough for my first experiments / tests.

@djhaus

This comment has been minimized.

Copy link

@djhaus djhaus commented Feb 26, 2019

I'm looking to move a a Java component of mine to use AdoptOpenJDK, specifically the OpenJDK 8 LTS release. I also need 32-bit on x86 Linux. Is there a plan to officially support this? Thanks in advance.

@pinhead84

This comment has been minimized.

Copy link
Contributor

@pinhead84 pinhead84 commented Feb 26, 2019

I'm looking to move a a Java component of mine to use AdoptOpenJDK, specifically the OpenJDK 8 LTS release.

I don't know about the plans of the AdoptOpenJDK project about OpenJDK 8 on Linux x86. But for OpenJDK 8 you might try Liberica JDK or Zulu as an alternative.

@pinhead84

This comment has been minimized.

Copy link
Contributor

@pinhead84 pinhead84 commented Mar 6, 2019

For your information: OpenJDK 12 for Linux x86 also builds successfully with your scripts. I've added the binaries of OpenJDK 12+30 to the release page of my openjdk-linux-x86 repository.

@gdams

This comment has been minimized.

Copy link
Member

@gdams gdams commented Mar 20, 2019

@pinhead84 can you explore if you can build one a 64 bit host? We may struggle to source 32 bit hardware.

@gdams gdams transferred this issue from AdoptOpenJDK/openjdk-build Mar 20, 2019
@karianna

This comment has been minimized.

Copy link
Member

@karianna karianna commented Mar 20, 2019

Ah sorry yep - missed that.

@pinhead84

This comment has been minimized.

Copy link
Contributor

@pinhead84 pinhead84 commented Mar 21, 2019

can you explore if you can build one a 64 bit host? We may struggle to source 32 bit hardware.

@gdams I'll give it a try with Docker. But it may take one or two days. I'm quite new to AdoptOpenJDK and still don't know much about your build infrastructure. Therefore let me know, if you have any other preferences / suggestions than Docker.

@gdams

This comment has been minimized.

Copy link
Member

@gdams gdams commented Mar 21, 2019

@pinhead84 you should be able to build it on a 64 bit host. Take a look at https://njr.sabi.net/2008/12/24/building-32-bit-openjdk-on-64-bit-red-hat-enterprise-linux-52/ for example.

@jerboaa

This comment has been minimized.

Copy link
Contributor

@jerboaa jerboaa commented Mar 21, 2019

Note that upstream OpenJDK support for 32 bit x86 has been dropped by Oracle (in JDK 9?). It's unclear whether anybody cares enough to keep it going upstream.
https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms

I know of at least two bugs specific to x86 32 bit intel:
https://bugs.openjdk.java.net/browse/JDK-8211100
https://bugs.openjdk.java.net/browse/JDK-8220198

So adding it for JDK 8 should be OK. I'm not sure JDK 11+ is ready. Unless there is a commitment from AdoptOpenJDK community to fix bugs/maintain i686 upstream.

@pinhead84

This comment has been minimized.

Copy link
Contributor

@pinhead84 pinhead84 commented Mar 21, 2019

Unless there is a commitment from AdoptOpenJDK community to fix bugs/maintain i686 upstream.

I would love to do this but this goes far beyond my skills.

I know of at least two bugs specific to x86 32 bit intel:
https://bugs.openjdk.java.net/browse/JDK-8211100
https://bugs.openjdk.java.net/browse/JDK-8220198

BellSoft also pointed to some issues in this Twitter message:

https://bugs.openjdk.java.net/browse/JDK-8206107
https://bugs.openjdk.java.net/browse/JDK-8217647

Both are already fixed. If I understand them correctly, they are still willing to provide a high quality i686 port. Assuming that BellSoft (or others) provide fixes to the upstream repository, could these be ported into AdoptOpenJDK?

@karianna

This comment has been minimized.

Copy link
Member

@karianna karianna commented Mar 21, 2019

Yes :-)

@pinhead84

This comment has been minimized.

Copy link
Contributor

@pinhead84 pinhead84 commented Mar 22, 2019

can you explore if you can build one a 64 bit host? We may struggle to source 32 bit hardware.

@gdams I was able to build OpenJDK i686 on a x86-64 system (Debian amd64) in two ways:

  • Using Docker with the files provided in the openjdk-linux-x86-docker repository.

  • Or natively by following these steps. In this case I had to make a little modification to your build script (prepareWorkspace.sh) to make Freetype compile for 32 bit. Maybe there is a better solution.

I'm sure, that there is room for improvements in both approaches. But hopefully it's sufficient for a proof of concept.

@gdams

This comment has been minimized.

Copy link
Member

@gdams gdams commented Mar 22, 2019

@pinhead84

Or natively by following these steps. In this case I had to make a little modification to your build script (prepareWorkspace.sh) to make Freetype compile for 32 bit. Maybe there is a better solution.

Can you share you patches with us? I'm keen to work out if this is something we can implement into your build scripts without breaking them on 64 bit platforms

@pinhead84

This comment has been minimized.

Copy link
Contributor

@pinhead84 pinhead84 commented Mar 22, 2019

@gdams Currently it's not really a patch. Just a modification with:

sed -i.bak 's|if ! (bash ./configure |if ! (CC="gcc -m32" bash ./configure |' \
    "sbin/prepareWorkspace.sh"

I'll send you a pull request, that implements this change for i686 without breaking compatibility for other architectures.

pinhead84 referenced this issue in pinhead84/openjdk-build Mar 22, 2019
In case of cross compilation on x86-64 systems for i686 targets, Freetype is not compiled for 32 bit.
See also: https://github.com/AdoptOpenJDK/TSC/issues/71#issuecomment-475451019
karianna referenced this issue Mar 22, 2019
* enforce compilation of freetype with 32 bit on i686 systems

In case of cross compilation on x86-64 systems for i686 targets, Freetype is not compiled for 32 bit.
See also: https://github.com/AdoptOpenJDK/TSC/issues/71#issuecomment-475451019

* don't use an empty CC environment variable on non i686 systems
@karianna

This comment has been minimized.

Copy link
Member

@karianna karianna commented Mar 22, 2019

Back to build you go.

@karianna karianna transferred this issue from AdoptOpenJDK/TSC Mar 22, 2019
@karianna karianna added this to TODO in openjdk-build via automation Mar 22, 2019
@karianna karianna added this to the Backlog milestone Mar 22, 2019
@karianna

This comment has been minimized.

Copy link
Member

@karianna karianna commented Mar 22, 2019

I've put this in Backlog to indicate that we're happy for this to go ahead but are really relying on volunteers to make this happen

@pinhead84

This comment has been minimized.

Copy link
Contributor

@pinhead84 pinhead84 commented Mar 22, 2019

For your information: I recently discovered, that Azul Systems now provides OpenJDK 12 for Linux 32-bit x86. This surprises me a bit, especially that their build also to passes the TCK.

@pinhead84

This comment has been minimized.

Copy link
Contributor

@pinhead84 pinhead84 commented Mar 25, 2019

I recently discovered, that Azul Systems now provides OpenJDK 12 for Linux 32-bit x86.

The same applies to BellSoft. They confirmed via Twitter, that they're going to provide OpenJDK 11 for Linux i686 with the next 11.0.3 release in April. So I guess / hope the chances are getting better, that AdoptOpenJDK will also be able to provide builds for Linux i686 in the future.

@pinhead84

This comment has been minimized.

Copy link
Contributor

@pinhead84 pinhead84 commented Mar 25, 2019

@karianna

... we're happy for this to go ahead but are really relying on volunteers to make this happen

What kind of help by volunteers do you mean?

Correct me if I'm wrong, but shouldn't BellSoft / Azul publish their fixes for Linux i686 in order to fulfill the OpenJDK license? - Shouldn't these fixes become available in the OpenJDK repository?

Or do you need help regarding cross platform builds on amd64 systems?

@sxa555

This comment has been minimized.

Copy link
Member

@sxa555 sxa555 commented Mar 25, 2019

The latter really ... At the moment if you try to run with the 32-bit option on a 64-bit system you get:

configure: The tested number of bits in the target (0) differs from the number of bits expected to be found in the target (32).
configure: I'll retry after setting the platforms compiler target bits flag to -m32
checking size of int *... 0
configure: error: The tested number of bits in the target (0) differs from the number of bits expected to be found in the target (32)
configure exiting with result code 1

I haven't had the time to diagnose it yet but if you know how to bypass that give us a shout :-)

@pinhead84

This comment has been minimized.

Copy link
Contributor

@pinhead84 pinhead84 commented Mar 25, 2019

I've documented the steps here. Basically starting the build with /usr/bin/linux32 -- ./makejdk-any-platform.sh lets the scripts think, that it is running on a 32 bit system. With this prefix OpenJDK 11 i686 compiled fine on my Debian amd64 system.

I don't really know, if this is a acceptable solution in the long run. But at least I hadn't to make any more changes to your build scripts besides #985. ;)

@sxa555

This comment has been minimized.

Copy link
Member

@sxa555 sxa555 commented Mar 26, 2019

Hmmm hadn't thought about linux32 ... Good shout - I'll try it :-)
(As an FYI All our build machines are RHEL or CentOS v6/v7 which give us the widest compatibility with different glibc versions)

@gchauvet

This comment has been minimized.

Copy link
Author

@gchauvet gchauvet commented Apr 29, 2019

What news about this issue ?
Do you have enough volunteers?

@karianna

This comment has been minimized.

Copy link
Member

@karianna karianna commented Apr 29, 2019

@gchauvet We don't have anyone leading this effort as of yet - perhaps we can use @pinhead84 patch described above and x-compile on a 64 bit Linux host.

@sxa555 Does that seem reasonable?

@antelius

This comment has been minimized.

Copy link

@antelius antelius commented Sep 25, 2019

We had to go with Liberica, https://bell-sw.com/pages/java-8u222, for Linux x86 32-bit support.

@sxa555 Did you manage to make any progress with using linux32 to build? Is there anything I (as a newbie to the AdoptOpenJDK project) can do to help out?

@jerith666 jerith666 mentioned this issue Oct 14, 2019
4 of 10 tasks complete
@madduci

This comment has been minimized.

Copy link

@madduci madduci commented Nov 27, 2019

I think this will be important once jpackage will be available in JDK14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
openjdk-build
  
TODO
You can’t perform that action at this time.