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

/usr/local/lib64 instead of /usr/local/lib #501

Open
dmantione opened this issue Aug 20, 2022 · 1 comment
Open

/usr/local/lib64 instead of /usr/local/lib #501

dmantione opened this issue Aug 20, 2022 · 1 comment

Comments

@dmantione
Copy link

dmantione commented Aug 20, 2022

Hello,

SIMAVR currently installs its library files always in /usr/local/lib. In most Linux systems this means that 64 bit libraries are installed in a directory intended for 32 bit libraries.

Now this stuff is not so easy, because there is no perfect way to just ask the Linux system wether lib64 or lib should be used, it is a policy imposed by the Linux distribution. Or... actually there is: rpm --eval %{_lib} In order to allow distribution independent rpms to install on any Linux system, rpm knows the right answer. Debian users won't like this, but it even works on a Debian system.

I have coded the following patch, it is just a suggestion and in no way I'm suggesting that this is the best way to do it. Feel free to comment.

  • "make SYSTEMLIBDIR=xxx" will enforce /usr/local/xxx
  • If that has not been set, rpm --eval %{_lib} is executed
  • If that doesn't result in a value:
    ** If "uname -m" returns x86_64 it uses /usr/local/lib64
    ** Otherwise, use /usr/local/lib

In other words, rpm is called because it is the most reliable method I know, but if rpm is not available, it still tries to do something sensible. User can always easily override.

I would prefer to use LIBDIR rather than SYSTEMLIBDIR, but there already is a LIBDIR variable used by the makefile system.

simavr_lib64.patch.txt

@buserror
Copy link
Owner

Well I like adding a variable to configure it, and not use rpm as well rpm is only a tiny fraction of linux/oses -- also, personally I don't recommend 'installing' simavr, I always use it in-tree, which probably explains why I never had the problem!

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