lrexlib icon indicating copy to clipboard operation
lrexlib copied to clipboard

build fails using luarocks on centos 6

Open babakyakhchali opened this issue 8 years ago • 9 comments

Hi I'm trying to install this lib but.... [root@yazdpbx reLua]# luarocks install lrexlib-PCRE Installing https://luarocks.org/lrexlib-pcre-2.8.0-1.src.rock gcc -O2 -fPIC -I/usr/include -c src/common.c -o src/common.o -DVERSION="2.8.0" -DLUA_COMPAT_5_2 -I/usr/include gcc -O2 -fPIC -I/usr/include -c src/pcre/lpcre.c -o src/pcre/lpcre.o -DVERSION="2.8.0" -DLUA_COMPAT_5_2 -I/usr/include src/pcre/lpcre.c: In function ‘Lpcre_fullinfo’: src/pcre/lpcre.c:372: error: ‘PCRE_INFO_JIT’ undeclared (first use in this function) src/pcre/lpcre.c:372: error: (Each undeclared identifier is reported only once src/pcre/lpcre.c:372: error: for each function it appears in.) src/pcre/lpcre.c:373: error: ‘PCRE_INFO_JITSIZE’ undeclared (first use in this function) src/pcre/lpcre.c:380: error: ‘PCRE_INFO_MAXLOOKBEHIND’ undeclared (first use in this function) src/pcre/lpcre.c:381: error: ‘PCRE_INFO_MINLENGTH’ undeclared (first use in this function)

Error: Build error: Failed compiling object src/pcre/lpcre.o

babakyakhchali avatar Dec 11 '16 12:12 babakyakhchali

The rock you tried to compile is not up-to-date. These errors are fixed in the repository for quite some time.

shmuz avatar Dec 11 '16 12:12 shmuz

thanks So you mean that I should not use luarocks to install? should I compile from source?

babakyakhchali avatar Dec 11 '16 13:12 babakyakhchali

I have little experience with Luarocks. I think if you can replace lpcre.c and lpcre_f.c in the rock with the current ones it should compile OK.

shmuz avatar Dec 11 '16 13:12 shmuz

Thanks for you good lib,but when I compiled it from source then got this error. make install rm -f *.rockspec lua mkrockspecs.lua lrexlib 2.9.0 lua: mkrockspecs.lua:3: module 'std.tree' not found: no field package.preload['std.tree'] no file './std/tree.lua' no file '/usr/local/share/lua/5.1/std/tree.lua' no file '/usr/local/share/lua/5.1/std/tree/init.lua' no file '/usr/local/lib/lua/5.1/std/tree.lua' no file '/usr/local/lib/lua/5.1/std/tree/init.lua' no file './std/tree.so' no file '/usr/local/lib/lua/5.1/std/tree.so' no file '/usr/local/lib/lua/5.1/loadall.so' no file './std.so' no file '/usr/local/lib/lua/5.1/std.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'require' mkrockspecs.lua:3: in main chunk [C]: ? make: *** [rockspecs] Error 1

GumpSun avatar Jan 30 '19 07:01 GumpSun

Thanks for you good lib,but when I compiled it from source then got this error. make install rm -f *.rockspec lua mkrockspecs.lua lrexlib 2.9.0 lua: mkrockspecs.lua:3: module 'std.tree' not found: no field package.preload['std.tree'] no file './std/tree.lua' no file '/usr/local/share/lua/5.1/std/tree.lua' no file '/usr/local/share/lua/5.1/std/tree/init.lua' no file '/usr/local/lib/lua/5.1/std/tree.lua' no file '/usr/local/lib/lua/5.1/std/tree/init.lua' no file './std/tree.so' no file '/usr/local/lib/lua/5.1/std/tree.so' no file '/usr/local/lib/lua/5.1/loadall.so' no file './std.so' no file '/usr/local/lib/lua/5.1/std.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'require' mkrockspecs.lua:3: in main chunk [C]: ? make: *** [rockspecs] Error 1

what's the module 'std.tree'?

GumpSun avatar Jan 30 '19 07:01 GumpSun

what's the module 'std.tree'?

I guess it's here.

shmuz avatar Jan 30 '19 07:01 shmuz

what's the module 'std.tree'?

I guess it's here.

Thank you and I got another question pcre-config --version 8.39 My pcre version is 8.39, but nginx used rex_pcre

/openresty/bin/nginx -c /conf/nginx.conf nginx: [error] init_by_lua_file error: rex_pcre requires at least version 8 of PCRE library

thank you

GumpSun avatar Jan 30 '19 09:01 GumpSun

Probably there are multiple PCRE libraries installed on your machine and nginx picks up one with version < 8, Lrexlib issues that error when it detects that the major version of run-time PCRE library is less than the one specified in pcre.h used during Lrexlib compilation.

shmuz avatar Jan 30 '19 09:01 shmuz

Probably there are multiple PCRE libraries installed on your machine and nginx picks up one with version < 8, Lrexlib issues that error when it detects that the major version of run-time PCRE library is less than the one specified in pcre.h used during Lrexlib compilation.

It's helpful, I recompiled nginx with pcre version8. I can use rex_pcre.so.

GumpSun avatar Jan 31 '19 03:01 GumpSun