Giter Site home page Giter Site logo

dankrank / libjawt-fix Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2 KB

Fix Java 11+ LWJGL2 Linux crash: Inconsistency detected by ld.so: dl-lookup.c: 111: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!

License: The Unlicense

Makefile 14.75% C 27.71% Shell 57.54%

libjawt-fix's Introduction

You try to run an LWJGL2 app (e.g. Minecraft 1.12 or earlier) with Java 11+ on Linux.

The following error occurs:
	Inconsistency detected by ld.so: dl-lookup.c: 111: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!
Or perhaps this one, if you use a different distro:
	Inconsistency detected by ld.so: dl-lookup.c: 105: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!
(This error message is a prime example of why assert(3) can't replace proper error reporting, btw)

So, what happened?
After a lot of googling and some LD_DEBUG'ing, I ended up here:
https://mail.openjdk.java.net/pipermail/jdk-dev/2020-February/003890.html
https://bugs.openjdk.org/browse/JDK-8200178

In Java 11 they decided to remove mapfiles, and replace them with visibility attributes.
However, mapfiles also specify symbol versioning, and they just ignored that aspect of it.
The result is that the ABI was broken for literally no reason.
In this particular case, the JAWT_GetAWT@@SUNWprivate_1.1 symbol became JAWT_GetAWT.

So, how to fix it? There are quite a few options:
- install java 8
- build your own java 11+ with a custom patch
- build your own lwjgl 2 natives (liblwjgl64.so) and link to java 11+
- somehow patch one of the shared objects to match the other
- build your own dynamic linker with a special case for this symbol
- use the LD_PRELOAD hack contained in this repo

Build:
	$ make
Use:
	$ LD_PRELOAD=path/to/jawtfix.so java <args>

libjawt-fix's People

Contributors

dankrank avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.