info | 7 Jun 2005 16:29

Compiling PHP Bindings


Hi all.

I have problem compiling xapian php bindings.

I am using debian sarge.

I have installed php4-dev before compilation.
I am getting the following errors:

boomer:~/xapian/xapian-bindings-0.9.0# make
make  all-recursive
make[1]: Entering directory `/root/xapian/xapian-bindings-0.9.0'
Making all in php4
make[2]: Entering directory `/root/xapian/xapian-bindings-0.9.0/php4'
make  all-recursive
make[3]: Entering directory `/root/xapian/xapian-bindings-0.9.0/php4'
Making all in docs
make[4]: Entering directory `/root/xapian/xapian-bindings-0.9.0/php4/docs'
Making all in examples
make[5]: Entering directory
`/root/xapian/xapian-bindings-0.9.0/php4/docs/examples'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory
`/root/xapian/xapian-bindings-0.9.0/php4/docs/examples'
make[5]: Entering directory `/root/xapian/xapian-bindings-0.9.0/php4/docs'
make[5]: Nothing to be done for `all-am'.
make[5]: Leaving directory `/root/xapian/xapian-bindings-0.9.0/php4/docs'
make[4]: Leaving directory `/root/xapian/xapian-bindings-0.9.0/php4/docs'
make[4]: Entering directory `/root/xapian/xapian-bindings-0.9.0/php4'
(Continue reading)

Michael Schlenker | 7 Jun 2005 16:43
Picon

Re: Compiling PHP Bindings

info <at> bannershift.com wrote:
> Hi all.
> 
> I have problem compiling xapian php bindings.
> 
> I am using debian sarge.
> 
> I have installed php4-dev before compilation.
> I am getting the following errors:
> 
> boomer:~/xapian/xapian-bindings-0.9.0# make
> make  all-recursive
> make[1]: Entering directory `/root/xapian/xapian-bindings-0.9.0'
> Making all in php4
> make[2]: Entering directory `/root/xapian/xapian-bindings-0.9.0/php4'
> make  all-recursive
> make[3]: Entering directory `/root/xapian/xapian-bindings-0.9.0/php4'
> Making all in docs
> make[4]: Entering directory `/root/xapian/xapian-bindings-0.9.0/php4/docs'
> Making all in examples
> make[5]: Entering directory
> `/root/xapian/xapian-bindings-0.9.0/php4/docs/examples'
> make[5]: Nothing to be done for `all'.
> make[5]: Leaving directory
> `/root/xapian/xapian-bindings-0.9.0/php4/docs/examples'
> make[5]: Entering directory `/root/xapian/xapian-bindings-0.9.0/php4/docs'
> make[5]: Nothing to be done for `all-am'.
> make[5]: Leaving directory `/root/xapian/xapian-bindings-0.9.0/php4/docs'
> make[4]: Leaving directory `/root/xapian/xapian-bindings-0.9.0/php4/docs'
> make[4]: Entering directory `/root/xapian/xapian-bindings-0.9.0/php4'
(Continue reading)

Olly Betts | 7 Jun 2005 16:51
Favicon
Gravatar

Re: Compiling PHP Bindings

On Tue, Jun 07, 2005 at 10:29:32AM -0400, info <at> bannershift.com wrote:
> I have problem compiling xapian php bindings.
> 
> I am using debian sarge.
> 
> I have installed php4-dev before compilation.
> I am getting the following errors:
> [...]
>  g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/php4 -I/usr/include/php4/main
> -I/usr/include/php4/Zend -I/usr/include/php4/TSRM -Wall -Wno-unused
> -Wno-uninitialized -g -O2 -I/usr/local/include -MT xapian_wrap.lo -MD -MP -MF
> .deps/xapian_wrap.Tpo -c xapian_wrap.cc  -fPIC -DPIC -o .libs/xapian_wrap.o
> xapian_wrap.cc: In function `void _wrap_PostingIterator_get_description(int,
>    zval*, zval*, int)':
> xapian_wrap.cc:2552: internal compiler error: Segmentation fault

That's most likely a GCC bug.  You shouldn't be able to cause an
"internal compiler error" (or ICE) even if you feed in gibberish.  The
other possibility is bad hardware ("Segmentation fault" is signal number
11):

http://www.bitwizard.nl/sig11/

If it's a hardware fault, it's unlikely to not be totally repeatable
(see that link for more details).

If it's a GCC bug, it's likely to be an optimisation problem (ICEs
usually are in my experience), so you can probably work around it by
turning down the optimisation level.

(Continue reading)

info | 7 Jun 2005 18:14

Re: Compiling PHP Bindings

Quoting Olly Betts <olly <at> survex.com>:

It looks like I have a hardware issue on this computer.

I had no problems compiling the application on other box using
debian sarge.

> If it still fails, try "CXXFLAGS=-O0" instead.  If that fails, it's
> probably not the optimisers, so it's going to be harder to work
> around.
>
> Let me know how you get on.  If this is a reproducible problem with
> a Debian release, we're probably going to need to automatically
> work around it...
>
> Cheers,
>     Olly
>
Amit Regmi | 14 Jun 2005 23:44

Need Help


I have to use Quartz as a backend in my project ...
I just tried to compile few .cc files ... It showed too many 
dependencies ...

Can anyone suggest me the best way to go through ??
Olly Betts | 14 Jun 2005 14:31
Favicon
Gravatar

Re: Need Help

On Tue, Jun 14, 2005 at 05:44:48PM -0400, Amit Regmi wrote:
> I have to use Quartz as a backend in my project ...
> I just tried to compile few .cc files ... It showed too many 
> dependencies ...

Well, quartz isn't designed as a separate component which can just be
lifted out and used elsewhere.  You'd have to take the supporting
files too, or eliminate the need for them.  These aren't in the quartz
directory because they're shared with other parts of the library.

> Can anyone suggest me the best way to go through ??

I'd recommend using Xapian through the public API.  Internal APIs may
change from under you.

If that's not a feasible option, perhaps you should explain why...

Cheers,
    Olly
Richard Boulton | 15 Jun 2005 12:15
Gravatar

Python 2.1 bindings

I'm having a problem compiling the python 2.1 packages for release 0.9.1
- I get many errors along the lines of:

../../python/olde/xapian_wrap.cc: In function `PyObject*
   PySwigObject_repr(PySwigObject*)':
../../python/olde/xapian_wrap.cc:664: error: `PyString_FromFormat'
undeclared
   (first use this function)

On further investigation, the copies of xapian_wrap.cc in the olde and
modern subdirectories of the python binding sources are identical.  I
suspect that something has gone wrong with the source code generation...

For now, I'm disabling python2.1 from the debian packages so that I can
get them built.

--

-- 
Richard Boulton <richard <at> tartarus.org>
Olly Betts | 15 Jun 2005 15:21
Favicon
Gravatar

Re: Python 2.1 bindings

On Wed, Jun 15, 2005 at 11:15:59AM +0100, Richard Boulton wrote:
> I'm having a problem compiling the python 2.1 packages for release 0.9.1
> - I get many errors along the lines of:
> 
> ../../python/olde/xapian_wrap.cc: In function `PyObject*
>    PySwigObject_repr(PySwigObject*)':
> ../../python/olde/xapian_wrap.cc:664: error: `PyString_FromFormat'
> undeclared
>    (first use this function)
> 
> On further investigation, the copies of xapian_wrap.cc in the olde and
> modern subdirectories of the python binding sources are identical.  I
> suspect that something has gone wrong with the source code generation...

No, I think that's correct.  It's only xapian.py which is different
between "olde" and "modern".  However that's not a documented feature
of the swig/python -modern switch as far as I could see, so I took the
cautious approach and included both in case a newer swig release starts
producing different .cc and .h files with -modern.

The files are carefully listed in python/Makefile.am such that the
probably identical files go in the tarball next to each other, so when
they're duplicates, gzip should compress them to almost nothing.

> For now, I'm disabling python2.1 from the debian packages so that I can
> get them built.

Sigh.  It looks like this was probably broken by moving from SWIG 1.3.23
to SWIG 1.3.24.  The latter generates calls to PyString_FromFormat which
was added in Python 2.2.  There are some other Python 2.2 assumptions
(Continue reading)

Olly Betts | 15 Jun 2005 18:52
Favicon
Gravatar

Re: Python 2.1 bindings

On Wed, Jun 15, 2005 at 02:21:37PM +0100, Olly Betts wrote:
> I'll prod the SWIG developers.

I've submitted a patch for SWIG:

http://sf.net/tracker/?func=detail&aid=1221362&group_id=1645&atid=301645

Cheers,
    Olly
Olly Betts | 17 Jun 2005 00:43
Favicon
Gravatar

Re: Python 2.1 bindings

On Wed, Jun 15, 2005 at 05:52:43PM +0100, Olly Betts wrote:
> I've submitted a patch for SWIG:
> 
> http://sf.net/tracker/?func=detail&aid=1221362&group_id=1645&atid=301645

... which has now been accepted and applied.

Cheers,
    Olly

Gmane