Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58332 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86123 invoked from network); 29 Feb 2012 09:52:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Feb 2012 09:52:44 -0000 Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.170 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.215.170 mail-ey0-f170.google.com Received: from [209.85.215.170] ([209.85.215.170:42540] helo=mail-ey0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9D/BE-36673-A65FD4F4 for ; Wed, 29 Feb 2012 04:52:43 -0500 Received: by eaal11 with SMTP id l11so2618381eaa.29 for ; Wed, 29 Feb 2012 01:52:40 -0800 (PST) Received-SPF: pass (google.com: domain of julienpauli@gmail.com designates 10.14.99.2 as permitted sender) client-ip=10.14.99.2; Authentication-Results: mr.google.com; spf=pass (google.com: domain of julienpauli@gmail.com designates 10.14.99.2 as permitted sender) smtp.mail=julienpauli@gmail.com; dkim=pass header.i=julienpauli@gmail.com Received: from mr.google.com ([10.14.99.2]) by 10.14.99.2 with SMTP id w2mr13567735eef.69.1330509160442 (num_hops = 1); Wed, 29 Feb 2012 01:52:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=UVR63wy5Non8xk1+aIFpxbOIg2X4MWsWda84khFqQLE=; b=Ri7NQI90+mvu0wczFRMgqorscUBjilIQsqxgWh/skGCXFGkbuydTGRVp9TQTIhLQ08 UiJVlmXw/RMTSkw1LRZZ5EwNAP4jRch1I1tIfkGrmdupHe7DoZN6XgtLHcbtK3cA8CYK 1NcJRYZKxzorm00Zyt4rNxmp7xgVKNffsPeu0= Received: by 10.14.99.2 with SMTP id w2mr10315778eef.69.1330509160280; Wed, 29 Feb 2012 01:52:40 -0800 (PST) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.213.29.2 with HTTP; Wed, 29 Feb 2012 01:52:00 -0800 (PST) In-Reply-To: <1330508863.61296.YahooMailNeo@web29501.mail.ird.yahoo.com> References: <1330464316.3034.YahooMailNeo@web29505.mail.ird.yahoo.com> <4F4D4E79.1080602@lerdorf.com> <1330501833.99416.YahooMailNeo@web29504.mail.ird.yahoo.com> <1330502673.12982.YahooMailNeo@web29506.mail.ird.yahoo.com> <1330508863.61296.YahooMailNeo@web29501.mail.ird.yahoo.com> Date: Wed, 29 Feb 2012 10:52:00 +0100 X-Google-Sender-Auth: dYzJxmZbbov2CIY1Myz1Pv9kGVU Message-ID: To: Christian Ferrari Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=bcaec52be493de726204ba174d54 Subject: Re: [PHP-DEV] Newbie: issues developing a new extension From: jpauli@php.net (jpauli) --bcaec52be493de726204ba174d54 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Feb 29, 2012 at 10:47 AM, Christian Ferrari wrote: > >>>>> > Dear all, > > > > >>> > >>>>> > I'm asking your help because I'm not able to > > solve an > >> issue > >>>> probably > >>>>> related to some foolish mistake I have not yet discovered. > >>>>> > I'm trying to develop an experimental extension to > >> interface LIXA > >>>>> library (http:/lixa.sourceforge.net/). > >>>>> > > >>>>> > I have created the basic stuff (config.m4, lixa.c, > > php_lixa.h > >> and so > >>>> on). > >>>>> > > >>>>> > If I use this sequence from the ext/lixa directory: > >>>>> > > >>>>> > /opt/php/bin/phpize > >>>>> > ./configure --help > >>>>> > > >>>>> > I can see the lixa extension is available: > >>>>> > > >>>>> > [...] > >>>>> > Optional Packages: > >>>>> > --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] > >>>>> > --without-PACKAGE do not use PACKAGE (same as > >>>> --with-PACKAGE=no) > >>>>> > --with-libdir=NAME Look for libraries in .../NAME > > > >> rather than > >>>>> .../lib > >>>>> > --with-php-config=PATH Path to php-config php-config > >>>>> > --with-lixa=FILE Include LIXA support. File is > > the > >> path to > >>>>> lixa-config > >>>>> > > >>>>> > [...] > >>>>> > > >>>>> > and I can compile with: > >>>>> > > >>>>> > ./configure --with-lixa=/opt/lixa/bin/lixa-config > >>>>> --with-php-config=/opt/php/bin/php-config > >>>>> > > >>>>> > the build process runs as expected and the extension is > >> available > >>>> after > >>>>> an addition to php.ini > > (extension=[...]/ext/lixa/modules/lixa.so). > >>>>> > >>>>> Great, you are done. Why do you want to go any further than > > this? > >> You > >>>>> built your extension and it is available from PHP exactly > > like any > >> pecl > >>>>> extension. > >>>>> > >>>> > >>>> and if you're using apache, reboot it and check your phpinfo() > > page > >> for > >>>> your extension. > >>>> if you're connected up via the command line you can run > > "php > >> -m" > >>>> to see if > >>>> your modules exists. > >>>> > >>>> > >>>>> > >>>>> -Rasmus > >>>>> > >>> > >>> Dear all, > >>> I would like to see my extension as any other extension, like MySQL, > >> PostgreSQL, Oracle and so on because: > >>> 1. LIXA itself is useless without those resource managers > >>> 2. I need to patch other extensions to implement the interfaces > > between > >> LIXA and MySQL/PostgreSQL/Oracle. > >>> What's the difference between an "internal" extension > > (like > >>> MySQL/PostgreSQL/Oracle) and an "external" extension as the > > one I > >>> produced? > >>> Thanks in advance, your help is precious. > >> > >> > >> The PHP source archive bundles several extensions under the ext/ > >> directory, these are the extensions are listed when you run > >> ./configure --help > >> > >> I don't understand why you want your extension to show up there, but > >> to do so you have to place your extension in that folder and run > >> ./buildconf --force > >> PHP will not automatically scan your filesystem for possible extension > >> directories to list them under ./configure > >> I'm sure you have seen, and used, http://pecl.php.net - these > >> extensions don't show up when you build PHP. > >> > >> The standard way to build "external" extensions however is to use > >> pecl, or manually build them as shared modules (as you did first). > >> > >> > >> -Hannes > >> > > > > That's the point: I tryed > > ./buildconf --help > > Sorry, this is a typo, the right one is: > ./buildconf --force > > > but it didn't include my extension. > > > > This is an excerpt from my initial post: > > > >> If I use this sequence from the PHP root directory: > > > >> ./buildconf --force > >> as described here: > > talks.somabo.de/200510_zend_conf_php_extension_development.pdf > > > >> I cannot see "lixa" as an available option of my configure: > > > >> ./configure --help|grep lixa > >> is empty. > > > >> If I try to build PHP anyway, I obtain: > > > >> tiian@mojan:~/src/swig/php5.4-201202241630$ ./configure > > --with-lixa=/opt/lixa/bin/lixa-config > >> configure: WARNING: unrecognized options: --with-lixa > > > > Do you have any idea how to debug why "buildconf --force" does not > > pick-up my extension? > You should rm -f configure manually before invoking buildconf --force. It wont overwrite configure by itself. Julien.P > > Thanks in advance > Ch.F. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --bcaec52be493de726204ba174d54--