dfhack icon indicating copy to clipboard operation
dfhack copied to clipboard

Cannot initialize ruby plugin: failed to load ruby library

Open docr0bot opened this issue 3 years ago • 5 comments

This message is being thrown on a fully updated Arch system using DFHack 0.47.05-r4 libruby.so is present in the /hack directory. Any advice?

docr0bot avatar Mar 11 '22 23:03 docr0bot

Anything in stderr.log?

lethosor avatar Mar 12 '22 00:03 lethosor

Also, just to check, this is newly broken, right? It worked in DFHack 0.47.05-r3?

What is the output of ldd libruby.so? What is the output of LD_LIBRARY_DIR=df_linux/libs ldd df_linux/hack/plugins/libruby.so? (I think I got that lib dir correct, but double check that it exists and has shared objects in it)

myk002 avatar Mar 12 '22 00:03 myk002

I had the same issue. Running ldd libruby.so on my Arch system informed me that the file libcrypt.so.1 was not found. After installing the libxcrypt-compat package via pacman, the issue seems to have been resolved.

permaloom avatar Mar 12 '22 21:03 permaloom

Anything in stderr.log?

I've attached a copy, feel free to peruse.

Also, just to check, this is newly broken, right? It worked in DFHack 0.47.05-r3?

I thought that might be worth looking into, and no, it's broken on r3 as well. A completely clean install on a clean copy of DF. Same error.

What is the output of ldd libruby.so? What is the output of LD_LIBRARY_DIR=df_linux/libs ldd df_linux/hack/plugins/libruby.so? (I think I got that lib dir correct, but double check that it exists and has shared objects in it)

The output of a 'ldd libruby.so' within the /hack directory yields...

ldd: warning: you do not have execution permission for `./libruby.so'
	linux-vdso.so.1 (0x00007ffe9bdbc000)
	librt.so.1 => /usr/lib/librt.so.1 (0x00007fe669278000)
	libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fe669270000)
	libcrypt.so.1 => not found
	libm.so.6 => /usr/lib/libm.so.6 (0x00007fe669188000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007fe668bf0000)
	/usr/lib64/ld-linux-x86-64.so.2 (0x00007fe6692a8000)

The output of 'LD_LIBRARY_DIR=df_linux/libs ldd df_linux/hack/plugins/libruby.so' exactly as written yields...

ldd: df_linux/hack/plugins/libruby.so: No such file or directory

I had the same issue. Running ldd libruby.so on my Arch system informed me that the file libcrypt.so.1 was not found. After installing the libxcrypt-compat package via pacman, the issue seems to have been resolved.

Indeed, installing libxcrypt-compat has seemingly resolved the issue for me as well.

ghost avatar Mar 12 '22 22:03 ghost

Maybe we can document this dependency on https://github.com/DFHack/dfhack/blob/develop/docs/Compile.rst#linux

myk002 avatar Mar 14 '22 03:03 myk002