sn-bindgen icon indicating copy to clipboard operation
sn-bindgen copied to clipboard

The binary doesn't like other linux distro

Open mio-19 opened this issue 5 months ago • 1 comments

I assume that it is built on Ubuntu and only work on Ubuntu or similar distros. I am on Archlinux. I installed llvm17 from aur. My llvm17 is in /usr/lib/llvm17/ so I created symlinks

sudo ln -s /usr/lib/llvm17/ /usr/lib/llvm-17
$ ./sn-bindgen-x86_64-pc-linux
./sn-bindgen-x86_64-pc-linux: error while loading shared libraries: libclang-17.so.17: cannot open shared object file: No such file or directory

I saw this so I created symlink from /usr/lib/llvm-17/lib/libclang.so.17 to /usr/lib/llvm-17/lib/libclang-17.so.17

sudo ln -s /usr/lib/llvm-17/lib/libclang.so.17 /usr/lib/llvm-17/lib/libclang-17.so.17
$ ./sn-bindgen-x86_64-pc-linux
./sn-bindgen-x86_64-pc-linux: error while loading shared libraries: libclang-17.so.17: cannot open shared object file: No such file or directory

Finally I successfully run the binary with LD_LIBRARY_PATH

$ LD_LIBRARY_PATH=/usr/lib/llvm-17/lib/ ./sn-bindgen-x86_64-pc-linux
Missing expected flag --package!
Missing expected flag --header!

Usage: bindgen --package <string> --header <string> [--scala] [--c] [--link-name <string>] [--c-import <string>]... [--clang-include <string>]... [--clang <string>]... [--quiet] [--trace | --info | --warning | --error] [--llvm-bin <string> | --clang-path <string> | --no-system] [--render.no-constructor <string>] [--render.opaque-structs <string>] [--render.no-comments] [--render.no-location] [--render.external-path <string>]... [--render.external-name <string>]... [--out <string>] [--multi-file] [--export] [--exclude-system-path <string>]... [--flavour <string>]

mio-19 avatar Sep 08 '24 03:09 mio-19