tags:

views:

421

answers:

2

Trying to build php from source on Ubuntu 9.10 to enable GD2, but when i run dpkg-buildpackage, it just quits giving me this error:

QUILT_PATCHES=debian/patches quilt --quiltrc /dev/null pop -a -R || test $? = 2
Patch suhosin.patch does not remove cleanly (refresh it or enforce with -f)

make: *** [unpatch] Error 1
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2

I've googled around, but i really can't find what's causing this, and what i should do about it...

any ideas?

+1  A: 

Have you used source from debian package? If no, then you can have difficulties to apply patches from Debian. Debian uses primary clean sources (package_name.orig.tar.gz file) and patches (package_name.diff.gz). Don't know about this particular problem, didn't build packages for some time, but you could try to build it debian-way (http://www.debian.org/doc/FAQ/ch-pkg_basics.en.html#s-sourcepkgs). Ckech out original sources, then apply Debian patches, apply your patches (or the other order, don't know which way should work), and finally build Debian packages from patched sources

MBO
i got the source by using "apt-get source". From my understanding, this should download the officially supported PHP version's source.To build it, i've tried using dpgk-buildpackage unsuccessfully, but i've also tried to do it manually via ./configure make make install, but that way, i cant get the ./configure options right...
Guillaume
A: 

I had similar trouble recently. What's happening is that dpkg is trying to apply patches to the source code, after you've already applied a patch. It can't apply them cleanly because they have gotten moved around by your modifications. I fiddled for a while, and found out that the easiest thing to do is to add the patch to Quilt and then build the package. BUT, the "patch directory" for quilt is DIFFERENT from the normal one, in a Debian package. It's debian/patches rather than ./patches.

Anyway, look at section 6.4 in this page of the Debian package maintainer's guide: http://www.debian.org/doc/maint-guide/ch-build.en.html

rescdsk