Yannick Warnier
2016-Mar-26 21:51 UTC
PHP bindings fail on Ubuntu for xapian-bindings-1.2.21
Hi Olly and co, 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 " I see that the last time I tried (and succeeded) to generate the bindings it was on a previous version of Ubuntu (don't remember which) with xapian-bindings-1.2.16. 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 " I'm really not that useful at debugging packaging commands, so I wanted to report it while I keep looking for a solution. Cheers, Yannick
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 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 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 failedThat'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). Cheers, Olly
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.