[GH-ISSUE #72] Error when install modsec and libmaxmind #187

Closed
opened 2026-03-13 16:49:00 +03:00 by kerem · 2 comments
Owner

Originally created by @NgHuuAn on GitHub (Nov 15, 2021).
Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/72

We got this error when compile running this command:

cd /usr/local/src && wget https://github.com/maxmind/libmaxminddb/releases/download/1.6.0/libmaxminddb-1.6.0.tar.gz -O libmaxminddb.tar.gz && mkdir libmaxminddb && tar -zxf "libmaxminddb.tar.gz" -C libmaxminddb --strip-components=1 && cd libmaxminddb && ./configure --prefix=/usr/local/libmaxminddb && make -j $(nproc) && make install && cd /usr/local/src && git clone -b v3.0.5 https://github.com/SpiderLabs/ModSecurity.git && cd ModSecurity && chmod +x build.sh && ./build.sh && git submodule init && git submodule update && ./configure --prefix=/usr/local/modsecurity --with-maxmind=/usr/local/libmaxminddb \ && make -j $(nproc) \ && make install && export LIB_MODSECURITY=/usr/local/modsecurity && cd /usr/local/src/nginx

Error:

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

git checkout -b new_branch_name

libtoolize: putting auxiliary files in .'. libtoolize: copying file ./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, build'. libtoolize: copying file build/libtool.m4'
libtoolize: copying file build/ltoptions.m4' libtoolize: copying file build/ltsugar.m4'
libtoolize: copying file build/ltversion.m4' libtoolize: copying file build/lt~obsolete.m4'
This Perl not built to support threads
Compilation failed in require at /usr/share/automake-1.13/Automake/ChannelDefs.pm line 23.
BEGIN failed--compilation aborted at /usr/share/automake-1.13/Automake/ChannelDefs.pm line 26.
Compilation failed in require at /usr/share/automake-1.13/Automake/Configure_ac.pm line 27.
BEGIN failed--compilation aborted at /usr/share/automake-1.13/Automake/Configure_ac.pm line 27.
Compilation failed in require at /usr/bin/aclocal line 39.
BEGIN failed--compilation aborted at /usr/bin/aclocal line 39.
autoreconf: aclocal failed with exit status: 255
This Perl not built to support threads
Compilation failed in require at /usr/bin/automake line 138.
BEGIN failed--compilation aborted at /usr/bin/automake line 143.
configure.ac:45: error: possibly undefined macro: AM_INIT_AUTOMAKE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:50: error: possibly undefined macro: AM_PROG_AR
configure.ac:86: error: possibly undefined macro: AM_CONDITIONAL
configure.ac:361: error: possibly undefined macro: AC_CONFIG_FILES
configure.ac:371: error: possibly undefined macro: AM_COND_IF
Submodule 'bindings/python' (https://github.com/SpiderLabs/ModSecurity-Python-bindings.git) registered for path 'bindings/python'
Submodule 'others/libinjection' (https://github.com/libinjection/libinjection.git) registered for path 'others/libinjection'
Submodule 'test/test-cases/secrules-language-tests' (https://github.com/SpiderLabs/secrules-language-tests) registered for path 'test/test-cases/secrules-language-tests'
Cloning into 'bindings/python'...
remote: Enumerating objects: 41, done.
remote: Total 41 (delta 0), reused 0 (delta 0), pack-reused 41
Unpacking objects: 100% (41/41), done.
Submodule path 'bindings/python': checked out 'bc625d5bb0bac6a64bcce8dc9902208612399348'
Cloning into 'others/libinjection'...
remote: Enumerating objects: 10002, done.
remote: Counting objects: 100% (10002/10002), done.
remote: Compressing objects: 100% (2959/2959), done.
remote: Total 10002 (delta 7040), reused 9971 (delta 7013), pack-reused 0
Receiving objects: 100% (10002/10002), 3.82 MiB | 2.44 MiB/s, done.
Resolving deltas: 100% (7040/7040), done.
Submodule path 'others/libinjection': checked out 'bfba51f5af8f1f6cf5d6c4bf862f1e2474e018e3'
Cloning into 'test/test-cases/secrules-language-tests'...
remote: Enumerating objects: 267, done.
remote: Counting objects: 100% (19/19), done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 267 (delta 4), reused 19 (delta 4), pack-reused 248
Receiving objects: 100% (267/267), 103.92 KiB | 0 bytes/s, done.
Resolving deltas: 100% (142/142), done.
Submodule path 'test/test-cases/secrules-language-tests': checked out 'a3d4405e5a2c90488c387e589c5534974575e35b'
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type:
configure: WARNING: unrecognized options: --with-maxmind
./configure: line 2128: syntax error near unexpected token -Wall' ./configure: line 2128: AM_INIT_AUTOMAKE(-Wall -Werror foreign subdir-objects)'

Originally created by @NgHuuAn on GitHub (Nov 15, 2021). Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/72 We got this error when compile running this command: `cd /usr/local/src && wget https://github.com/maxmind/libmaxminddb/releases/download/1.6.0/libmaxminddb-1.6.0.tar.gz -O libmaxminddb.tar.gz && mkdir libmaxminddb && tar -zxf "libmaxminddb.tar.gz" -C libmaxminddb --strip-components=1 && cd libmaxminddb && ./configure --prefix=/usr/local/libmaxminddb && make -j $(nproc) && make install && cd /usr/local/src && git clone -b v3.0.5 https://github.com/SpiderLabs/ModSecurity.git && cd ModSecurity && chmod +x build.sh && ./build.sh && git submodule init && git submodule update && ./configure --prefix=/usr/local/modsecurity --with-maxmind=/usr/local/libmaxminddb \ && make -j $(nproc) \ && make install && export LIB_MODSECURITY=/usr/local/modsecurity && cd /usr/local/src/nginx ` Error: You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b new_branch_name libtoolize: putting auxiliary files in `.'. libtoolize: copying file `./ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `build'. libtoolize: copying file `build/libtool.m4' libtoolize: copying file `build/ltoptions.m4' libtoolize: copying file `build/ltsugar.m4' libtoolize: copying file `build/ltversion.m4' libtoolize: copying file `build/lt~obsolete.m4' This Perl not built to support threads Compilation failed in require at /usr/share/automake-1.13/Automake/ChannelDefs.pm line 23. BEGIN failed--compilation aborted at /usr/share/automake-1.13/Automake/ChannelDefs.pm line 26. Compilation failed in require at /usr/share/automake-1.13/Automake/Configure_ac.pm line 27. BEGIN failed--compilation aborted at /usr/share/automake-1.13/Automake/Configure_ac.pm line 27. Compilation failed in require at /usr/bin/aclocal line 39. BEGIN failed--compilation aborted at /usr/bin/aclocal line 39. autoreconf: aclocal failed with exit status: 255 This Perl not built to support threads Compilation failed in require at /usr/bin/automake line 138. BEGIN failed--compilation aborted at /usr/bin/automake line 143. configure.ac:45: error: possibly undefined macro: AM_INIT_AUTOMAKE If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. configure.ac:50: error: possibly undefined macro: AM_PROG_AR configure.ac:86: error: possibly undefined macro: AM_CONDITIONAL configure.ac:361: error: possibly undefined macro: AC_CONFIG_FILES configure.ac:371: error: possibly undefined macro: AM_COND_IF Submodule 'bindings/python' (https://github.com/SpiderLabs/ModSecurity-Python-bindings.git) registered for path 'bindings/python' Submodule 'others/libinjection' (https://github.com/libinjection/libinjection.git) registered for path 'others/libinjection' Submodule 'test/test-cases/secrules-language-tests' (https://github.com/SpiderLabs/secrules-language-tests) registered for path 'test/test-cases/secrules-language-tests' Cloning into 'bindings/python'... remote: Enumerating objects: 41, done. remote: Total 41 (delta 0), reused 0 (delta 0), pack-reused 41 Unpacking objects: 100% (41/41), done. Submodule path 'bindings/python': checked out 'bc625d5bb0bac6a64bcce8dc9902208612399348' Cloning into 'others/libinjection'... remote: Enumerating objects: 10002, done. remote: Counting objects: 100% (10002/10002), done. remote: Compressing objects: 100% (2959/2959), done. remote: Total 10002 (delta 7040), reused 9971 (delta 7013), pack-reused 0 Receiving objects: 100% (10002/10002), 3.82 MiB | 2.44 MiB/s, done. Resolving deltas: 100% (7040/7040), done. Submodule path 'others/libinjection': checked out 'bfba51f5af8f1f6cf5d6c4bf862f1e2474e018e3' Cloning into 'test/test-cases/secrules-language-tests'... remote: Enumerating objects: 267, done. remote: Counting objects: 100% (19/19), done. remote: Compressing objects: 100% (15/15), done. remote: Total 267 (delta 4), reused 19 (delta 4), pack-reused 248 Receiving objects: 100% (267/267), 103.92 KiB | 0 bytes/s, done. Resolving deltas: 100% (142/142), done. Submodule path 'test/test-cases/secrules-language-tests': checked out 'a3d4405e5a2c90488c387e589c5534974575e35b' configure: WARNING: you should use --build, --host, --target configure: WARNING: invalid host type: configure: WARNING: unrecognized options: --with-maxmind ./configure: line 2128: syntax error near unexpected token `-Wall' ./configure: line 2128: `AM_INIT_AUTOMAKE(-Wall -Werror foreign subdir-objects)'
kerem 2026-03-13 16:49:00 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@ADD-SP commented on GitHub (Nov 16, 2021):

https://stackoverflow.com/questions/8811381/possibly-undefined-macro-ac-msg-error

https://unix.stackexchange.com/questions/18673/some-m4-macros-dont-seem-to-be-defined

Haven't encountered this error, maybe you can look at these two questions.

<!-- gh-comment-id:969778309 --> @ADD-SP commented on GitHub (Nov 16, 2021): https://stackoverflow.com/questions/8811381/possibly-undefined-macro-ac-msg-error https://unix.stackexchange.com/questions/18673/some-m4-macros-dont-seem-to-be-defined Haven't encountered this error, maybe you can look at these two questions.
Author
Owner

@NgHuuAn commented on GitHub (Nov 16, 2021):

It seems there is a problem with the installed version of some software when integrating ngx_waf into nginx_quic, I will check this again.

image

image

Thanks for your help !

<!-- gh-comment-id:969898726 --> @NgHuuAn commented on GitHub (Nov 16, 2021): It seems there is a problem with the installed version of some software when integrating ngx_waf into nginx_quic, I will check this again. ![image](https://user-images.githubusercontent.com/31845795/141930514-b8a75f20-4741-442d-b77f-e58158f61efa.png) ![image](https://user-images.githubusercontent.com/31845795/141930725-f5124e27-6e0d-4a25-b063-035b600ca9f3.png) Thanks for your help !
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ngx_waf#187
No description provided.