LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 04-02-2006, 09:26 AM   #1
ganz_friedrich
Member
 
Registered: Dec 2005
Posts: 47

Rep: Reputation: 16
Compiling the mod_ssl DSO for Apache2


I want to compile and install mod_ssl for Apache2 preferably without re-installing/configuring/compiling Apache itself.

Following the instructions at

http://httpd.apache.org/docs/2.0/programs/apxs.html

I ran the following command in [apache's src dir]/modules/ssl/

/usr/local/apache2/bin/apxs -c mod_ssl.c

and got these errors

Code:
/usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer-pic  -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -g -O2 -pthread -I/usr/local/apache2/include  -I/usr/local/apache2/include   -I/usr/local/apache2/include   -c -o mod_ssl.lo mod_ssl.c && touch mod_ssl.slo
In file included from mod_ssl.c:27:
mod_ssl.h:92:17: ssl.h: No such file or directory
mod_ssl.h:94:18: x509.h: No such file or directory
mod_ssl.h:95:17: pem.h: No such file or directory
mod_ssl.h:96:20: crypto.h: No such file or directory
mod_ssl.h:97:17: evp.h: No such file or directory
mod_ssl.h:98:18: rand.h: No such file or directory
In file included from mod_ssl.h:110,
                 from mod_ssl.c:27:
ssl_toolkit_compat.h:222:2: #error "Unrecognized SSL Toolkit!"
In file included from mod_ssl.h:112,
                 from mod_ssl.c:27:
ssl_util_ssl.h:58: error: syntax error before '*' token
ssl_util_ssl.h:59: error: syntax error before '*' token
ssl_util_ssl.h:60: error: syntax error before '*' token
ssl_util_ssl.h:60: error: syntax error before "X509"
ssl_util_ssl.h:60: warning: data definition has no type or storage class
ssl_util_ssl.h:61: error: syntax error before '*' token
ssl_util_ssl.h:61: error: syntax error before "EVP_PKEY"
ssl_util_ssl.h:61: warning: data definition has no type or storage class
ssl_util_ssl.h:62: error: syntax error before '*' token
ssl_util_ssl.h:63: error: syntax error before '*' token
ssl_util_ssl.h:63: warning: data definition has no type or storage class
ssl_util_ssl.h:64: error: syntax error before '*' token
ssl_util_ssl.h:65: error: syntax error before "SSL"
ssl_util_ssl.h:66: error: syntax error before '*' token
ssl_util_ssl.h:67: error: syntax error before '*' token
ssl_util_ssl.h:68: error: syntax error before "X509"
ssl_util_ssl.h:69: error: syntax error before "STACK_OF"
ssl_util_ssl.h:70: error: syntax error before "STACK_OF"
ssl_util_ssl.h:71: error: syntax error before '*' token
ssl_util_ssl.h:75: error: syntax error before '*' token
ssl_util_ssl.h:77: error: syntax error before '*' token
ssl_util_ssl.h:78: warning: data definition has no type or storage class
In file included from mod_ssl.c:27:
mod_ssl.h:382: error: syntax error before "SSL"
mod_ssl.h:382: warning: no semicolon at end of struct or union
mod_ssl.h:384: error: syntax error before '*' token
mod_ssl.h:384: warning: data definition has no type or storage class
mod_ssl.h:392: error: syntax error before '}' token
mod_ssl.h:392: warning: data definition has no type or storage class
mod_ssl.h:429: error: syntax error before "X509"
mod_ssl.h:429: warning: no semicolon at end of struct or union
mod_ssl.h:430: warning: data definition has no type or storage class
mod_ssl.h:431: error: syntax error before '}' token
mod_ssl.h:431: warning: data definition has no type or storage class
mod_ssl.h:437: error: syntax error before "STACK_OF"
mod_ssl.h:437: warning: no semicolon at end of struct or union
mod_ssl.h:438: warning: data definition has no type or storage class
mod_ssl.h:457: error: syntax error before "SSL_CTX"
mod_ssl.h:457: warning: no semicolon at end of struct or union
mod_ssl.h:460: warning: data definition has no type or storage class
mod_ssl.h:461: error: syntax error before '*' token
mod_ssl.h:461: warning: data definition has no type or storage class
mod_ssl.h:474: error: syntax error before '*' token
mod_ssl.h:474: warning: data definition has no type or storage class
mod_ssl.h:477: error: syntax error before '}' token
mod_ssl.h:477: warning: data definition has no type or storage class
mod_ssl.h:486: error: syntax error before "modssl_ctx_t"
mod_ssl.h:486: warning: no semicolon at end of struct or union
mod_ssl.h:487: warning: data definition has no type or storage class
mod_ssl.h:488: error: syntax error before '}' token
mod_ssl.h:568: error: syntax error before '*' token
mod_ssl.h:568: warning: data definition has no type or storage class
mod_ssl.h:581: error: syntax error before '*' token
mod_ssl.h:581: error: syntax error before '*' token
mod_ssl.h:581: warning: data definition has no type or storage class
mod_ssl.h:582: error: syntax error before '*' token
mod_ssl.h:582: error: syntax error before '*' token
mod_ssl.h:582: warning: data definition has no type or storage class
mod_ssl.h:583: error: syntax error before "X509_STORE_CTX"
mod_ssl.h:584: error: syntax error before "X509_STORE_CTX"
mod_ssl.h:585: error: syntax error before '*' token
mod_ssl.h:586: error: syntax error before '*' token
mod_ssl.h:587: error: syntax error before '*' token
mod_ssl.h:587: error: syntax error before '*' token
mod_ssl.h:587: warning: data definition has no type or storage class
mod_ssl.h:588: error: syntax error before '*' token
mod_ssl.h:589: error: syntax error before "int"
mod_ssl.h:597: error: syntax error before "SSL_SESSION"
mod_ssl.h:598: error: syntax error before '*' token
mod_ssl.h:598: warning: data definition has no type or storage class
mod_ssl.h:605: error: syntax error before "SSL_SESSION"
mod_ssl.h:606: error: syntax error before '*' token
mod_ssl.h:606: warning: data definition has no type or storage class
mod_ssl.h:613: error: syntax error before "SSL_SESSION"
mod_ssl.h:614: error: syntax error before '*' token
mod_ssl.h:614: warning: data definition has no type or storage class
mod_ssl.h:621: error: syntax error before "SSL_SESSION"
mod_ssl.h:622: error: syntax error before '*' token
mod_ssl.h:622: warning: data definition has no type or storage class
mod_ssl.h:631: error: syntax error before '*' token
mod_ssl.h:631: warning: data definition has no type or storage class
mod_ssl.h:632: error: syntax error before '*' token
mod_ssl.h:632: warning: data definition has no type or storage class
mod_ssl.h:682: error: syntax error before "SSL"
mod_ssl.h:684: error: syntax error before '*' token
mod_ssl.h:700: error: syntax error before '*' token
mod_ssl.c:220: error: syntax error before '*' token
mod_ssl.c: In function `ssl_init_connection_ctx':
mod_ssl.c:222: error: `sslconn' undeclared (first use in this function)
mod_ssl.c:222: error: (Each undeclared identifier is reported only once
mod_ssl.c:222: error: for each function it appears in.)
mod_ssl.c:222: error: syntax error before ')' token
mod_ssl.c: In function `ssl_proxy_enable':
mod_ssl.c:239: error: `sslconn' undeclared (first use in this function)
mod_ssl.c:241: error: dereferencing pointer to incomplete type
mod_ssl.c:244: error: dereferencing pointer to incomplete type
mod_ssl.c: In function `ssl_engine_disable':
mod_ssl.c:259: error: `sslconn' undeclared (first use in this function)
mod_ssl.c:261: error: dereferencing pointer to incomplete type
mod_ssl.c: In function `ssl_hook_pre_connection':
mod_ssl.c:275: error: `SSL' undeclared (first use in this function)
mod_ssl.c:275: error: `ssl' undeclared (first use in this function)
mod_ssl.c:276: error: `sslconn' undeclared (first use in this function)
mod_ssl.c:276: error: syntax error before ')' token
mod_ssl.c:278: error: `mctx' undeclared (first use in this function)
mod_ssl.c:283: error: dereferencing pointer to incomplete type
mod_ssl.c:307: error: dereferencing pointer to incomplete type
mod_ssl.c:315: error: dereferencing pointer to incomplete type
mod_ssl.c:315: error: dereferencing pointer to incomplete type
mod_ssl.c:333: error: dereferencing pointer to incomplete type
mod_ssl.c:334: error: dereferencing pointer to incomplete type
mod_ssl.c:359: error: `X509_V_OK' undeclared (first use in this function)
mod_ssl.c: In function `ssl_hook_http_method':
mod_ssl.c:370: error: dereferencing pointer to incomplete type
mod_ssl.c: In function `ssl_hook_default_port':
mod_ssl.c:381: error: dereferencing pointer to incomplete type
apxs:Error: Command failed with rc=65536
What have I done wrong? Maybe something is missing? I appear to have openssl installed: running "whatis openssl" returns a result.

(The apache version is 2.0.55)

I managed to get mod_rewrite working in this way some time ago, but I can't exactly remember how.

Thanks
 
Old 04-02-2006, 11:09 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,962

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
You have to add the openssl include directory to your command so apxs can find the header files it's looking for. So, I guess you can try something like that:
Code:
/usr/local/apache2/bin/apxs -c -I/path/to/openssl/include-dir mod_ssl.c
 
Old 04-02-2006, 03:55 PM   #3
ganz_friedrich
Member
 
Registered: Dec 2005
Posts: 47

Original Poster
Rep: Reputation: 16
Much appreciated, but I read somewhere that for apache 1.3.x you needed to first install it at compile-time and then you could upgrade dynamically - i figured it was probably going to be the same for apache2 so I got fed up and just recompiled it.

But I do apprecaite your answer for other modules and for the next time.

(I think the reason you needed to install at complile time for 1.3 is because it modifies the core source to support it).

All the best
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 and mod_ssl as a DSO Rumblefish Linux - Software 1 12-01-2004 04:25 PM
Compiling PHP WITHOUT dso (--with-apxs) jimieee Linux - Software 0 04-29-2004 07:28 AM
Apache2 with mod_ssl ridertech Linux - Networking 3 04-07-2004 11:08 PM
Apache2 mod_ssl signing with sign.sh MatthewJWatkins Linux - Software 1 10-26-2003 09:41 PM
where can I find mod_ssl for apache2 VoodooLiu Linux - Networking 4 09-07-2003 02:14 PM


All times are GMT -5. The time now is 10:52 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration