FS#45210 - [lua] unable to load locally compiled libraries.
Attached to Project:
Arch Linux
Opened by Alissa (AlissaSquared) - Friday, 05 June 2015, 02:33 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:24 GMT
Opened by Alissa (AlissaSquared) - Friday, 05 June 2015, 02:33 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:24 GMT
|
Details
Description:
Program `lua` unable to load libraries when libraries are self-compiled or installed to /usr/local/. Additional info: Many libraries are not installed directly to /usr/; however, they are instead installed to /usr/local/, due to the fact most authors of libraries expect them to be self-compiled and therefore belong in /usr/local/. However, this represents a problem when a user tries to load a library from there without setting the path directly before starting the interpreter, as the default path when Lua is installed on the system doesn't include /usr/local/. Lua should be able to check /usr/local/lib/ along with /usr/lib/ for libraries installed by the user. https://www.archlinux.org/packages/extra/x86_64/lua/ version 5.3.0-2 Steps to reproduce: Locally compile a library, such as LuaFileSystem, nstall to /usr/local/lib/lua/5.3 as per the instructions in Makefile, and attempt to load. |
This task depends upon
Closed by Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:24 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/lua/issues/1
Saturday, 25 November 2023, 20:24 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/lua/issues/1
If you're doing thing outside of pacman, I would say it's up to you to configure your system to use them.
e.g. debian: https://anonscm.debian.org/cgit/pkg-lua/lua5.2.git/tree/debian/patches/0002-debian-paths.patch
This is no different to your $PATH containing both /usr/bin and /usr/local/bin
Instead of the patch swapping it out, it should add a 2nd location.
Having both locations is not unusual, infact it's pretty standard. e.g.:
- $PATH contains /usr/local/bin then /usr/bin
- gcc searches /usr/local/include then /usr/include
- man searches /usr/local/man and /usr/local/share/man and /usr/man and /usr/share/man/
Unfortunately, it looks like at least Python also emits /usr/local from search paths. Seeing as it is not likely this will be changed anytime soon, I'll just leave this as it is.
Shouldn't they go in /usr/local folder ?
thanks
This sounds like a reasonable approach to me. Any objections why this cannot be implemented?
https://gitlab.archlinux.org/flyspray-migration/packaging/packages/lua/-/issues/1#note_127580
But I don't see any *other* bugs of mine or signs of migration. Is Flyspray still canonical?