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

libfreetype causes link issue (segfault+UnsatisfiedLinkError) for SWT (Eclipse IDE) on Fedora 28 #390

Closed
mickaelistria opened this issue Jun 25, 2018 · 10 comments
Assignees
Labels
bug Issues that are problems in the code as reported by the community
Milestone

Comments

@mickaelistria
Copy link

This is a followup of the issue initially reported at eclipse-openj9/openj9#2239.
The same issue happens with HotSpot and OpenJ9 flavors, for all versions of Java.

libfreetype.so.6 shipped with AdoptOpenJDK builds seems to often conflicts with other libraries installed on a regular Linux workstation.
For example, when starting Eclipse IDE with any AdoptOpenJDK builds, we either see SegFaults or UnsatisfiedLinkError. This is caused by the SWT library (it's a .so file) trying to load libharfuzz.so (which is available on system, not in AdoptOpenJDK build) which itself requires a more recent version of libfreetype.so (the one installed in system) than the one shipped with AdoptOpenJDK.

This simply makes impossible to use any SWT/Eclipse-based application with AdoptOpenJDK build.
As a Linux user, I do have X and wayland and many graphical apps installed (which is I guess the case of most people who are using Linux for development or execution of Java-based graphical apps), I find it strange that AdoptOpenJDK ships such common libs as libfreetype.so with the risk (and currently it's more than a risk, it's a real effect) of breaking most Linux users.
Is there any use case of graphical java applications on Linux where the user wouldn't have libfreetype already installed?

@tellison
Copy link
Contributor

Hi Mickael, fair questions. Could you drop in on our Slack #build channel and say "hi" so we can discuss?

@mduft
Copy link

mduft commented Sep 3, 2018

Hitting the exact same issue with both HotSpot and OpenJ9 builds from AdoptOpenJDK. I can confirm that removing/renaming libfreetype.so.6 fixes the issue with Eclipse.

@karianna karianna added this to the 2.x.x milestone Sep 29, 2018
@DanHeidinga
Copy link

@sxa555 Can you take a look at this? Thanks

@karianna karianna removed this from the 2.x.x milestone Jan 10, 2019
@moschinski
Copy link

moschinski commented Apr 16, 2019

Any update? In fact, it is currently not possible to ship a Java desktop application for Linux bundled with AdoptOpenJDK unless you are willing to risk application crashes. Several Linux distributions used by our customers do not provide the needed libpng12.so.0 library.

The libfreetype.so.6 library shipped with Azul Zulu 8u202 neither has the libpng12 dependency nor the one to libz.so.1 as it depends only on libc.so.6. Maybe, you could ship a libfreetype library with as few as possible dependencies too?

@karianna karianna added this to the April 2019 milestone Apr 16, 2019
@sxa
Copy link
Member

sxa commented Apr 16, 2019

@smlambert Is this an issue that we have environments/tests available to detect?

@smlambert
Copy link
Contributor

The jdk_awt/jdk_sound/jdk_swing tests should also be triaged for issues (to date those extended openjdk tests are still not fully triaged). In past, there have been other issues with this library (adoptium/aqa-tests#136, #202, #354)

Additionally, we have not yet added the Eclipse tests, as there are some hurdles to automate them. Those tests may detect this problem (adoptium/aqa-tests#1000).

@karianna karianna modified the milestones: April 2019, May 2019 May 1, 2019
@karianna karianna modified the milestones: May 2019, June 2019 Jun 3, 2019
@karianna karianna modified the milestones: June 2019, July 2019 Jul 5, 2019
@adamfarley
Copy link
Contributor

Removal of the bundled freetype (from linux builds) is being covered here:

#2133

Will update after the release, once we've tested and merged.

@adamfarley adamfarley self-assigned this Dec 17, 2020
@adamfarley
Copy link
Contributor

adamfarley commented Dec 17, 2020

@mickaelistria - We no longer include the Freetype Library in linux builds. Can you verify that your issue no longer exists in the latest nightly build?

Also, thank you for your patience. :)

@mickaelistria
Copy link
Author

I'm not working on the specific case that brought me to open this bug anymore and don't plan to get back to it soon. So I won't be able to test it. Feel free to close this issue at your own convenience.

@adamfarley
Copy link
Contributor

Will do.

@karianna karianna added this to the December 2020 milestone Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that are problems in the code as reported by the community
Projects
None yet
Development

No branches or pull requests

9 participants