Balaji,
 
If you want to use DSO, then you need to modify the directives
to NOT use "=static"... but instead use "=shared".
 
BTW, xlc is NOT a C++ compiler... xlC  (note capital c) is the C++
compiler interface.... I can't help you on using C++ in Apache...
...Apache's written in C and all of my modules are written in C.
 
If you are going to use a "threaded" model, then you must specify
the "threaded" interface to the C (or C++) compiler... which is
why the "_r" is appended to the compiler name (i.e. xlc_r  or for C++ xlC_r).
 
Lastly, here are a couple of links to this topic being discussed on this
list in the past:
http://marc.theaimsgroup.com/?l=apache-httpd-dev&m=110932301429869&w=2
http://marc.theaimsgroup.com/?l=apache-httpd-dev&m=110932347318524&w=2
http://marc.theaimsgroup.com/?l=apache-httpd-dev&m=110932503111874&w=2
http://marc.theaimsgroup.com/?l=apache-httpd-dev&m=110932582316449&w=2
http://marc.theaimsgroup.com/?l=apache-httpd-dev&m=110933082716866&w=2
 
HTH
-tony


From: Balaji [mailto:rbalaji@firstam.com]
Sent: Wednesday, May 04, 2005 4:29 PM
To: dev@httpd.apache.org
Subject: RE: apache httpd with C++ on AIX

Hi Tony,

            That’s exactly what I want to do. I don’t intend to use apxs. Even, I want to build my dso’s using make. What I basically wanted to understand is whether I can build and invoke c++ objects from my apache C module. I am trying to make this possible by compiling the whole apache server with a C++ compiler (xlc).

Can you please tell me whether running the configure script with the parameters you have suggested makes working with C++ possible? This info would really be helpful to us.

 

Regards,
Balaji

 

 


From: Bennett, Tony - CNF [mailto:Bennett.Tony@cnf.com]
Sent: Wednesday, May 04, 2005 4:17 PM
To: dev@httpd.apache.org
Subject: RE: apache httpd with C++ on AIX

 

Sorry, I can't help you with APXS...

...I've never used it.... I've always "built from scratch".

 

-tony

 


From: Balaji [mailto:rbalaji@firstam.com]
Sent: Wednesday, May 04, 2005 4:02 PM
To: dev@httpd.apache.org
Subject: RE: apache httpd with C++ on AIX

Hi Tony,

            Thanks for the info. I will try “configure” with these options. But which is the parameter here that will make a difference. I had exported CC earlier. You are suggesting to set CPPFLAGS. But how will this preprocessor directive make a difference? Sorry if I am asking too many questions but I am trying to understand.

 

Regards,

Balaji

 


From: Bennett, Tony - CNF [mailto:Bennett.Tony@cnf.com]
Sent: Wednesday, May 04, 2005 3:49 PM
To: dev@httpd.apache.org
Subject: RE: apache httpd with C++ on AIX

 

Here's how I configure Apache 2.0.52 for AIX, prior to issuing a 'make':

CC="xlc_r"; export CC
CPPFLAGS="-D_THREAD_SAFE"; export CPPFLAGS
"./configure" \
"--prefix=/usr/local/apache" \
"--with-mpm=worker" \
"--without-berkeley-db" \
"--enable-dav=static" \
"--enable-dav_fs=static" \
"--with-ssl=/usr/local/ssl" \
"--enable-ssl=static" \
"--with-egd=/etc/entropy" \

HTH,

-tony

 

 


From: Balaji [mailto:rbalaji@firstam.com]
Sent: Wednesday, May 04, 2005 3:11 PM
To: dev@httpd.apache.org
Subject: apache httpd with C++ on AIX

Hi,

            I am trying to compile an apache httpd module using a makefile and not using apxs. But when I try to boot apache, it throws the following error

 

Syntax error on line 238 of /home/rbalaji/usr/local/apache2/conf/httpd.conf:

Cannot load /home/rbalaji/usr/local/apache2/modules/mod_dyso.so into server: \t0

509-026 System error: Cannot run a file that does not have a valid format.

 

Looks like apxs binds in some flags and generates some register functions into the files before compiling. I am really not sure what it does.

            But originally, if I have a class keyword in my source files, apxs doesnot compile it at all. I am using xlc compiler on AIX and I have configured apache to use this compiler before the configure stage itself. Can anybody tell me what the missing link is? Is it impossible to work with C++ on apache. (sounds illogical though)

Your help will really really be significant to solve one of our problems.

 

Regards,
Balaji