httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Farokh Irani <>
Subject Re: APXS troubles
Date Sat, 21 Jul 2007 03:39:35 GMT
>On Fri, 2007-07-20 at 14:39 +0200, Mike wrote:
>>  On 7/20/07, Farokh Irani <> wrote:
>>  > So, somewhere there is still something going on with .c vs .cpp. I'll
>>  > poke at apxs a bit and see if I can figure out why, but a crash
>>  > course in perl wasn't what I was looking at doing right now :)
>>  So you mean a change from *.cpp to *.c is the only real working
>>  solution? That's strange but anyway it works now...
>Well - from what I can observe this seems to be a bug in libtool itself
>(why did I expect this, given libtools poor C++ support?).
>The final link command emitted by apxs seems to be (my reindentation):
>/usr/share/apr-1.0/build/libtool --silent --mode=link \  
>     --tag=disable-static g++ -o  \
>     -rpath /usr/lib/apache2/modules -module -avoid-version \
>      config.cpp mod_fancy.cpp
>Note that apxs is passing source file names to libtool. This doesn't
>seem to work. Passing the '.libs/mod_fancy.o .libs/config.o' seems a
>quick fix. I wonder if it's worth the effort.
>NOTE: I've sucessfully compiled C++ modules, but 'I somehow always give
>my sorce files '*.c' extentions.

I took a further look at apxs, and it appears that the bad coding for 
the source files continues. In my apxs around line 406, you'll find 
the following:

    foreach $s (@srcs) {
         my $slo = $s;
         $slo =~ s|\.c$|.slo|;
         my $lo = $s;
         $lo =~ s|\.c$|.lo|;
         my $la = $s;
         $la =~ s|\.c$|.la|;
         my $o = $s;
         $o =~ s|\.c$|.o|;

When I replaced the .c in the above with .cpp, everything worked fine 
using .cpp. Now, I'm not sure if the perl from the first fix:

if ( $f =~ m/\.c(c|pp){0,1}$/i ) instead of
if ($f =~ m|\.c$|)

can somehow be used in the above, but I'm sure that someone with perl 
experience should be able to point out how to fix it.

MCF Software...simply dependably engineered
Developers of ListSTAR, MacRADIUS, Address List Sorter, SimpleText Filter for EIMS and Auto Reply plug-in for EIMS

View raw message