Bug 4828 - New mod_php3-3.0.9 package doesn't build from source
New mod_php3-3.0.9 package doesn't build from source
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: mod_php3 (Show other bugs)
6.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-09-01 11:15 EDT by ptomblin
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-09-01 11:37:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description ptomblin 1999-09-01 11:15:29 EDT
I got the new mod_php3-3.0.9 source rpm, and attempted to
build it with mysql support.  I don't have PostgresSQL
installed, and it's not a required package to use mod_php3.
Never the less, when I try and build, I get the following
error:
make: Leaving directory
`/usr/src/redhat/BUILD/php-3.0.9/convertor'
+ gcc -shared -fPIC -DCOMPILE_DL=1 -I. -I/usr/include/apache
-I/usr/include/pgsql -o pgsql.so ./functions/pgsql.c -lpg
-lc
In file included from ./functions/pgsql.c:40:
functions/php3_pgsql.h:46: libpq-fe.h: No such file or
directory
functions/php3_pgsql.h:47: libpq/libpq-fs.h: No such file or
directory
Bad exit status from /var/tmp/rpm-tmp.65831 (%build)

There is no libpq on my entire system.  I assume it's some
part of one of the postgress packages?  I tried changing the
build options to put --without-pgsql, and it didn't help.

Note that I successfully built from source with the previous
package, 3.0.7.  Since the changelog says it "fixed
postgressql", I'd suggest a rollback of whatever you
supposedly "fixed".
Comment 1 Preston Brown 1999-09-01 11:37:59 EDT
unmodified, the php package needs postgres installed in order to
rebuild.  Soon it will require mysql as well.

There is no problem with the package, but you do have to have some
knowledge about building RPMs and software in general to rip out the
postgresql (and soon mysql) specific parts of the RPM.
Comment 2 ptomblin 1999-09-01 11:39:59 EDT
Note that if I delete all reference to Postgress from the spec file, I
can build it, and mysql works fine.  My spec file now looks like:
Summary: The PHP3 HTML-embedded scripting language for use with
Apache.
Name: mod_php3
Version: 3.0.9
Release: 1
Group: System Environment/Daemons
Source0: http://www.php.net/distributions/php-%{version}.tar.gz
Source1: manual.tar.gz
Source2: imap-4.5.tar.Z
Source3: FAQ.php3
Source4: logo1t.gif
Icon: php3.gif
Patch1:    imap-4.4-vfs.patch
Patch2:    imap-4.5-linux.patch
Patch3:    imap-4.5-redhat.patch
Patch4:    php-3.0.9-config.patch
Copyright: GPL
BuildRoot: /var/tmp/%{name}-root
Requires: webserver

%description
PHP is an HTML-embedded scripting language.  PHP attempts to make it
easy for developers to write dynamically generated web pages.  PHP
also offers built-in database integration for several commercial
and non-commercial database management systems, so writing a
database-enabled web page with PHP is fairly simple.  The most
common use of PHP coding is probably as a replacement for CGI
scripts.  The mod_php module enables the Apache web server to
understand and process the embedded PHP language in web pages.

This package contains PHP3, or PHP version 3.08.  If you use
applications which specifically rely on PHP/FI, you should instead
install the PHP/FI module contained in the mod_php package.
If you're just starting with PHP, you should install this package.
You'll also need to install the Apache web server.

%package manual
Group: System Environment/Daemons
Summary: On-line manual for PHP3

%description manual
Comprehensive documentation for PHP3, viewable through any web
browser.

%package imap
Group: System Environment/Daemons
Requires: mod_php3
Summary: IMAP module for PHP3.

%description imap
This is a dynamic shared object (DSO) for Apache that will add IMAP
support to PHP3.  If you need to have IMAP support for PHP3
applications,
you will need to install this package in addition to the main mod_php3
package.
%prep
%setup -q -n php-%{version} -a 2
%patch4 -p1 -b .config

cd imap-4.5
%patch1 -p1 -b .vfs
%patch2 -p1 -b .linux
%patch3 -p1 -b .redhat

%build
cd imap-4.5
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" lnp
cd ..

autoconf
CFLAGS="-fPIC" ./configure --prefix=/usr \
   --with-apxs=/usr/sbin/apxs \
   --with-config-file-path=/etc/httpd \
   --enable-safe-mode \
   --with-exec-dir=/usr/bin \
   --with-system-regex \
   --disable-debug \
   --with-zlib \
   --without-pgsql \
   --with-mysql=/usr \
   --enable-debugger \
   --enable-magic-quotes \
   --enable-track-vars

make
make -C convertor

# IMAP module
perl -pi -e 's/HAVE_IMAP 0/HAVE_IMAP 1/g' config.h
gcc -shared -fPIC -DCOMPILE_DL=1 -I. -I/usr/include/apache \
   -Iimap-4.5/c-client -o imap.so ./functions/imap.c \
   imap-4.5/c-client/c-client.a -lc



%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/lib/apache
mkdir -p $RPM_BUILD_ROOT/etc/httpd
mkdir -p $RPM_BUILD_ROOT/home/httpd/icons
mkdir -p $RPM_BUILD_ROOT/usr/bin
install -m 755 -s libphp3.so $RPM_BUILD_ROOT/usr/lib/apache
install -m 755 -s imap.so $RPM_BUILD_ROOT/usr/lib/apache
install -m 644 php3.ini-dist $RPM_BUILD_ROOT/etc/httpd/php3.ini
install -m 644 %{SOURCE4} $RPM_BUILD_ROOT/home/httpd/icons
install -m 644 extra/icons/*.gif $RPM_BUILD_ROOT/home/httpd/icons
install -m 755 convertor/convertor $RPM_BUILD_ROOT/usr/bin
mv convertor/README convertor/README.convertor

# manual
mkdir -p $RPM_BUILD_ROOT/home/httpd/html/manual/mod/mod_php3
cd $RPM_BUILD_ROOT/home/httpd/html/manual/mod/mod_php3
tar xzf %{SOURCE1}
ln -sf manual.html index.html

%clean
rm -rf $RPM_BUILD_ROOT

%post imap
perl -pi -e 's|^;extension=imap.so|extension=imap.so|g'
/etc/httpd/php3.ini

%postun imap
if [ $1 = 0 ]; then
  perl -pi -e 's|^extension=imap.so|;extension=imap.so|g'
/etc/httpd/php3.ini
fi


%files
%defattr(-,root,root)
/usr/lib/apache/libphp3.so
%config /etc/httpd/php3.ini
/home/httpd/icons/*
%doc TODO CODING_STANDARDS CREDITS ChangeLog LICENSE BUGS examples
%doc WISHLIST* INSTALL* EXTENSION_STATUS FUNCTION_LIST.txt
%doc convertor/README.convertor

%files imap
%defattr(-,root,root)
/usr/lib/apache/imap.so

%files manual
%defattr(-,root,root)
/home/httpd/html/manual/mod/mod_php3

%changelog
* Mon Jun 14 1999 Preston Brown <pbrown@redhat.com>
- upgraded to 3.0.9
- fixed postgresql module and made separate package
- separated manual into separate documentation package

* Mon May 24 1999 Preston Brown <pbrown@redhat.com>
- upgraded to 3.0.8, which fixes problems with glibc 2.1.
- took some ideas grom Gomez's RPM.

* Tue May 04 1999 Preston Brown <pbrown@redhat.com>
- hacked in imap support in an ugly way until imap gets an official
  shared library implementation

* Fri Apr 16 1999 Preston Brown <pbrown@redhat.com>
- pick up php3.ini

* Wed Mar 24 1999 Preston Brown <pbrown@redhat.com>
- build against apache 1.3.6

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
- auto rebuild in the new build environment (release 2)

* Mon Mar 08 1999 Preston Brown <pbrown@redhat.com>
- upgraded to 3.0.7.

* Wed Feb 24 1999 Preston Brown <pbrown@redhat.com>
- Injected new description and group.

* Sun Feb 07 1999 Preston Brown <pbrown@redhat.com>
- upgrade to php 3.0.6, built against apache 1.3.4

* Mon Oct 12 1998 Cristian Gafton <gafton@redhat.com>
- rebuild for apache 1.3.3

* Thu Oct 08 1998 Preston Brown <pbrown@redhat.com>
- updated to 3.0.5, fixes nasty bugs in 3.0.4.

* Sun Sep 27 1998 Cristian Gafton <gafton@redhat.com>
- updated to 3.0.4 and recompiled for apache 1.3.2

* Thu Sep 03 1998 Preston Brown <pbrown@redhat.com>
- improvements; builds with apache-devel package installed.

* Tue Sep 01 1998 Preston Brown <pbrown@redhat.com>
- Made initial cut for PHP3.

Note You need to log in before you can comment on or make changes to this bug.