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

[Linux] Can't find libraries at build while having them already installed #424

Closed
joaonunatings opened this issue Feb 13, 2022 · 4 comments · Fixed by korlibs-archive/korge-next#519

Comments

@joaonunatings
Copy link

joaonunatings commented Feb 13, 2022

While opening sample project from fresh plugin install I get these build errors.
OS: Arch Linux (sway)
Intellij 2021.3.2
KorGE 2.4.10

> Configure project :
Can't find libncurses.so.5. Please: sudo apt-get -y install freeglut3-dev libopenal-dev libncurses5 libtinfo5
Can't find libtinfo.so.5. Please: sudo apt-get -y install freeglut3-dev libopenal-dev libncurses5 libtinfo5
Can't find libglut.so.3. Please: sudo apt-get -y install freeglut3-dev libopenal-dev libncurses5 libtinfo5
Can't find libopenal.so.1. Please: sudo apt-get -y install freeglut3-dev libopenal-dev libncurses5 libtinfo5

I followed this document but I have all those libraries installed:

ls -1 /usr/lib/libncurses.so.5
/usr/lib/libncurses.so.5@
ls -1 /usr/lib/libtinfo.so.5
/usr/lib/libtinfo.so.5@
ls -1 /usr/lib/libglut.so.3
/usr/lib/libglut.so.3@
ls -1 /usr/lib/libopenal.so.1
/usr/lib/libopenal.so.1@
@soywiz
Copy link
Member

soywiz commented Feb 14, 2022

In theory just a System.err.println, shouldn't fail the task:
https://github.com/korlibs/korge-next/blob/50cf3bc0606f1416e2dedb6b35986441314bbcad/korge-gradle-plugin/src/main/kotlin/com/soywiz/korge/gradle/KorgeGradlePlugin.kt#L29-L36

If you run gradle with --info it should display the paths where it looks for the libraries. Can you check that?

It seems folders are checked from here:
https://github.com/korlibs/korge-next/blob/50cf3bc0606f1416e2dedb6b35986441314bbcad/buildSrc/src/main/kotlin/com/soywiz/korlibs/util/LDLibraries.kt#L6

Do you have the /etc/ld.so.conf file, and if so, what's its content?

@joaonunatings
Copy link
Author

Yes I have but as described here this file is for additional libraries that are not found by default in /lib or /usr/lib. So maybe this is a valid path to be searched within KorGE library loader? I'm willing to help doing this and make a PR on this

@soywiz-invideo
Copy link
Contributor

@joaonunatingscode Perfect. You can try to edit that file and put printlns and stuff to figure out what's going on.
If you execute: ./gradlew publishToMavenLocal in the korge-next repository, and use korge version 2.0.0.999 you can try local changes

@joaonunatings joaonunatings changed the title Can't find libraries at build while having them already installed [Linux] Can't find libraries at build while having them already installed Feb 15, 2022
soywiz added a commit to korlibs-archive/korge-next that referenced this issue Feb 23, 2022
@soywiz
Copy link
Member

soywiz commented Feb 23, 2022

A friend of mine using Pop OS had this exception stacktrace:

> Configure project :
java.nio.file.NoSuchFileException: /app/etc
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
	at java.base/sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:432)
	at java.base/java.nio.file.Files.newDirectoryStream(Files.java:540)
	at com.soywiz.korge.gradle.targets.linux.LDLibraries.loadConfFile(LDLibraries.kt:32)
	at com.soywiz.korge.gradle.targets.linux.LDLibraries.<clinit>(LDLibraries.kt:14)
	at com.soywiz.korge.gradle.KorgeGradleApply$apply$1.invoke(KorgeGradlePlugin.kt:30)
	at 

Tried to fix that issue here: korlibs-archive/korge-next@1002ab7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
3 participants