luarocks / luarocks-site

LuaRocks website and module host
http://luarocks.org
176 stars 36 forks source link

lua-gd references an old version version #195

Closed jalapenopuzzle closed 1 year ago

jalapenopuzzle commented 1 year ago

I attempted to install lua-gd as follows:

luarocks install lua-gd

Building this code fails with many errors, but the root of all the errors appears to be: luagd.c: At top level: luagd.c:2146:14: error: unknown type name ‘luaL_reg’ static const luaL_reg LgdFunctions[] =

This identifier was (apparently) changed to luaL_Reg at lua v5.0. (capitalisation luaL_reg->luaL_Reg) But the real issue is even more subtle. The lua-gd package configured on luarocks.org references the project https://github.com/zs-soft/lua-gd But the original project appears to be https://github.com/ittner/lua-gd/ This is also referenced by https://www.ittner.com.br/lua-gd/ The luaL_Reg issue is fixed at https://github.com/ittner/lua-gd/ . It appears that https://github.com/zs-soft/lua-gd is an "impostor" containing old code. I suggest it should be removed from luarocks, and https://github.com/ittner/lua-gd/ added in it's place - if it can be made to work.

Moving on from that, I attempted to build lua-gd using the code I downloaded from https://github.com/ittner/lua-gd/ . I'm working on Rocky Linux 8.6. Before building using luarocks, it is necessary to install the dependencies. This is most easily achieved by leveraging the native package management system as follows: dnf install gd-devel

Then download the repository to obtain the rockspec file: git clone https://github.com/ittner/lua-gd.git

Then use luarocks to make the package in accordance with the rockspec file:

luarocks make lua-gd/luagd-2.0.33r3-1.rockspec

luagd 2.0.33r3-1 depends on lua >= 5.1 (5.3-1 provided by VM)
Warning: variable CFLAGS was not passed in build_variables
make: *** No targets specified and no makefile found.  Stop.

Error: Build error: Failed building.

I'm not sure what's going on with the CFLAGS variable.

If I downgrade my request from 'make' to 'build, I get a different error:

luarocks build lua-gd/luagd-2.0.33r3-1.rockspec
Warning: falling back to wget - install luasec to get native HTTPS support

Error: Error fetching file: Failed downloading https://github.com/ittner/lua-gd/archive/lua-gd-2.0.33r3.tar.gz - failed downloading https://github.com/ittner/lua-gd/archive/lua-gd-2.0.33r3.tar.gz

It appears that there are no releases or archives available for lua-gd.

I'm not sure where to go from here to get lua-gd installed and working on my system (that's what I really wanted), but it seemed that I needed to raise the issue with https://github.com/zs-soft/lua-gd being an old superseded library that doesn't build and should not be in luarocks.

hishamhm commented 1 year ago

These are two different Lua libraries that unfortunately have the same name, which bind to to two different C libraries that unfortunately have the same name. None is an impostor.

https://github.com/zs-soft/lua-gd registered in luarocks.org first.

The one in https://github.com/ittner/lua-gd/ does have a rockspec called "luagd", but they never uploaded it to LuaRocks (and the rockspec is 10 years old). It does have commits from 2020, so the project may still be alive.

This repo concerns the server-site code for maintaining the luarocks.org website, and not the contents of the repository itself. You may want to contact the maintainers of the project you're interested in directly at https://github.com/ittner/lua-gd/ and ask them to upload an up-to-date version to luarocks.org, perhaps calling it "luagd" to avoid conflicts with the other existing "lua-gd" project.

Hope that helps!