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

Linker fails on Fedora 33 #6

Closed
bkurdali opened this issue Feb 17, 2021 · 4 comments
Closed

Linker fails on Fedora 33 #6

bkurdali opened this issue Feb 17, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@bkurdali
Copy link

Task :linkDebugExecutableNative FAILED
e: /root/.konan/dependencies/clang-llvm-8.0.0-linux-x86-64/bin/ld.lld invocation reported errors

The /root/.konan/dependencies/clang-llvm-8.0.0-linux-x86-64/bin/ld.lld command returned non-zero exit code: 1.
output:
ld.lld: error: unable to find library -lX11
ld.lld: error: unable to find library -lXpm
ld.lld: error: unable to find library -lXrandr
ld.lld: error: unable to find library -lglib-2.0
ld.lld: error: unable to find library -lpango-1.0
ld.lld: error: unable to find library -lpangoxft-1.0
ld.lld: error: unable to find library -lXft
ld.lld: error: unable to find library -lxml2

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':linkDebugExecutableNative'.

Compilation finished with errors

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 15s
4 actionable tasks: 4 executed
cp: cannot stat './build/bin/native/releaseExecutable/lcarswm.kexe': No such file or directory
cp: cannot stat './src/nativeMain/resources/usr/': No such file or directory
cp: cannot stat './src/nativeMain/resources/etc/
': No such file or directory

I have the libraries installed:

libX11.so  libX11.so.6  libX11.so.6.3.0
libXpm.so  libXpm.so.4  libXpm.so.4.11.0
libXrandr.so  libXrandr.so.2  libXrandr.so.2.2.0

etc. etc.
They're all in /lib64 which links to /usr/lib64
not sure how to tell the linker where to find them

@bkurdali
Copy link
Author

Update:
by symlinking the libraries into /root/.konan/dependencies/clang-llvm-8.0.0-linux-x86-64/lib
e.g. ln -s /lib64/libXpm.so ./
etc..
I can get it to build!
ldd lcarswm.kexe gives:
linux-vdso.so.1 (0x00007fff305cd000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f16e7aa4000)
libm.so.6 => /lib64/libm.so.6 (0x00007f16e795e000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f16e793c000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f16e7921000)
libc.so.6 => /lib64/libc.so.6 (0x00007f16e7756000)
/lib64/ld-linux-x86-64.so.2 (0x00007f16e7ad6000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f16e773c000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007f16e7735000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f16e76fb000)
librt.so.1 => /lib64/librt.so.1 (0x00007f16e76f0000)
libX11.so.6 => /lib64/libX11.so.6 (0x00007f16e75a9000)
libXpm.so.4 => /lib64/libXpm.so.4 (0x00007f16e7595000)
libXrandr.so.2 => /lib64/libXrandr.so.2 (0x00007f16e7588000)
libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f16e7454000)
libpango-1.0.so.0 => /lib64/libpango-1.0.so.0 (0x00007f16e7402000)
libpangoxft-1.0.so.0 => /lib64/libpangoxft-1.0.so.0 (0x00007f16e73f7000)
libXft.so.2 => /lib64/libXft.so.2 (0x00007f16e73de000)
libxml2.so.2 => /lib64/libxml2.so.2 (0x00007f16e7253000)
libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f16e7229000)
libXext.so.6 => /lib64/libXext.so.6 (0x00007f16e7212000)
libXrender.so.1 => /lib64/libXrender.so.1 (0x00007f16e7205000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f16e718c000)
libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x00007f16e7132000)
libgio-2.0.so.0 => /lib64/libgio-2.0.so.0 (0x00007f16e6f64000)
libfribidi.so.0 => /lib64/libfribidi.so.0 (0x00007f16e6f46000)
libthai.so.0 => /lib64/libthai.so.0 (0x00007f16e6f39000)
libharfbuzz.so.0 => /lib64/libharfbuzz.so.0 (0x00007f16e6e6b000)
libpangoft2-1.0.so.0 => /lib64/libpangoft2-1.0.so.0 (0x00007f16e6e51000)
libfontconfig.so.1 => /lib64/libfontconfig.so.1 (0x00007f16e6e06000)
libfreetype.so.6 => /lib64/libfreetype.so.6 (0x00007f16e6d43000)
libz.so.1 => /lib64/libz.so.1 (0x00007f16e6d29000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f16e6cfb000)
libXau.so.6 => /lib64/libXau.so.6 (0x00007f16e6cf6000)
libffi.so.6 => /lib64/libffi.so.6 (0x00007f16e6ceb000)
libgmodule-2.0.so.0 => /lib64/libgmodule-2.0.so.0 (0x00007f16e6ce5000)
libmount.so.1 => /lib64/libmount.so.1 (0x00007f16e6ca2000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f16e6c75000)
libdatrie.so.1 => /lib64/libdatrie.so.1 (0x00007f16e6c6a000)
libgraphite2.so.3 => /lib64/libgraphite2.so.3 (0x00007f16e6c49000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f16e6c36000)
libpng16.so.16 => /lib64/libpng16.so.16 (0x00007f16e6bfd000)
libbrotlidec.so.1 => /lib64/libbrotlidec.so.1 (0x00007f16e6bef000)
libblkid.so.1 => /lib64/libblkid.so.1 (0x00007f16e6bb8000)
libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007f16e6b21000)
libbrotlicommon.so.1 => /lib64/libbrotlicommon.so.1 (0x00007f16e6afe000)

however, I can't get it to run: from gdm I can select it but it goes back instantly, running startlcarswm from a running desktop (gnome) shows the bare bones of it, but crashes that desktop, and running it from another tty aborts

@atennert
Copy link
Member

atennert commented Feb 18, 2021

Hey @bkurdali, I'm glad that you could solve it. Just one question.

in src/nativeInterop/cinterop/xlib.def there are two folders references for the libraries:

  • /usr/lib
  • /usr/lib/x86_64-linux-gnu

Those fit to Arch Linux and Ubuntu, which are the systems, that I checked. What is the right library folder in Fedora, /usr/lib64, or something else?

@atennert
Copy link
Member

atennert commented Feb 18, 2021

@bkurdali, forget that last question, I re-read your comment and saw the answer at the end :)

But to answer your question: the linker and include settings are in src/nativeInterop/cinterop/xlib.def

I will add the /usr/lib64 directory later today

@atennert atennert added the bug Something isn't working label Feb 18, 2021
@atennert atennert self-assigned this Feb 18, 2021
@bkurdali
Copy link
Author

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants