question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to run Hiero from IntelliJ since 1.8.0: "Couldn't load shared library 'libgdx-freetype64.so'"

See original GitHub issue

Since the addition of FreeType support to Hiero (yay for that, by the way), Hiero no longer starts:

com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load shared library 'libgdx-freetype64.so' for target: Linux, 64-bit
    at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:118)
    at com.badlogic.gdx.graphics.g2d.freetype.FreeType.initFreeType(FreeType.java:859)
    at com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.<init>(FreeTypeFontGenerator.java:94)
    at com.badlogic.gdx.tools.hiero.unicodefont.UnicodeFont.setRenderType(UnicodeFont.java:640)
    at com.badlogic.gdx.tools.hiero.Hiero.updateFont(Hiero.java:315)
    at com.badlogic.gdx.tools.hiero.Hiero$1FontUpdateListener.actionPerformed(Hiero.java:437)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:356)
    at com.badlogic.gdx.tools.hiero.Hiero$17.actionPerformed(Hiero.java:662)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:356)
    at com.badlogic.gdx.tools.hiero.Hiero$Renderer.create(Hiero.java:1400)
    at com.badlogic.gdx.backends.lwjgl.LwjglCanvas.create(LwjglCanvas.java:192)
    at com.badlogic.gdx.backends.lwjgl.LwjglCanvas$1.addNotify(LwjglCanvas.java:90)
    at java.awt.Container.addImpl(Container.java:1121)
    at java.awt.Container.add(Container.java:417)
    at com.badlogic.gdx.tools.hiero.Hiero.<init>(Hiero.java:183)
    at com.badlogic.gdx.tools.hiero.Hiero$21.run(Hiero.java:1579)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Unable to read file for extraction: libgdx-freetype64.so
    at com.badlogic.gdx.utils.SharedLibraryLoader.readFile(SharedLibraryLoader.java:126)
    at com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:276)
    at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:115)
    ... 39 more
Exception in thread "AWT-EventQueue-0" com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load shared library 'libgdx-freetype64.so' for target: Linux, 64-bit
    at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:118)
    at com.badlogic.gdx.graphics.g2d.freetype.FreeType.initFreeType(FreeType.java:859)
    at com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.<init>(FreeTypeFontGenerator.java:94)
    at com.badlogic.gdx.tools.hiero.unicodefont.UnicodeFont.setRenderType(UnicodeFont.java:640)
    at com.badlogic.gdx.tools.hiero.Hiero.updateFont(Hiero.java:315)
    at com.badlogic.gdx.tools.hiero.Hiero$3.valueChanged(Hiero.java:427)
    at javax.swing.JList.fireSelectionValueChanged(JList.java:1796)
    at javax.swing.JList$ListSelectionHandler.valueChanged(JList.java:1810)
    at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:184)
    at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:164)
    at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:211)
    at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:405)
    at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:415)
    at javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:459)
    at javax.swing.JList.setSelectedIndex(JList.java:2210)
    at javax.swing.JList.setSelectedValue(JList.java:2360)
    at com.badlogic.gdx.tools.hiero.Hiero.<init>(Hiero.java:190)
    at com.badlogic.gdx.tools.hiero.Hiero$21.run(Hiero.java:1579)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Unable to read file for extraction: libgdx-freetype64.so
    at com.badlogic.gdx.utils.SharedLibraryLoader.readFile(SharedLibraryLoader.java:126)
    at com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:276)
    at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:115)
    ... 31 more

I’m just right-clicking the Hiero class, and running it with the classpath of the desktop module. This used to work, so either the documentation is outdated or something in the dependency setup is broken.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
preetysangwan30commented, May 26, 2020

I have added compile “com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop” and it really works

1reaction
ttencatecommented, Jan 18, 2016

I added these to the desktop project to fix it:

compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"

Naturally, most people using Hiero don’t use gdx-freetype in their core project. So maybe gdx-tools needs to declare a dependency on gdx-freetype? Or otherwise, this workaround should be documented on the wiki (which I’ll happily do if this can’t be fixed with gradle-fu).

Read more comments on GitHub >

github_iconTop Results From Across the Web

IntelliJ not able to resolve classes of external Libraries for ...
I imported a maven project and IntelliJ was able to load all the dependencies. Project is building fine. Issue is in all my...
Read more >
Couldn't load shared library 'libgdx64.so' for target: Linux, 64-bit
I am trying to use the headless LibGDX for unit testing, but when I run the test I get this error: Couldn't load...
Read more >
IntelliJ IDEA Ultimate 2021.1 crashes on startup · Issue #119618
Describe the bug IntelliJ IDEA Ultimate 2021.1 crashes on startup because it is unable to load 'e2p'. To Reproduce Steps to reproduce the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found