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

Running/Installing fails #4

Closed
rnbwdsh opened this issue Feb 28, 2021 · 1 comment
Closed

Running/Installing fails #4

rnbwdsh opened this issue Feb 28, 2021 · 1 comment

Comments

@rnbwdsh
Copy link

rnbwdsh commented Feb 28, 2021

Neither running from build nor installing works for me (both running build/i-use-arch-btw or install + running i-use-arch-btw) yields:

build/i-use-arch-btw: error while loading shared libraries: libiuab.so: cannot open shared object file: No such file or directory

Probable reason: The .so file isn't installed properly for me / the program doesn't try to use it, even though it's in the same folder as the binary. When i sudo copy build/libiuab.so /lib it works. But externalizing the functionality to a lib seems overkill IMO, so the probable solutions are:

  1. Fix makefile to also install lib
  2. Fix build/make process to not build a lib

System: I use Arch btw. (Manjaro)

On Windows, this behaviour probably wouldn't happen, as .exe files look for .dll files automatically.

@overmighty
Copy link
Owner

Sorry for making you wait, I somehow didn't even notice that this issue was opened.

Running sudo make install in the project's root directory should install everything. However, the default install directories for the i-use-arch-btw executable and the libiuab.so shared library are /usr/local/bin and /usr/local/lib respectively, and not /usr/bin and /usr/lib, as the latter should only contain files installed by your distro's package manager and not by you manually, and it is more likely for the make install command to be run by someone manually than by a package build script.

To make the i-use-arch-btw executable work, you can either:

  • append :/usr/local/lib to the LD_LIBRARY_PATH environment variable, which tells the dynamic link loader in which directories to look for shared libraries
  • run sudo make install PREFIX=/usr instead of simply sudo make install; that'll install i-use-arch-btw and libiuab.so to /usr/bin and /usr/lib instead of /usr/local/bin and /usr/local/lib

I would recommend the former. If you use bash or zsh as your shell, add this to your ~/.bashrc/~/.zshrc:

export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants