luarocks install lpack

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

luarocks install lpack

Hey guys

I am a novice on elua.
At the first stage, I am trying to compile elua.
But I have one problem when I trying to install related lua library using luarocks.
Actually, I am using luarocks based on lua 5.2.3 version.

Following is the my log when I try to install lpack.

-----------------------------------------------------------------------------------------------------------

weyoui@sparq ~/PROJECTS/eLua/elua $ sudo luarocks install lpack
Installing https://luarocks.org/lpack-20070629-1.src.rock...
Using https://luarocks.org/lpack-20070629-1.src.rock... switching to 'build' mode
Do not use 'module' as a build type. Use 'builtin' instead.
gcc -O2 -fPIC -I/usr/include/lua5.2 -c lpack.c -o lpack.o
lpack.c:254:1: error: unknown type name ‘luaL_reg’
 static const luaL_reg R[] =
 ^
lpack.c:256:2: warning: braces around scalar initializer [enabled by default]
  {"pack", l_pack},
  ^
lpack.c:256:2: warning: (near initialization for ‘R[0]’) [enabled by default]
lpack.c:256:2: warning: initialization makes integer from pointer without a cast [enabled by default]
lpack.c:256:2: warning: (near initialization for ‘R[0]’) [enabled by default]
lpack.c:256:2: error: initializer element is not computable at load time
lpack.c:256:2: error: (near initialization for ‘R[0]’)
lpack.c:256:2: warning: excess elements in scalar initializer [enabled by default]
lpack.c:256:2: warning: (near initialization for ‘R[0]’) [enabled by default]
lpack.c:257:2: warning: braces around scalar initializer [enabled by default]
  {"unpack", l_unpack},
  ^
lpack.c:257:2: warning: (near initialization for ‘R[1]’) [enabled by default]
lpack.c:257:2: warning: initialization makes integer from pointer without a cast [enabled by default]
lpack.c:257:2: warning: (near initialization for ‘R[1]’) [enabled by default]
lpack.c:257:2: error: initializer element is not computable at load time
lpack.c:257:2: error: (near initialization for ‘R[1]’)
lpack.c:257:2: warning: excess elements in scalar initializer [enabled by default]
lpack.c:257:2: warning: (near initialization for ‘R[1]’) [enabled by default]
lpack.c:258:2: warning: braces around scalar initializer [enabled by default]
  {NULL, NULL}
  ^
lpack.c:258:2: warning: (near initialization for ‘R[2]’) [enabled by default]
lpack.c:258:2: warning: initialization makes integer from pointer without a cast [enabled by default]
lpack.c:258:2: warning: (near initialization for ‘R[2]’) [enabled by default]
lpack.c:258:2: warning: excess elements in scalar initializer [enabled by default]
lpack.c:258:2: warning: (near initialization for ‘R[2]’) [enabled by default]

Error: Build error: Failed compiling object lpack.o

--------------------------------------------------------------------------------------------------

Did you use the luarocks for lua5.1 version ?
Is there any method to install lpack library using luarocks (lua5.2) version?

Thanks,
weyoui
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Re: luarocks install lpack

Hi,

That looks like an error with lpack or luarocks, so probably the best thing to do is post this question on the Lua mailing list. Personally, I never tried to use lpack with Lua 5.2, so I don't know how to help you.

Best,
Bogdan