You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Simon Laws <si...@googlemail.com> on 2007/01/18 19:56:45 UTC

[C++] help setting up autoconf for PHP extension

I realize I haven't posted on progress with the PHP extension for a while.
Having a few problems with it at the moment. I've been working on windows
and have most of the changes made to enable references. However a couple of
days ago I ran into a script dependent memory error in the embeded PHP
engine. It's a little tricky to trace this because we have the following
path to the running script

Axis2C -> CPP SCA -> PHP -> Script.

I.e. there is a lot of C/C++ to go wrong and most of it we didn't write.
Needless to say the script is fine outside of PHP. I've tried attacking the
problem in various ways but am a little stumped on windows, e.g. I can't get
purify to run the exe all the way to the point that it crashes.

I'm now moving the whole environment over to linux to see if I get the same
error and so that I can try some of the Linux based tools, e.g. valgrind. I
need a little help with the autoconf setup for CPP SCA. Specifically where
do I tell autoconf about the PHP engine include path that it needs to build
the PHP extension?

Thanks

Simon

Re: [C++] help setting up autoconf for PHP extension

Posted by Pete Robbins <ro...@googlemail.com>.
On 19/01/07, Simon Laws <si...@googlemail.com> wrote:

> On 1/18/07, Jean-Sebastien Delfino <js...@apache.org> wrote:
> >
> > Simon Laws wrote:
> > > I realize I haven't posted on progress with the PHP extension for a
> > > while.
> > > Having a few problems with it at the moment. I've been working on
> > windows
> > > and have most of the changes made to enable references. However a
> > > couple of
> > > days ago I ran into a script dependent memory error in the embeded PHP
> > > engine. It's a little tricky to trace this because we have the
> following
> > > path to the running script
> > >
> > > Axis2C -> CPP SCA -> PHP -> Script.
> > >
> > > I.e. there is a lot of C/C++ to go wrong and most of it we didn't
> write.
> > > Needless to say the script is fine outside of PHP. I've tried
> > > attacking the
> > > problem in various ways but am a little stumped on windows, e.g. I
> > > can't get
> > > purify to run the exe all the way to the point that it crashes.
> > >
> > > I'm now moving the whole environment over to linux to see if I get the
> > > same
> > > error and so that I can try some of the Linux based tools, e.g.
> > > valgrind. I
> > > need a little help with the autoconf setup for CPP SCA. Specifically
> > > where
> > > do I tell autoconf about the PHP engine include path that it needs to
> > > build
> > > the PHP extension?
> > >
> > > Thanks
> > >
> > > Simon
> > >
> >
> > Simon,
> >
> > You need to configure two environment variables PHP_INCLUDE and PHP_LIB.
> > Here's what I have on my machine:
> > PHP_INCLUDE=$HOME/Tuscany/php5/php-5.2.0-bin/include/php
> > export PHP_INCLUDE
> > PHP_LIB=$HOME/Tuscany/php5/php-5.2.0-bin/lib
> > export PHP_LIB
> >
> > Then run autogen.sh, then configure --prefix=$TUSCANY_SCACPP
> > --with-axis2c --enable-all-extensions as usual.
> >
> > --
> > Jean-Sebastien
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
> >
> Thanks Jean-Sebastien, I'll give it a spin.
>
> Simon
>
>
If you cd to the cpp/sca directory you can run ./build.sh
This will build the various extensions depending on which xxx_INCLUDE etc
environment variables are set. Take a look at it to see which ones are
expected.

Cheers,



-- 
Pete

Re: [C++] help setting up autoconf for PHP extension

Posted by Simon Laws <si...@googlemail.com>.
On 1/18/07, Jean-Sebastien Delfino <js...@apache.org> wrote:
>
> Simon Laws wrote:
> > I realize I haven't posted on progress with the PHP extension for a
> > while.
> > Having a few problems with it at the moment. I've been working on
> windows
> > and have most of the changes made to enable references. However a
> > couple of
> > days ago I ran into a script dependent memory error in the embeded PHP
> > engine. It's a little tricky to trace this because we have the following
> > path to the running script
> >
> > Axis2C -> CPP SCA -> PHP -> Script.
> >
> > I.e. there is a lot of C/C++ to go wrong and most of it we didn't write.
> > Needless to say the script is fine outside of PHP. I've tried
> > attacking the
> > problem in various ways but am a little stumped on windows, e.g. I
> > can't get
> > purify to run the exe all the way to the point that it crashes.
> >
> > I'm now moving the whole environment over to linux to see if I get the
> > same
> > error and so that I can try some of the Linux based tools, e.g.
> > valgrind. I
> > need a little help with the autoconf setup for CPP SCA. Specifically
> > where
> > do I tell autoconf about the PHP engine include path that it needs to
> > build
> > the PHP extension?
> >
> > Thanks
> >
> > Simon
> >
>
> Simon,
>
> You need to configure two environment variables PHP_INCLUDE and PHP_LIB.
> Here's what I have on my machine:
> PHP_INCLUDE=$HOME/Tuscany/php5/php-5.2.0-bin/include/php
> export PHP_INCLUDE
> PHP_LIB=$HOME/Tuscany/php5/php-5.2.0-bin/lib
> export PHP_LIB
>
> Then run autogen.sh, then configure --prefix=$TUSCANY_SCACPP
> --with-axis2c --enable-all-extensions as usual.
>
> --
> Jean-Sebastien
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>
Thanks Jean-Sebastien, I'll give it a spin.

Simon

Re: [C++] help setting up autoconf for PHP extension

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Simon Laws wrote:
> I realize I haven't posted on progress with the PHP extension for a 
> while.
> Having a few problems with it at the moment. I've been working on windows
> and have most of the changes made to enable references. However a 
> couple of
> days ago I ran into a script dependent memory error in the embeded PHP
> engine. It's a little tricky to trace this because we have the following
> path to the running script
>
> Axis2C -> CPP SCA -> PHP -> Script.
>
> I.e. there is a lot of C/C++ to go wrong and most of it we didn't write.
> Needless to say the script is fine outside of PHP. I've tried 
> attacking the
> problem in various ways but am a little stumped on windows, e.g. I 
> can't get
> purify to run the exe all the way to the point that it crashes.
>
> I'm now moving the whole environment over to linux to see if I get the 
> same
> error and so that I can try some of the Linux based tools, e.g. 
> valgrind. I
> need a little help with the autoconf setup for CPP SCA. Specifically 
> where
> do I tell autoconf about the PHP engine include path that it needs to 
> build
> the PHP extension?
>
> Thanks
>
> Simon
>

Simon,

You need to configure two environment variables PHP_INCLUDE and PHP_LIB. 
Here's what I have on my machine:
PHP_INCLUDE=$HOME/Tuscany/php5/php-5.2.0-bin/include/php
export PHP_INCLUDE
PHP_LIB=$HOME/Tuscany/php5/php-5.2.0-bin/lib
export PHP_LIB

Then run autogen.sh, then configure --prefix=$TUSCANY_SCACPP 
--with-axis2c --enable-all-extensions as usual.

-- 
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org