LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-22-2012, 12:29 AM   #1
said76
Member
 
Registered: Aug 2011
Posts: 113

Rep: Reputation: Disabled
Issue with building mod_security on apache2


Hi,

I am trying to install mod_security by compiling it from source but finding myself encountering with this error message after running "make test".

> /usr/local/src/modsecurity-apache_2.6.5/tests/../apache2/re_operators.c:407: undefined reference to `ap_regexec'
> /usr/local/src/modsecurity-apache_2.6.5/tests/../apache2/re_operators.c:421: undefined reference to `ap_regexec'
> /usr/local/src/modsecurity-apache_2.6.5/tests/../apache2/re_operators.c:375: undefined reference to `ap_pregcomp'
> msc_test-re_operators.o: In function `msre_op_rsub_param_init':
> /usr/local/src/modsecurity-apache_2.6.5/modsecurity/tests/../apache2/re_operators.c:315: undefined reference to `ap_pregcomp'

By the way, I did not receive any error messages when running ./configure.

I run httpd-2.2.22 on Ubuntu Server 12.04 LTS.

Thank you in advance
 
Old 05-22-2012, 02:18 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

According to the documentation:
Quote:
Optionally test with:

make CFLAGS=-DMSC_TEST test

Note
This is step is still a bit experimental. If you have problems, please send the full output and error from the build to the support list. Most common issues are related to not finding the required headers and/or libraries.
you should use:
Code:
make CFLAGS=-DMSC_TEST test
FYI it still gives an error in 574 tests.


So if "make" finished without errors don't bother too much. Go ahead and run "make install" as root to install the module

Regards
 
Old 05-22-2012, 06:47 PM   #3
said76
Member
 
Registered: Aug 2011
Posts: 113

Original Poster
Rep: Reputation: Disabled
Thanks for your reply.

Yes, I tried to run "make CFLAGS=-DMSC_TEST test" before and received the same kind of errors. I then tried just "make test" and this too produced errors.

All right, maybe I should go ahead running "make install". And thank you for the tip. Just for curiosity, would that tip apply to any packages that are installed from their sources?

Many thanks
 
Old 05-23-2012, 02:29 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Yes, I tried to run "make CFLAGS=-DMSC_TEST test" before and received the same kind of errors. I then tried just "make test" and this too produced errors.
You should first run:
Code:
make distclean
to clean sources and then re-run ./configure (adding any options needed by your system)
Then as the developer says, run "make" to compile sources and optionally test by running "make CFLAGS=-DMSC_TEST test". And of course "make install" to install the module.

Quote:
Just for curiosity, would that tip apply to any packages that are installed from their sources?
In general yes. If you read the INSTALL file that comes with most software sources, it says to run just ./configure, make, make install. Most of them do not even include a test suite in their Makefiles.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 Binding Issue Krayons Linux - Software 5 06-06-2011 09:50 AM
Apache2 Host Issue anon266 Linux - Networking 10 11-14-2007 04:53 AM
Apache2 Interface Issue subcon Linux - Enterprise 2 08-08-2007 11:41 AM
mod_security + apache2 slackamp Slackware 1 03-23-2007 03:49 PM
Apache2 Mod_Security apxs command kingtas Linux - Security 4 01-24-2005 07:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration