[php-maint] Bug#387619: Building php4 from source with dpkg-buildpackage, errors in cgi-build generated Makefile - libtool not used for cc

Gunnar Skogen Gunnar.Skogen at imarex.com
Fri Sep 15 12:08:31 UTC 2006


Package: php4-dev

Version: 4.4.4-0.dotdeb.1

 

 

New to Debian (but have had some unix experience in the past)

Need to patch php4 ext/mssql/php_mssql.c in order to call stored
procedures from MS SQL

(For recipy & reason for this: see
http://www.devarticles.com/c/a/PHP/Executing-Microsoft-SQL-Server-Stored
-Procedure-from-PHP-on-Linux ).

 

 I use "apt-get source php4", "apt-get build-dep php4" and
dpkg-buildpackage to build.
 
It all stops when the cgi-build dir comes to the linking stage with the
message:

libtool: link: `ext/openssl/openssl.lo' is not a valid libtool object

 

openssl.lo, because it is the first file in the link list - all .lo
files under cgi-build/ext are empty. This is not the case with
apache-build and apache2-build extension, linking here works.

The cause of this is that the generated Makefile compile statement in
cgi-build differs from apache(2)-build's Makefile:

 

Example from apache(2)'s (working):

/bin/sh /usr/local/src/php4-4.4.4/apache2-build/libtool --silent
--preserve-dup-deps --mode=compile gcc
-I/usr/local/src/php4-4.4.4/ext/bcmath/libbcmath/src -Iext/bcmath/
-I/usr/local/src/php4-4.4.4/ext/bcmath/ -DPHP_ATOM_INC
-I/usr/local/src/php4-4.4.4/apache2-build/include
-I/usr/local/src/php4-4.4.4/apache2-build/main
-I/usr/local/src/php4-4.4.4
-I/usr/local/src/php4-4.4.4/ext/mbstring/mbregex
-I/usr/local/src/php4-4.4.4/ext/mbstring/libmbfl
-I/usr/local/src/php4-4.4.4/ext/mbstring/libmbfl/mbfl
-I/usr/local/src/php4-4.4.4/apache2-build/TSRM
-I/usr/local/src/php4-4.4.4/apache2-build/Zend
-I/usr/local/src/php4-4.4.4/main -I/usr/local/src/php4-4.4.4/Zend
-I/usr/local/src/php4-4.4.4/TSRM
-I/usr/local/src/php4-4.4.4/apache2-build/    -O2 -Wall -fsigned-char
-fno-strict-aliasing -gstabs  -prefer-pic -c
/usr/local/src/php4-4.4.4/ext/bcmath/libbcmath/src/compare.c -o
ext/bcmath/libbcmath/src/compare.lo

 

Example from cgi-build (not working):

gcc  -Iext/standard/ -I/usr/local/src/php4-4.4.4/ext/standard/
-DPHP_ATOM_INC -I/usr/local/src/php4-4.4.4/cgi-build/include
-I/usr/local/src/php4-4.4.4/cgi-build/main -I/usr/local/src/php4-4.4.4
-I/usr/local/src/php4-4.4.4/ext/mbstring/mbregex
-I/usr/local/src/php4-4.4.4/ext/mbstring/libmbfl
-I/usr/local/src/php4-4.4.4/ext/mbstring/libmbfl/mbfl
-I/usr/local/src/php4-4.4.4/cgi-build/TSRM
-I/usr/local/src/php4-4.4.4/cgi-build/Zend
-I/usr/local/src/php4-4.4.4/main -I/usr/local/src/php4-4.4.4/Zend
-I/usr/local/src/php4-4.4.4/TSRM -I/usr/local/src/php4-4.4.4/cgi-build/
-O2 -Wall -fsigned-char -fno-strict-aliasing -gstabs  -c
/usr/local/src/php4-4.4.4/ext/standard/array.c -o ext/standard/array.o
&& echo > ext/standard/array.lo

 

 It seems obvious why from these examples that the problem is that the
Makefile for cgi-build is not correctly generated and probably easy if
one knows where to fix it ( I have not found where). A workaround I
might try is to edit the Makefile, but the root cause here seems to me
to be a bug(?).

 

If there are any other solutions, please let me know.

 

*: other "bugs/problems incurred while running dpkg-buildpackage, FYI:

1) All config.* files are deleted (cleaned away) and reported missing
initially. Solution: re-install these and go on, flag dpkg-buildpackage
with -nc hereafter

2) libtool not found in the xxx-build dirs when these are to be built
Solution: link in /usr/bin/libtool.

_____________________________

 

Gunnar Skogen 

 Laycan Solutions AS

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20060915/ae43446f/attachment.htm


More information about the pkg-php-maint mailing list