Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build fails using luarocks on centos 6 #27

Open
babakyakhchali opened this issue Dec 11, 2016 · 9 comments
Open

build fails using luarocks on centos 6 #27

babakyakhchali opened this issue Dec 11, 2016 · 9 comments

Comments

@babakyakhchali
Copy link

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

@shmuz
Copy link
Collaborator

shmuz commented Dec 11, 2016

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

@babakyakhchali
Copy link
Author

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

@shmuz
Copy link
Collaborator

shmuz commented Dec 11, 2016

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.

@GumpSun
Copy link

GumpSun commented Jan 30, 2019

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
Copy link

GumpSun commented Jan 30, 2019

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'?

@shmuz
Copy link
Collaborator

shmuz commented Jan 30, 2019

what's the module 'std.tree'?

I guess it's here.

@GumpSun
Copy link

GumpSun commented Jan 30, 2019

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

@shmuz
Copy link
Collaborator

shmuz commented Jan 30, 2019

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.

@GumpSun
Copy link

GumpSun commented Jan 31, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants