From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sat, 26 May 2001 17:53:49 +0300 From: Alexander Bokovoy To: sisyphus@altlinux.ru Subject: Re: [sisyphus] php --with-dom Message-ID: <20010526175348.A5423@boids.avilink.net> Mail-Followup-To: sisyphus@altlinux.ru References: <3B0FB21B.3010400@rtcom.tver.ru> <20010526171439.A5056@boids.avilink.net> <3B0FBFF1.8040206@rtcom.tver.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Nq2Wo0NMKNjxTN9z" Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i In-Reply-To: <3B0FBFF1.8040206@rtcom.tver.ru>; from dv@rtcom.tver.ru on Sat, May 26, 2001 at 06:38:41PM +0400 Sender: sisyphus-admin@altlinux.ru Errors-To: sisyphus-admin@altlinux.ru X-BeenThere: sisyphus@altlinux.ru X-Mailman-Version: 2.0 Precedence: bulk Reply-To: sisyphus@altlinux.ru List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Archived-At: List-Archive: --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit On Sat, May 26, 2001 at 06:38:41PM +0400, Dmitry V. Popkov wrote: > Alexander Bokovoy wrote: > > >> > >>../../shared/libphp_common.so: undefined reference to `xmlNewNode' > >>collect2: ld returned 1 exit status > >>Неверный код возврата из /var/tmp/rpm-tmp.10273 (%build) > >> > >>Возможно, для кого-то это прозрачно, но я зашел в тупик... > >> > >Поскольку мы собираем разделяемую библиотеку libphp_common.so вручную > >(сборочный механизм PHP этого пока не обеспечивает, но движение в этом > >направлении наблюдается), то нужно вручную добавлять недостающие > >библиотеки. > > > >Вы действительно хотели модуль dom вкомпилировать, а не загружать > >динамически? > > > С этим разобрался, спасибо (добавил -lxml2) . Я бы посоветовал Вам все-таки собирать модули динамическими. Концепция сборки PHP и модулей к нему у нас такова: - php.spec содержит основной код и вкомпилированные модули (как правило, то, что не вызывает дополнительных зависимостей) - все остальные модули при сборке опираются на установленный php-devel и берут свой исходный текст из /usr/src/php-devel/extensions/%name Таким образом отпадает необходимость усложнять основной spec-файл, который и без того немаленький. Версия в Spring2001 использует слегка иной способ (nosrc.rpm вместо src.rpm для модулей + зависимость при сборке от php-%version.tar.bz2 вместо установленного php-devel в /usr/src/php-devel), новая версия, которая будет в Сизифе в начале недели, собирается так, как указано абзацем выше. Шаблонный SPEC-файл для модулей из нее (пример для модуля Curl) прикладываю. > Но мне нужна еще поддержка qtdom : > сборка с опцией --with-qtdom выдает следующее > /bin/sh /usr/src/RPM/BUILD/php4/libtool --silent --mode=compile c++ -I. > -I/usr/src/RPM/BUILD/php4/ext/qtdom -I/usr/src/RPM/BUILD/php4/main > -I/usr/src/RPM/BUILD/php4 -I/usr/include/apache > -I/usr/src/RPM/BUILD/php4/Zend -I/include > -I/usr/src/RPM/BUILD/php4/TSRM -DLINUX=22 -DRUSSIAN_APACHE > -DDEV_RANDOM=/dev/random -DEAPI -DEAPI_MM > -DEAPI_MM_CORE_PATH="/var/run/mm" -DUSE_EXPAT -DSUPPORT_UTF8 -pipe -g > -Wall -O2 -fexpensive-optimizations -march=i686 -c qtdom_qt.cpp > qtdom_qt.cpp:20:18: qdom.h: No such file or directory > qtdom_qt.cpp:21:21: qstring.h: No such file or directory > qtdom_qt.cpp:22:21: qglobal.h: No such file or directory > qtdom_qt.cpp:24: `QDomNode' was not declared in this scope > и т.д. > > А здесь что можно сделать? export QTDIR=/usr/lib/qt2 в SPEC-файле перед сборкой. -- Sincerely yours, Alexander Bokovoy The Midgard Project | ALT Linux Team | Minsk Linux Users Group www.midgard-project.org | www.altlinux.ru | www.minsk-lug.net -- You won't skid if you stay in a rut. -- Frank Hubbard --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="php-curl.spec" ############################################################### # This SPEC file is a configurable skeleton for PHP modules # which are distributed with PHP4 tarball. # Copyright (c) 2001 Alexander Bokovoy # This SPEC file is available under terms of GNU GPL license # versions 2 or greater ############################################################### # #_/---------------\____________________________________________ # Package should be added into mod_php and/or console php? # Some modules can be used under both, others (like php_gtk # or midgard) are not. %define use_mod_php 1 %define use_con_php 1 # # Package name without php prefix %define package_name curl ############################################################### %define php_version %(rpm -q --queryformat '%{VERSION}' php) %define php_release %(rpm -q --queryformat '%{RELEASE}' php) Name: php-%package_name Version: %php_version Release: alt0.1RC1 Group: System/Servers Requires: libcurl >= 7.7.3-alt2 License: PHP Licence Prereq: php = %php_version-%php_release, perl # Automatically added by buildreq on Thu Mar 08 2001 BuildRequires: libbfd, libpam, php-devel = %php_version, libcurl-devel >= 7.7.3-alt2 Summary: cURL module for PHP4 %add_serial php-devel %description The php-%package_name includes a dynamic shared object (DSO) that adds cURL support to PHP4. cURL is a library that enables you to send and receive files through various protocols, including HTTP, FTP, TELNET, LDAP, DICT, and GOPHER. PHP4 is an HTML-embedded scripting language. If you need cURL support for PHP4 applications, you will need to install this package in addition to the php package. %prep %setup -T -c cp -pr /usr/src/php-devel/extensions/%package_name/* . %build # Fix includes so that local config header file will always supercede global options for j in `ls *.c` ; do perl -pi -e "s/#include \"php.h\"/#include \"php.h\"\n#include \"config.h\"/" $j done phpize BUILD_HAVE=`echo %package_name | tr '[:lower:]-' '[:upper:]_'` CFLAGS="$RPM_OPT_FLAGS -fPIC -L%{_libdir} -DHAVE_${BUILD_HAVE}=1 -DCOMPILE_DL_${BUILD_HAVE}=1"; export CFLAGS %configure --with-%package_name=/usr BUILD_ENV_VARS="top_srcdir=$RPM_BUILD_DIR/%name-%version \ bindir=$RPM_BUILD_ROOT/usr/bin \ sbindir=$RPM_BUILD_ROOT/usr/sbin \ includedir=$RPM_BUILD_ROOT/usr/include \ exec_prefix=$RPM_BUILD_ROOT/usr \ libdir=$RPM_BUILD_ROOT/usr/lib \ prefix=$RPM_BUILD_ROOT/usr \ localstatedir=$RPM_BUILD_ROOT/var/lib \ PEAR_INSTALLDIR=$RPM_BUILD_ROOT/usr/lib/php \ EXTENSION_DIR=$RPM_BUILD_ROOT/usr/lib/php/extensions" make $BUILD_ENV_VARS %install # Set them again because this is _different_ script BUILD_ENV_VARS="top_srcdir=$RPM_BUILD_DIR/%name-%version \ bindir=$RPM_BUILD_ROOT/usr/bin \ sbindir=$RPM_BUILD_ROOT/usr/sbin \ includedir=$RPM_BUILD_ROOT/usr/include \ exec_prefix=$RPM_BUILD_ROOT/usr \ libdir=$RPM_BUILD_ROOT/usr/lib \ prefix=$RPM_BUILD_ROOT/usr \ localstatedir=$RPM_BUILD_ROOT/var/lib \ PEAR_INSTALLDIR=$RPM_BUILD_ROOT/usr/lib/php \ EXTENSION_DIR=$RPM_BUILD_ROOT/usr/lib/php/extensions" make $BUILD_ENV_VARS install %clean %files %{_libdir}/php/extensions/* %doc CREDITS %post # Common part: all modules need to if [ `uname` = "Linux" ]; then perl="%{_bindir}/perl"; fi if [ `uname` = "SunOS" ]; then perl="%{_prefix}/local/bin/perl"; fi %if %use_con_php if [ -f %{_sysconfdir}/php.ini ] ; then unset LC_ALL $perl -pi -e 's|^;extension=%{package_name}.so|extension=%{package_name}.so|g' %{_sysconfdir}/php.ini fi %endif %if %use_mod_php if [ -f %{_sysconfdir}/httpd/conf/php.ini ] ; then unset LC_ALL $perl -pi -e 's|^;extension=%{package_name}.so|extension=%{package_name}.so|g' %{_sysconfdir}/httpd/conf/php.ini fi %endif %if %use_mod_php %{_sbindir}/apachectl update %endif # Local script, specific to package %preun if [ `uname` = "Linux" ]; then perl="%{_bindir}/perl"; fi if [ `uname` = "SunOS" ]; then perl="%{_prefix}/local/bin/perl"; fi if [ $1 = "0" ]; then %if %use_con_php if [ -f %{_sysconfdir}/php.ini ] ; then unset LC_ALL $perl -pi -e 's|^extension=%{package_name}.so|;extension=%{package_name}.so|g' %{_sysconfdir}/php.ini fi %endif %if %use_mod_php if [ -f %{_sysconfdir}/httpd/conf/php.ini ] ; then unset LC_ALL $perl -pi -e 's|^extension=%{package_name}.so|;extension=%{package_name}.so|g' %{_sysconfdir}/httpd/conf/php.ini fi %endif fi %postun %if %use_mod_php %{_sbindir}/apachectl update %endif %changelog * Tue May 22 2001 Alexander Bokovoy 4.0.6-alt0.1RC1 - PHP 4.0.6 Release Candidate 1 - Dependencies fixed because curl >= 7.7.3-alt2 is required now * Tue May 08 2001 Alexander Bokovoy 4.0.5-alt1 - PHP 4.0.5 release * Thu Apr 05 2001 Alexander Bokovoy 4.0.5.RC6-alt1 - ALTification - Last release candidate for 4.0.5 - SPEC file changes: + Reference to PHP source removed, php-devel is used to acquire sources of module + locale-specific info unset during installation + nosrc -> src because NoSource tag cannot be used without corresponding Source one * Sat Mar 17 2001 Alexander Bokovoy 4.0.5-ipl1 - First stable build * Thu Mar 15 2001 Alexander Bokovoy 4.0.5-ipl0.4 - Rebuild with fixed version of PHP4 * Sun Mar 11 2001 Alexander Bokovoy 4.0.5-ipl0.3 - Fixed: + Build process for self-contained shared modules in PHP is generally broken, fixed by automatically adding -DHAVE_{MODULE}=1 -DCOMPILE_DL_{MODULE}=1 to configure * Sat Mar 10 2001 Alexander Bokovoy 4.0.5-ipl0.2 - More enhancements in SPEC file: + Automatically gather PHP version, so no need to synchronize spec file's Version: field when new version of PHP is installed * Thu Mar 08 2001 Alexander Bokovoy 4.0.5-ipl0.1 - Created new generalized spec file for nosrc.rpm for PHP modules - Added ability to tune module installation for Console/Apache-based PHP Some modules cannot work in Web-server environment (php_gtk), some -- in Console mode (midgard), some will be happy in both environments --Nq2Wo0NMKNjxTN9z--