Yannick Warnier
2016-Mar-26 23:44 UTC
PHP bindings fail on Ubuntu for xapian-bindings-1.2.21
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-packageI 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/ppaI 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.
Yannick Warnier
2016-Mar-26 23:52 UTC
PHP bindings fail on Ubuntu for xapian-bindings-1.2.21
Le 26/03/16 18:44, Yannick Warnier a ?crit :> 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?Nevermind, there seems to be some kind of issue (in wily) about libxapian22 vs libxapian22v5. When doing all over again with libxapian22v5, it works enabled in Apache, as expected.>> 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. > >
On Sat, Mar 26, 2016 at 06:44:22PM -0500, Yannick Warnier wrote:> Le 26/03/16 18:04, Olly Betts a ?crit : > >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).The last update was probably pre-wily.> 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_traitsIcESaIcEEEiiThat sounds like it's due to the GCC5/C++11 changes. I wonder if you're ending up using the xapian-core from vivid from the PPA (I'm not sure of the timing, but guessing vivid was before that)? I should put a newer version in the PPA and build it for wily too. Will sort that out soon. Cheers, Olly
On Sat, Mar 26, 2016 at 06:52:18PM -0500, Yannick Warnier wrote:> Nevermind, there seems to be some kind of issue (in wily) about > libxapian22 vs libxapian22v5. When doing all over again with > libxapian22v5, it works enabled in Apache, as expected.Ah yes, this is the GCC5/C++11 change I guessed might be the cause - libxapian22 is built with the older GCC (and pre-C++11 ABI), libxapian22v5 is built with the newer GCC (and C++11 ABI). Cheers, Olly
Maybe Matching Threads
- PHP bindings fail on Ubuntu for xapian-bindings-1.2.21
- PHP bindings fail on Ubuntu for xapian-bindings-1.2.21
- PHP bindings fail on Ubuntu for xapian-bindings-1.2.21
- Debian and Ubuntu packages of 1.2.0
- [3.4.8/Debian Testing amd64] dpkg-build-package fails with linker error