Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 24877 invoked from network); 21 Jul 2007 03:40:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Jul 2007 03:40:09 -0000 Received: (qmail 30902 invoked by uid 500); 21 Jul 2007 03:40:09 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 30885 invoked by uid 500); 21 Jul 2007 03:40:09 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 30872 invoked by uid 99); 21 Jul 2007 03:40:09 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jul 2007 20:40:09 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [165.254.4.17] (HELO mcf.com) (165.254.4.17) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jul 2007 20:40:06 -0700 Received: from [165.254.4.10] (165.254.4.10) by mcf.com with ESMTP (EIMS X 3.3.2) for ; Fri, 20 Jul 2007 23:40:41 -0400 Mime-Version: 1.0 Message-Id: In-Reply-To: <1184936443.6241.14.camel@localhost.localdomain> References: <1184861546.6234.6.camel@localhost.localdomain> <1004c13e0707192336w2c4e16a4n2770f1b78d4843e6@mail.gmail.com> <1184925078.6259.3.camel@localhost.localdomain> <20070720113837.GB6234@azazel.net> <1004c13e0707200539n705bee58r4df2a01d0eace9c6@mail.gmail.com> <1184936443.6241.14.camel@localhost.localdomain> Date: Fri, 20 Jul 2007 23:39:35 -0400 To: modules-dev@httpd.apache.org From: Farokh Irani Subject: Re: APXS troubles Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Virus-Checked: Checked by ClamAV on apache.org >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 mod_fancy.la \ > -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. -- Farokh ---------------------------------------------------------------------------- MCF Software...simply dependably engineered Developers of ListSTAR http://www.liststar.com/, MacRADIUS http://www.macradius.com/, Address List Sorter http://www.mcfsoftware.com/als/, SimpleText Filter for EIMS http://www.mcfsoftware.com/stf/ and Auto Reply plug-in for EIMS http://www.mcfsoftware.com/ar/.