LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-02-2010, 05:11 PM   #1
PolishHurricane
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Rep: Reputation: 0
[SOLVED] Compiling mod_auth_mysql Apache module on ArchLinux


Hello,

I've never compiled/built/installed any Apache module before, and I just can't seem to get it working on ArchLinux.

I got the source code from here: http://sourceforge.net/projects/modauth
Then I tried doing this...

Code:
apxs -c -L/usr/lib/mysql -I/usr/include/mysql -lmysqlclient -lm -lz mod_auth_mysql.c
And I get this...
Quote:
/usr/share/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -march=x86-64 -mtune=generic -O2 -pipe -DLINU X=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr-1 -I/usr/include/apr-1 -I/usr/incl ude -I/usr/include/mysql -c -o mod_auth_mysql.lo mod_auth_mysql.c && touch mod_auth_mysql.slo mod_auth_mysql.c:591:2: error: expected expression before âmysql_auth_config_recâ mod_auth_mysql.c:595:2: error: expected expression before âmysql_auth_config_recâ mod_auth_mysql.c:599:2: error: expected expression before âmysql_auth_config_recâ mod_auth_mysql.c:603:2: error: expected expression before âmysql_auth_config_recâ mod_auth_mysql.c:607:2: error: expected expression before âmysql_auth_config_recâ mod_auth_mysql.c:611:2: error: expected expression before âmysql_auth_config_recâ mod_auth_mysql.c:615:2: error: expected expression before âmysql_auth_config_recâ mod_auth_mysql.c:619:2: error: expected expression before âmysql_auth_config_recâ mod_auth_mysql.c:623:2: error: expected expression before âmysql_auth_config_recâ mod_auth_mysql.c:627:2: error: expected expression before âmysql_auth_config_recâ mod_auth_mysql.c:631:2: error: expected expression before âmysql_auth_config_recâ mod_auth_mysql.c:635:2: error: expected expression before âmysql_auth_config_recâ mod_auth_mysql.c:639:2: error: expected expression before âmysql_auth_config_recâ mod_auth_mysql.c:643:2: error: expected expression before âmysql_auth_config_recâ mod_auth_mysql.c:651:2: error: expected expression before âmysql_auth_config_recâ mod_auth_mysql.c:655:2: error: expected expression before âmysql_auth_config_recâ mod_auth_mysql.c:659:2: error: expected expression before âmysql_auth_config_recâ mod_auth_mysql.c:663:2: error: expected expression before âmysql_auth_config_recâ mod_auth_mysql.c:667:2: error: expected expression before âmysql_auth_config_recâ mod_auth_mysql.c:671:2: error: expected expression before âmysql_auth_config_recâ mod_auth_mysql.c: In function âformat_requestâ: mod_auth_mysql.c:947:51: warning: pointer/integer type mismatch in conditional expression apxs:Error: Command failed with rc=65536
Ideally, I would eventually like to modify the mod_auth_mysql.c source code so I can append a salt/padding to the end of the hashes (that mod_auth_mysql reads from the database), but I will be happy if I can just install the damn thing.

I've googled like crazy, and I cannot find a solution. If anybody can figure this out, much appreciated, I wish I installed another OS and I haven't been able to figure this out for weeks.

Last edited by PolishHurricane; 11-03-2010 at 06:50 PM. Reason: Problem Solved
 
Old 11-03-2010, 01:39 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 and welcome to LQ,

You didn't say what is your apache version and the module version you're trying to install.
For apache-2.2.x and mod_auth_mysql-3.0.0 you'll need this patch to compile the module.

Regards
 
Old 11-03-2010, 06:50 PM   #3
PolishHurricane
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Yes it was the newest version.

That did it, thanks a ton dude. You wouldn't believe how many things I tried. I even tried a patch prior to that one, but it was the wrong one apprently.

Thanks again. Maybe I can help some other people here in the future...
 
Old 02-06-2011, 09:30 AM   #4
fahrvergnugen
LQ Newbie
 
Registered: Feb 2011
Location: Calgary, Ab
Distribution: Ubuntu Server 10
Posts: 3

Rep: Reputation: 0
Question

Hi There,

I tried to patch the file by copying the patch (as patch.txt) and running patch -
Code:
$> patch -p0 < patch.txt
patching file mod_auth_mysql-3.0.0/mod_auth_mysql.c
Hunk #1 FAILED at 206.
Hunk #2 FAILED at 237.
Hunk #3 FAILED at 589.
3 out of 3 hunks FAILED -- saving rejects to file mod_auth_mysql-3.0.0/mod_auth_mysql.c.rej
Any chance you can tell me what I'm doing wrong? Sorry for the bother.

Edit: by the way, I am using ubuntu server 10, and apache 2. I tried to use apxs, but it wasn't found. apxs2 was if I installed apache2-threaded-dev, so I did and ran the command:

Code:
apxs2 -c -I /usr/include/mysql -l mysqlclient -l m -l z mod_auth_mysql.c

~Fahr

Last edited by fahrvergnugen; 02-06-2011 at 09:35 AM.
 
Old 02-06-2011, 11:19 AM   #5
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
@fahrvergnugen
I guess that mod_auth_mysql-3.0.0/mod_auth_mysql.c is not the original (maybe it's already patched somehow). You can download the original mod_auth_mysql-3.0.0 from here and run the same patch command to patch it.
And yes, ubuntu names apxs as apxs2.

Regards
 
Old 02-06-2011, 12:57 PM   #6
fahrvergnugen
LQ Newbie
 
Registered: Feb 2011
Location: Calgary, Ab
Distribution: Ubuntu Server 10
Posts: 3

Rep: Reputation: 0
Well, that worked. I think I figured out the problem. I noticed that the patch file was looking in mod_auth_mysql-3.0.0/mod_auth_mysql-3.0.0.c so I moved the patch mack one directory and tried again. it worked. I feel incredibly dumb.
Thanks for the help.

~Fahr
 
  


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
Compiling mod_auth_mysql Solaris 10 sparc ADxD_7 Solaris / OpenSolaris 6 08-31-2010 03:36 AM
Apache mod_auth_mysql problem johnewing Linux - Server 8 05-24-2007 02:19 PM
apache module mod_auth_mysql question SuSE_fan Linux - Software 0 06-01-2004 05:51 AM
Apache won't start, problem with libcppu and mod_auth_mysql.so Null537 Linux - Software 3 05-29-2004 09:32 AM
Unable to start apache because of mod_auth_mysql error krumholz Linux - General 3 07-17-2003 11:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:19 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