Installing lcomplex on Lua 5.3

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Installing lcomplex on Lua 5.3

Aditya Mahajan
Hi,

I am trying to install lcomplex on Lua 5.3 using

   $luarocks install lcomplex --local

which gives

Installing https://luarocks.org/lcomplex-20120430-1.src.rock

gcc -O2 -fPIC -I/usr/include -c lcomplex.c -o lcomplex.o
lcomplex.c: In function ‘luaopen_complex’:
lcomplex.c:155:2: warning: implicit declaration of function ‘luaL_register’;
did you mean ‘lua_register’? [-Wimplicit-function-declaration]
   luaL_register(L,MYNAME,R);
   ^~~~~~~~~~~~~
   lua_register
gcc -shared -o complex.so lcomplex.o
lcomplex 20120430-1 is now installed in /home/adityam/.luarocks (license:
MIT/X11)

The library gets installed but when I try to use it, I get the error (as
expected)

   $lua -lcomplex

which gives

lua: error loading module 'complex' from file
'/home/adityam/.luarocks/lib/lua/5.3/complex.so':
         /home/adityam/.luarocks/lib/lua/5.3/complex.so: undefined symbol:
luaL_register
stack traceback:
         [C]: in ?
         [C]: in function 'require'
         [C]: in ?


Any hints on how to fix this?

Thanks,
Aditya
Reply | Threaded
Open this post in threaded view
|

Re: Installing lcomplex on Lua 5.3

Luiz Henrique de Figueiredo
> I am trying to install lcomplex on Lua 5.3 using
>    $luarocks install lcomplex --local

Please get the latest source from
http://webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/index.html#lcomplex
.

Reply | Threaded
Open this post in threaded view
|

Re: Installing lcomplex on Lua 5.3

Aditya Mahajan
On Sat, 6 Apr 2019, Luiz Henrique de Figueiredo wrote:

>> I am trying to install lcomplex on Lua 5.3 using
>>    $luarocks install lcomplex --local
>
> Please get the latest source from
> http://webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/index.html#lcomplex

Thanks. That works flawlessly.

I am new to Lua. Will you be pushing the most recent version of the
library to luarocks, or is it recommended that the library be installed
"manually".

Thanks,
Aditya


Reply | Threaded
Open this post in threaded view
|

Re: Installing lcomplex on Lua 5.3

Luiz Henrique de Figueiredo
> I am new to Lua. Will you be pushing the most recent version of the
> library to luarocks, or is it recommended that the library be installed
> "manually".

I wish I knew how to write rockspecs for my libraries so that I could
upload them to LuaRocks. I've asked for help here but I could not
understand the replies. I've attached what I have done, but I'm not
sure it works.

lcomplex-100-1.rockspec (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Installing lcomplex on Lua 5.3

Thijs Schreijer


On 8 Apr 2019, at 12:44, Luiz Henrique de Figueiredo <[hidden email]> wrote:

I am new to Lua. Will you be pushing the most recent version of the
library to luarocks, or is it recommended that the library be installed
"manually".

I wish I knew how to write rockspecs for my libraries so that I could
upload them to LuaRocks. I've asked for help here but I could not
understand the replies. I've attached what I have done, but I'm not
sure it works.
<lcomplex-100-1.rockspec>

It’s simpler than that. Leave the make stuff out of there, and LuaRocks will figure out the platform specifics (since Windows users have most trouble with Make anyway). Most of your modules are on LuaRocks anyway, and you can find the existing rock specs there ( https://luarocks.org/modules/luarocks/lcomplex )

Attached the simplified version, aligned with the previous versions as they live on LuaRocks. I think Hisham used to upload those and used the file-dates as the version number.

@hisham: dunno who owns the account they live under, but can you add this one?

Thijs



lcomplex-20180728-1.rockspec (872 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Installing lcomplex on Lua 5.3

Eduardo Barthel
I also miss updated Figueiredo's lua libraries in luarocks repository. In my case I was needing `lbc`. So I have created updated rockspecs for `lcomplex` and `lbc` here:


For example latest `lcomplex` can be easily installed using the rockspecs above with the following command:


And `lbc` with:

Other ones I miss is `lqd` and `lmapn`, would be nice if someone with access to the `luarocks` user account in the luarocks website could update those libraries, or at least give update access to some trusted user willing to keep those libraries updated.


Em seg, 8 de abr de 2019 às 08:48, Thijs Schreijer <[hidden email]> escreveu:


On 8 Apr 2019, at 12:44, Luiz Henrique de Figueiredo <[hidden email]> wrote:

I am new to Lua. Will you be pushing the most recent version of the
library to luarocks, or is it recommended that the library be installed
"manually".

I wish I knew how to write rockspecs for my libraries so that I could
upload them to LuaRocks. I've asked for help here but I could not
understand the replies. I've attached what I have done, but I'm not
sure it works.
<lcomplex-100-1.rockspec>

It’s simpler than that. Leave the make stuff out of there, and LuaRocks will figure out the platform specifics (since Windows users have most trouble with Make anyway). Most of your modules are on LuaRocks anyway, and you can find the existing rock specs there ( https://luarocks.org/modules/luarocks/lcomplex )

Attached the simplified version, aligned with the previous versions as they live on LuaRocks. I think Hisham used to upload those and used the file-dates as the version number.

@hisham: dunno who owns the account they live under, but can you add this one?

Thijs


Reply | Threaded
Open this post in threaded view
|

Re: Installing lcomplex on Lua 5.3

Hisham
On Mon, 8 Apr 2019 at 10:38, Eduardo Barthel <[hidden email]> wrote:

> I also miss updated Figueiredo's lua libraries in luarocks repository. In my case I was needing `lbc`. So I have created updated rockspecs for `lcomplex` and `lbc` here:
>
> https://gist.github.com/edubart/91c9a02bef7c36a233e6ca923b2de7d3
> https://gist.github.com/edubart/85a329726a0668d988a4cca2fb04001a
>
> For example latest `lcomplex` can be easily installed using the rockspecs above with the following command:
>
> luarocks install https://gist.githubusercontent.com/edubart/91c9a02bef7c36a233e6ca923b2de7d3/raw/5c3892a6431fb294225e43ff2c432f2a2ab7a4f0/lcomplex-20180729-1.rockspec
>
> And `lbc` with:
> luarocks install https://gist.githubusercontent.com/edubart/85a329726a0668d988a4cca2fb04001a/raw/7a25c81d8b2c0d1f019fec7f83c8cf35cbb435fe/lbc-20180729-1.rockspec
>
> Other ones I miss is `lqd` and `lmapn`, would be nice if someone with access to the `luarocks` user account in the luarocks website could update those libraries, or at least give update access to some trusted user willing to keep those libraries updated.

The `luarocks` accounts holds entries that are orphaned since we moved
the repo to the current incarnation of luarocks.org many years ago. In
case you are volunteering for maintaining these rocks, I can grant you
those entries in the root manifest. Contact me offlist with your
account name. :)

-- Hisham

> Em seg, 8 de abr de 2019 às 08:48, Thijs Schreijer <[hidden email]> escreveu:
>>
>>
>>
>> On 8 Apr 2019, at 12:44, Luiz Henrique de Figueiredo <[hidden email]> wrote:
>>
>> I am new to Lua. Will you be pushing the most recent version of the
>> library to luarocks, or is it recommended that the library be installed
>> "manually".
>>
>>
>> I wish I knew how to write rockspecs for my libraries so that I could
>> upload them to LuaRocks. I've asked for help here but I could not
>> understand the replies. I've attached what I have done, but I'm not
>> sure it works.
>> <lcomplex-100-1.rockspec>
>>
>>
>> It’s simpler than that. Leave the make stuff out of there, and LuaRocks will figure out the platform specifics (since Windows users have most trouble with Make anyway). Most of your modules are on LuaRocks anyway, and you can find the existing rock specs there ( https://luarocks.org/modules/luarocks/lcomplex )
>>
>> Attached the simplified version, aligned with the previous versions as they live on LuaRocks. I think Hisham used to upload those and used the file-dates as the version number.
>>
>>
>> Thijs
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: Installing lcomplex on Lua 5.3

Eduardo Barthel
In reply to this post by Luiz Henrique de Figueiredo
I've adopted and updated the following outdated math packages from Figueiredo's website in luarocks:
lbc
lcomplex
lint64
lrandom
linterval

And added these new ones:
limath
lqmath



Em seg, 8 de abr de 2019 às 07:52, Luiz Henrique de Figueiredo <[hidden email]> escreveu:
> I am new to Lua. Will you be pushing the most recent version of the
> library to luarocks, or is it recommended that the library be installed
> "manually".

I wish I knew how to write rockspecs for my libraries so that I could
upload them to LuaRocks. I've asked for help here but I could not
understand the replies. I've attached what I have done, but I'm not
sure it works.
Reply | Threaded
Open this post in threaded view
|

Re: Installing lcomplex on Lua 5.3

Aditya Mahajan
On Tue, 9 Apr 2019, Eduardo Barthel wrote:

> I've adopted and updated the following outdated math packages from
> Figueiredo's website in luarocks:
> lbc
> lcomplex
> lint64
> lrandom
> linterval
>
> And added these new ones:
> limath
> lqmath

Thanks for this. I tried to install lcomplex using luarocks and there were
no issues.

Thanks,
Aditya