You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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!
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.
** 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
The text was updated successfully, but these errors were encountered: