PHP bindings fail on Ubuntu for xapian-bindings-1.2.21

Yannick Warnier ywarnier at beeznest.org
Sat Mar 26 23:44:22 GMT 2016


Le 26/03/16 18:04, Olly Betts a écrit :
> On Sat, Mar 26, 2016 at 04:51:35PM -0500, Yannick Warnier wrote:
>> On an Ubuntu 15.10, following the docs at
>> https://trac.xapian.org/wiki/FAQ/PHP%20Bindings%20Package
>>
>> When
>>
>>   running debuild -e PHP_VERSIONS=5 -us -uc
>>
>> I get (sorry for the French):
>>
>>
>> "
>> dpkg-buildpackage -rfakeroot -D -us -uc
>> dpkg-buildpackage: paquet source xapian-bindings
>> dpkg-buildpackage: version source 1.2.21-2.1
>> dpkg-buildpackage: distribution source unstable
>> dpkg-buildpackage: source changé par Matthias Klose <doko at debian.org>
>>   dpkg-source --before-build xapian-bindings-1.2.21
>> dpkg-buildpackage: architecture hôte amd64
>>   fakeroot debian/rules clean
>> dh_testdir
>> dh_testroot
>> dh_autotools-dev_restoreconfig
>> dh_clean
>>   dpkg-source -b xapian-bindings-1.2.21
>> dpkg-source: info: utilisation du format source « 3.0 (quilt) »
>> dpkg-source: erreur: fichier binaire non souhaité :
>> debian/build/python2.7/python/xapian/__init__.pyo
>> dpkg-source: erreur: fichier binaire non souhaité :
>> debian/build/python2.7/python/xapian/__init__.pyc
>> dpkg-source: erreur: 2 fichiers binaires non souhaités ont été
>> détectés (il est nécessaire de les ajouter dans
>> debian/source/include-binaries pour autoriser leur inclusion).
>> dpkg-buildpackage: erreur: dpkg-source -b xapian-bindings-1.2.21 a
>> produit une erreur de sortie de type 29
>> debuild: fatal error at line 1374:
>> dpkg-buildpackage -rfakeroot -D -us -uc failed
>> "
>
> Assuming you did:
>
> echo php > debian/bindings-to-package

I did.

> Then the python bindings shouldn't be getting built at all.  I guess
> Ubuntu's additional changes to the package have broken this mechanism -
> sadly there's not much I can do to prevent them doing that.  Your best
> option is probably to start from the packages here:
>
> https://launchpad.net/~xapian-backports/+archive/ubuntu/ppa

I didn't know they existed, but using them fixed my issue indeed, 
thanks! (I fooled them a little using the packages for vivid because the 
ppa doesn't have a wily branch, but that went through just fine, 
although I had to skip testing).

Now I have the php5-xapian, I add "extension=xapian.so" to my 
/etc/php5/apache2/conf.d/20-xapian.ini, I see in phpinfo that that file 
is parsed, but that's it (no xapian module info).

When I check the Apache error_log, I get this:

"
PHP Warning:  PHP Startup: Unable to load dynamic library 
'/usr/lib/php5/20131226/xapian.so' - /usr/lib/php5/20131226/xapian.so: 
undefined symbol: 
_ZN6Xapian5Chert4openERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii 
in Unknown on line 0
"

I suppose this must be bound to using vivid packages on wily or 
something like that... or is this something that is also fixable by some 
use-that-other-source trick?


> Or take them from debian unstable and also do:
>
> echo wily > debian/codename
>
> (Or whatever the codename is for the Ubuntu version you're building
> for).
>
>> On a Debian Wheezy, the sources are still at xapian-bindings-1.2.12
>> and I get the following:
>>
>> "
>> make  check-TESTS
>> make[4]: Entering directory
>> `/home/ywarnier/xapian-bindings-1.2.12/debian/build/php5/php'
>> /bin/bash: line 5:   313 Segmentation fault      /usr/bin/php5 -n -d
>> safe_mode=off -d enable_dl=on -d extension_dir='/home/ywarnier/xapian-bindings-1.2.12/debian/build/php5/php/.libs'
>> -d include_path='php5:../../../../php/php5' ${dir}$tst
>> FAIL: smoketest.php
>> =======================================
>> 1 of 1 test failed
>
> That's probably this bug:
>
> https://trac.xapian.org/ticket/652
>
> It was fixed in 1.2.19, which only seems to manifest for PHP >= 5.4.
>
> If you don't want to subclass C++ classes in PHP, just skip the
> testsuite when building the package (the FAQ entry describes how to).

Yeah, I caught that the first time but that didn't help (now it did).

> Cheers,
>      Olly
>

Will look at the Debian side a bit later.



More information about the Xapian-discuss mailing list