Git Product home page Git Product logo

Comments (6)

sam-github avatar sam-github commented on June 9, 2024

And I'm sorry, I know feature requests best come with patches, but I don't know how to do this with autotools.

from luaposix.

Ferroin avatar Ferroin commented on June 9, 2024

Installing compiled modules in /usr/local/lib would be the preferred method on BSD derived systems (they install everything not in the base system into /usr/local).

from luaposix.

sam-github avatar sam-github commented on June 9, 2024

Ferroin, do you mean IN /usr/local/lib, or UNDER /usr/local/lib?

luaposix defaults to

/usr/local/lib/posix_c.so

but default lua search paths (BSD builds could override this) would only search for

/usr/local/lib/lua/5.X/posix_c.so

from luaposix.

sam-github avatar sam-github commented on June 9, 2024

The code below can be used to find the first of lua's path and cpath that start with /. It should be possible for autotools to call this or something similar to ensure it installs into a location that lua can use.

If its going to fall back to a hard-coded default, I suggest falling back to the paths the default lua makefile uses would be sensible, ($EPREFIX)/lib/lua/5.X/ for .so, and ($PREFIX)/share/lua/5.X/ for .lua.

function first(paths, ext)
for path in string.gmatch(paths, "[^;]") do
local root = string.match(path, "^(/.
)/%?%."..ext.."$")
if root then
return root
end
end
end
function firstpath()
return first(package.path, "lua")
end
function firstcpath()
return first(package.cpath, "so")
end
print("path", firstpath())
print("cpath", firstcpath())

from luaposix.

Ferroin avatar Ferroin commented on June 9, 2024

Under in this case.

I do know some people who use /usr/local/lib/lua without the version number though.

from luaposix.

rrthomas avatar rrthomas commented on June 9, 2024

The use of --libdir and --datadir here are entirely standard. Lua libraries (.lua) are data files, hence --datadir; Lua C libraries (.so &c.) are object files, hence --libdir.

I agree that it would be nice if configure could work out where to install the libraries.

In any case, this is not a luaposix issue, it's an ax_lua.m4 issue. To put it another way, there's no point changing anything here in a luaposix-specific way. Hence, please file it against tprk77/lua-autoconf.

Note finally that you only run into this problem if you insist on using configure directly, and not luarocks. Luarocks is the easy way to install, and it knows to set --libdir and --datadir.

from luaposix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.