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

tengine-2.4.x or 3.0.0 build failed with pcre2 #1764

Closed
devhaozi opened this issue Apr 10, 2023 · 4 comments
Closed

tengine-2.4.x or 3.0.0 build failed with pcre2 #1764

devhaozi opened this issue Apr 10, 2023 · 4 comments
Assignees

Comments

@devhaozi
Copy link

devhaozi commented Apr 10, 2023

Ⅰ. Issue Description

I try to build tengine-3.0.0 brunch with pcre2-10.42, it return a error.

Ⅱ. Describe what happened

cd ../pcre2-10.42 \
&& make libpcre.la
make[2]: Entering directory '/root/pcre2-10.42'
make[2]: *** No rule to make target 'libpcre.la'.  Stop.
make[2]: Leaving directory '/root/pcre2-10.42'
make[1]: *** [objs/Makefile:1318: ../pcre2-10.42/.libs/libpcre.a] Error 2
make[1]: Leaving directory '/root/tengine'
make: *** [Makefile:10: build] Error 2

image

Ⅲ. Describe what you expected to happen

Build success without error.

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. Download pcre2-10.42 from https://github.com/PCRE2Project/pcre2/releases
  2. unzip it.
  3. git clone -b tengine-3.0.0 https://github.com/alibaba/tengine.git
  4. cd tengine
  5. ./configure --prefix=/usr/local/nginx --with-pcre=../pcre2-10.42
  6. make
  7. Wait until see the error.

Ⅴ. Anything else we need to know?

  1. none

Ⅵ. Environment:

  • Tengine version (use sbin/nginx -V): Tengine/2.4.0
  • OS (e.g. from /etc/os-release): Rocky Linux 8.6 (Green Obsidian)
  • Kernel (e.g. uname -a): Linux VM-0-4-rockylinux 4.18.0-372.9.1.el8.x86_64 fixed bugs of the limit_req module #1 SMP Tue May 10 14:48:47 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
  • Others: none
@ultraman-nuedu
Copy link

编译2.4.0版本,我有同样的问题。仅添加-with-pcre=DIR 这个参数的前提下进行编译,反复尝试了好多次总算成功了。

尝试调用系统自带pcre编译(该参默认设置),发现没有问题,猜想是不是编译相关的配置有些问题。
于是我下载了nginx1.24版本的源码包,用nginx1.24.0/auto/lib/pcre/conf替换tengine-2.4.0/auto/lib/pcre/conf(建议使用tengine 3.0.0对应版本的nginx源码包内的文件进行替换),再次尝试编译,总算成功了。

我判断可能是这个conf文件内部逻辑与我们实际的编译环境不匹配。


PS:I'm sorry ,My English is very poor, So the following text was translated by Bing Translation。

Compiling version 2.4.0, I have the same issue. Compile only under the premise of adding the -with-pcre=DIR parameter, and tried many times and finally succeeded.

Try to call the system's own PCRE compilation (the default setting of this parameter), find that there is no problem, guess if there is some problem with the compilation-related configuration.
So I downloaded the nginx version 1.24 source package, replaced tengine-2.4.0/auto/lib/pcre/conf with nginx1.24.0/auto/lib/pcre/conf (it is recommended to replace the files in the nginx source package corresponding to tengine 3.0.0), tried to compile again, and finally succeeded.

I judged it might be that the internal logic of this conf file doesn't match our actual compilation environment.

@chobits
Copy link
Member

chobits commented Jun 9, 2023

编译2.4.0版本,我有同样的问题。仅添加-with-pcre=DIR 这个参数的前提下进行编译,反复尝试了好多次总算成功了。

尝试调用系统自带pcre编译(该参默认设置),发现没有问题,猜想是不是编译相关的配置有些问题。 于是我下载了nginx1.24版本的源码包,用nginx1.24.0/auto/lib/pcre/conf替换tengine-2.4.0/auto/lib/pcre/conf(建议使用tengine 3.0.0对应版本的nginx源码包内的文件进行替换),再次尝试编译,总算成功了。

我判断可能是这个conf文件内部逻辑与我们实际的编译环境不匹配。

PS:I'm sorry ,My English is very poor, So the following text was translated by Bing Translation。

Compiling version 2.4.0, I have the same issue. Compile only under the premise of adding the -with-pcre=DIR parameter, and tried many times and finally succeeded.

Try to call the system's own PCRE compilation (the default setting of this parameter), find that there is no problem, guess if there is some problem with the compilation-related configuration. So I downloaded the nginx version 1.24 source package, replaced tengine-2.4.0/auto/lib/pcre/conf with nginx1.24.0/auto/lib/pcre/conf (it is recommended to replace the files in the nginx source package corresponding to tengine 3.0.0), tried to compile again, and finally succeeded.

I judged it might be that the internal logic of this conf file doesn't match our actual compilation environment.

TY, this is a compilation bug. We will release a version to fix

We have merged nginx-1.22.1 into tengine-2.4.0, but there were some files not included. Because, that we used diff -up auto/ did not check all recursively nested files within this directory, should use diff -upr auto/ instead.

@chobits chobits changed the title 3.0.0 build failed with pcre2 2.4.x or 3.0.0 build failed with pcre2 Jun 9, 2023
@chobits chobits changed the title 2.4.x or 3.0.0 build failed with pcre2 tengine-2.4.x or 3.0.0 build failed with pcre2 Jun 9, 2023
@chobits
Copy link
Member

chobits commented Jun 9, 2023

also note that ngx-lua included in tengine project cannot support PCRE2. For more details about PCRE2 and ngx-lua, see openresty/lua-nginx-module#1984

@chobits
Copy link
Member

chobits commented Jul 10, 2023

has been fixed in latest master branch, pls retry

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

4 participants