Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 70783 invoked from network); 29 Aug 2008 06:25:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Aug 2008 06:25:41 -0000 Received: (qmail 11483 invoked by uid 500); 29 Aug 2008 06:25:35 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 11424 invoked by uid 500); 29 Aug 2008 06:25:35 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 11413 invoked by uid 99); 29 Aug 2008 06:25:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Aug 2008 23:25:35 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Steven.Mohr@dlr.de designates 195.37.61.187 as permitted sender) Received: from [195.37.61.187] (HELO smtp-2.dlr.de) (195.37.61.187) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Aug 2008 06:24:32 +0000 Received: from exbe05.intra.dlr.de ([192.168.35.38]) by smtp-2.dlr.de with Microsoft SMTPSVC(6.0.3790.1830); Fri, 29 Aug 2008 08:25:01 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: AW: FWD: Testing modules using Python Date: Fri, 29 Aug 2008 08:24:57 +0200 Message-ID: <3CAFA8502A25A841B2F6D22237BFC01A01F5CDAE@exbe05.intra.dlr.de> In-Reply-To: <677AA6A1803A1A49B9B21E9E048E8C7A037BCF1614@exbe05.intra.dlr.de> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: FWD: Testing modules using Python Thread-Index: Acj4ccTCEoU44KadRf+FYNBdc9N7ZgPt8XcAAF1f0hA= References: <3CAFA8502A25A841B2F6D22237BFC01A01E86CFB@exbe05.intra.dlr.de> <20080807094045.GC8801@suse.de> <677AA6A1803A1A49B9B21E9E048E8C7A037BCF1614@exbe05.intra.dlr.de> From: To: X-OriginalArrivalTime: 29 Aug 2008 06:25:01.0438 (UTC) FILETIME=[F78C31E0:01C9099F] X-Virus-Checked: Checked by ClamAV on apache.org Hi Peter, I've fixed my problem. Your advice was really helpful, the only thing I = had to change was to replace server/exports.o with server/protocol.o = modules.o buildmark.o server/provider.o server/util_xml.o = server/error_bucket.o and everything works fine.=20 Thanks again for your help Steven ------------------------------------------------ Steven Mohr Bachelor student =20 DLR (German Aerospace Center),=20 Simulation and Software Technology Linder Hoehe, 51147 Cologne, Germany voice: +49 2203 601 2956 fax: +49 2203 601 3070 eMail: steven.mohr at dlr.de http://www.dlr.de/sc -----Urspr=FCngliche Nachricht----- Von: Steven.Mohr@dlr.de [mailto:Steven.Mohr@dlr.de]=20 Gesendet: Mittwoch, 27. August 2008 20:51 An: dev@httpd.apache.org Betreff: AW: FWD: Testing modules using Python Hi Peter, I've followed your instruction. The shared object which is created has a = size of 5 kB. Is this right? It seems to be very small. There are still = undefined symbols of functions like ap_filter_flush, ap_is_url or = ap_count_dirs. I will edit server/exports.c file because many of the = undefined symbols are defined in this file (and as the first lines say, = exports.c is an ugly hack which exports every function =3D> undefined = symbols) Do you know an options or other files which would improve the shared = object? Thanks for your advices Steven ------------------------------------------------ Steven Mohr Bachelor student =20 DLR (German Aerospace Center),=20 Simulation and Software Technology Linder Hoehe, 51147 Cologne, Germany voice: +49 2203 601 2053 eMail: steven.mohr at dlr.de http://www.dlr.de/sc -----Urspr=FCngliche Nachricht----- Von: Peter Poeml [mailto:poeml@suse.de]=20 Gesendet: Donnerstag, 7. August 2008 11:41 An: dev@httpd.apache.org Betreff: Re: FWD: Testing modules using Python Hi Steven, On Tue, Aug 05, 2008 at 10:21:01 +0200, Steven.Mohr@dlr.de wrote: > Hi, > on modules-dev@httpd.apache.org Peter gave me the advice to build = apache with the SHARED_CORE rule. Apache 2.x does not have this rule = anymore. Is there something comparable in Apache 2.x? > Sorry for cross-posting but I think you are the guys who could help = me. >=20 > Steven The build infrastructure doesn't seem to know this anymore -=20 but does it work if you do the following? make clean CFLAGS=3D'-D SHARED_CORE -fPIC' ./configure make and then take the line which links together the httpd binary (the one with libtool ... -mode=3Dlink gcc ... -o httpd ... which is probably the last line) and rerun it manually with a slight change: libtool ... -mode=3Dlink gcc ... -shared -o libhttpd.so ... = server/exports.o This should build the shared object anyway. But it is possible that it doesn't provide what you need. YMMV. > ------------------------------------------------ > Steven Mohr > Bachelor student >=20 > DLR (German Aerospace Center),=20 > Simulation and Software Technology > Linder Hoehe, 51147 Cologne, Germany > voice: +49 2203 601 2956 fax: +49 2203 601 3070 > eMail: steven.mohr at dlr.de http://www.dlr.de/sc >=20 >=20 >=20 > -----Urspr=FCngliche Nachricht----- > Von: Peter Poeml [mailto:poeml@suse.de]=20 > Gesendet: Montag, 4. August 2008 16:37 > An: modules-dev@httpd.apache.org > Betreff: Re: Testing modules using Python >=20 > On Mon, Aug 04, 2008 at 04:27:58PM +0200, Steven.Mohr@dlr.de wrote: > > Hi, > > I want to unit test my module (catacomb.tigris.org) using Python. My > > idea is to load the module with ctypes (a python module that allows = to > > load functions from shared libraries into python) and test it in = this > > environment. The main advantage is that it's much easier to create > > mock-up objects in Python than in C. My problem is that ctypes fails = if > > the shared library contains any undefined symbols. Because the = module is > > used normally together with a httpd server, > > there're a lot of undefined symbols. My solution is to link libapr, > > libaprutil, libexpat and libmysql statically in my module and to add = a > > file with the definitions of the apache-internal functions (just = copy > > and paste from httpd source). With every function which I copy in = this > > file I get a few new undefined symbols. All in all it's a pain to = search > > all definitions and I probably have to do this again after adding = new > > features which uses other functionalities.=20 > >=20 > > Is there an easier way to do this? To build a module which includes = all > > needed links to apache functions without linking the needed = libraries > > statically and copy-and-paste functions from apache source? Or do = you > > know a better way to do this? > >=20 > > Steven=20 >=20 > With httpd 1.3, there used to be a way to build something what was > called "shared core", a shared object that contained the server in a > form you could link it into an application. >=20 > I don't know if this is still possible with httpd 2.x, but what used I > in an RPM package at the time was=20 >=20 > --enable-rule=3DSHARED_CORE > =20 > mkdir shared_core > cp -p src/libhttpd.ep src/libhttpd.so src/httpd > shared_core >=20 >=20 > # install shared-core apache > install -m 755 shared_core/libhttpd.ep = $RPM_BUILD_ROOT/%{_libdir}/%{name} > install -m 755 shared_core/libhttpd.so = $RPM_BUILD_ROOT/%{_libdir}/%{name} > ln -s %{_libdir}/%{name}/libhttpd.ep = $RPM_BUILD_ROOT/%{_sbindir}/httpd-shared_core > ln -s %{_libdir}/%{name}/libhttpd.so = $RPM_BUILD_ROOT/%{_libdir}/libhttpd.so >=20 >=20 > At the time, that was reportedly working to build DSOs with Kylix 3. >=20 > Peter > --=20 > Contact: admin@opensuse.org (a.k.a. ftpadmin@suse.com) > #opensuse-mirrors on freenode.net > Info: http://en.opensuse.org/Mirror_Infrastructure > =20 > SUSE LINUX Products GmbH > Research & Development Peter --=20 "WARNING: This bug is visible to non-employees. Please be respectful!" =20 SUSE LINUX Products GmbH Research & Development