You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Makefile:16: modules] Error 2, error: 'pcre_malloc' undeclared (first use in this function); did you mean 'old_pcre_malloc'? ...on Raspberry Pi 4 8GB:
#263
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.
I am trying to build modesecurity v3 against nginx-1.21.5 ARM for Raspberry Pi 4 8GB on Ubuntu Server 20.04, for raspberry pi 4 64-bit arm.
The steps I have taken thus far (Which have worked on nginx-1.21.4 ARM For Raspberry PI 4 8GB on Ubuntu Server 20.04) have been derived from this tutorial and are printed below. PLEASE NOTE: STEP 22 (make modules) is where the error happens.
Install the apt repository for the Nginx Mainline version in my sources.list.d directory.
Danrancan@Ubuntu_Server_20.04_on_RaspberryPi4_8GB:/usr/local/src/nginx/nginx-1.21.5$ make modules
make -f objs/Makefile modules
make[1]: Entering directory '/usr/local/src/nginx/nginx-1.21.5'
cc -c -fPIC -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/local/modsecurity/include -I objs -I src/http -I src/http/modules \
-o objs/addon/src/ngx_http_modsecurity_module.o \
/usr/local/src/ModSecurity-nginx/src/ngx_http_modsecurity_module.c
/usr/local/src/ModSecurity-nginx/src/ngx_http_modsecurity_module.c: In function 'ngx_http_modsecurity_pcre_malloc_init':
/usr/local/src/ModSecurity-nginx/src/ngx_http_modsecurity_module.c:78:9: error: 'pcre_malloc' undeclared (first use in this function); did you mean 'old_pcre_malloc'?
78 | if (pcre_malloc != ngx_http_modsec_pcre_malloc) {
| ^~~~~~~~~~~
| old_pcre_malloc
/usr/local/src/ModSecurity-nginx/src/ngx_http_modsecurity_module.c:78:9: note: each undeclared identifier is reported only once for each function it appears in
/usr/local/src/ModSecurity-nginx/src/ngx_http_modsecurity_module.c:82:25: error: 'pcre_free' undeclared (first use in this function); did you mean 'pkey_free'?
82 | old_pcre_free = pcre_free;
| ^~~~~~~~~
| pkey_free
/usr/local/src/ModSecurity-nginx/src/ngx_http_modsecurity_module.c: In function 'ngx_http_modsecurity_pcre_malloc_done':
/usr/local/src/ModSecurity-nginx/src/ngx_http_modsecurity_module.c:102:9: error: 'pcre_malloc' undeclared (first use in this function); did you mean 'old_pcre_malloc'?
102 | pcre_malloc = old_pcre_malloc;
| ^~~~~~~~~~~
| old_pcre_malloc
/usr/local/src/ModSecurity-nginx/src/ngx_http_modsecurity_module.c:103:9: error: 'pcre_free' undeclared (first use in this function); did you mean 'pkey_free'?
103 | pcre_free = old_pcre_free;
| ^~~~~~~~~
| pkey_free
make[1]: *** [objs/Makefile:1232: objs/addon/src/ngx_http_modsecurity_module.o] Error 1
make[1]: Leaving directory '/usr/local/src/nginx/nginx-1.21.5'
make: *** [Makefile:16: modules] Error 2
As you can see from above, I get stuck here with Error 2. Is there a solution or workaround for this? I would like to compile this module for nginx v1.21.5 Mainline on Raspberry Pi 4, as soon as possible. Please let me know if there is anything else I can do to help, or when a fix has been made. Thanks Developers!
The text was updated successfully, but these errors were encountered:
I am trying to build modesecurity v3 against nginx-1.21.5 ARM for Raspberry Pi 4 8GB on Ubuntu Server 20.04, for raspberry pi 4 64-bit arm.
The steps I have taken thus far (Which have worked on nginx-1.21.4 ARM For Raspberry PI 4 8GB on Ubuntu Server 20.04) have been derived from this tutorial and are printed below. PLEASE NOTE: STEP 22 (make modules) is where the error happens.
sudo apt update
sudo chown username:username /usr/local/src/ -R
mkdir -p /usr/local/src/nginx
cd /usr/local/src/nginx/
sudo apt install dpkg-dev
apt source nginx
git clone --depth 1 -b v3/master --single-branch https://github.com/SpiderLabs/ModSecurity /usr/local/src/ModSecurity/
cd /usr/local/src/ModSecurity/
sudo apt install gcc make build-essential autoconf automake libtool libcurl4-openssl-dev liblua5.3-dev libfuzzy-dev ssdeep gettext pkg-config libpcre3 libpcre3-dev libxml2 libxml2-dev libcurl4 libgeoip-dev libyajl-dev doxygen
git submodule init
git submodule update
./build.sh
./configure
make -j4
sudo make install
Download and Compile ModSecurity v3 Nginx Connector Source Code
git clone --depth 1 https://github.com/SpiderLabs/ModSecurity-nginx.git /usr/local/src/ModSecurity-nginx/
cd /usr/local/src/nginx/nginx-1.21.5
sudo apt build-dep nginx
sudo apt install uuid-dev
./configure --with-compat --add-dynamic-module=/usr/local/src/ModSecurity-nginx
make modules
As you can see from above, I get stuck here with Error 2. Is there a solution or workaround for this? I would like to compile this module for nginx v1.21.5 Mainline on Raspberry Pi 4, as soon as possible. Please let me know if there is anything else I can do to help, or when a fix has been made. Thanks Developers!
The text was updated successfully, but these errors were encountered: