Thread: trouble compiling PHP with PostgreSQL under cygwin

trouble compiling PHP with PostgreSQL under cygwin

From
"Clemens Bertram"
Date:
I'm trying to get Apache, PHP, and PostgreSQL compiled under cygwin (on Windows XP Home), but I haven't been very lucky so far.
Postgresql configure and make/make install worked just fine.
 
But PHP does not like me.
I have to
$ export PGSQL_INCLUDE=/usr/local/pgsql/include/
$ export PGSQL_LIBDIR=/usr/local/pgsql/lib/
to get the configure going:
 
./configure --with-apxs=/usr/sbin/apxs --with-pgsql=shared --enable-track-vars --with-xml

(otherwise it complains about not finding libpg.so)
 
make always stops at the following line, though, and I have not been able to get past it:
 
/bin/sh /usr/src/php-4.2.0-2/libtool --silent --mode=compile gcc -I. -I/usr/src/php-4.2.0-2/ext/pgsql -I/usr/src/php-4.2.0-2/main -I/usr/src/php-4.2.0-2 -I/usr/
include/apache -I/usr/src/php-4.2.0-2/Zend -I/usr/src/php-4.2.0-2/ext/mysql/libmysql -I/usr/local/pgsql/include -I/usr/src/php-4.2.0-2/ext/xml/expat /usr/local/
pgsql/include/ -DCYGWIN -DCYGWIN_WINSOCK -DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DUSE_EXPAT -DSHARED_CORE -I/usr/src/php-4.2.0-2/TSRM -g -O2 -prefer-pic  -c pgsql.c
&& touch pgsql.slo
gcc: cannot specify -o with -c or -S and multiple compilations
make[3]: *** [pgsql.slo] Error 1
make[3]: Leaving directory `/usr/src/php-4.2.0-2/ext/pgsql'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/php-4.2.0-2/ext/pgsql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/php-4.2.0-2/ext'
make: *** [all-recursive] Error 1
 
What am I doing wrong?
I tried configure --with-apache before, but it stops here as well.
 
All help is greatly appreciated! [I don't want to resort to MySQL!]
 
Clemens

Re: trouble compiling PHP with PostgreSQL under cygwin

From
Jason Tishler
Date:
Clemens,

On Tue, Jul 08, 2003 at 04:38:18AM +0100, Clemens Bertram wrote:
> I'm trying to get Apache, PHP, and PostgreSQL compiled under cygwin
> (on Windows XP Home), but I haven't been very lucky so far.
> Postgresql configure and make/make install worked just fine.
>
> But PHP does not like me.
> [snip]
> What am I doing wrong?

Sorry, but I don't know.  However, I would try the Cygwin list.  IIRC,
there have been (successful?) attempts there.

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

Re: trouble compiling PHP with PostgreSQL under cygwin

From
"Henshall, Stuart - TNP Southwest"
Date:
A bit of a shot in the dark, but shouldn't there be a  -I infront of the /usr/local/pgsql/include
This looks like a php configure/makefile problem though so you'd probably get more help from their lists/groups.
hth,
- Stuart
-----Original Message-----
From: Clemens Bertram [mailto:clemens.bertram@semagix.com]
Sent: 08 July 2003 04:38
To: pgsql-cygwin@postgresql.org
Subject: [CYGWIN] trouble compiling PHP with PostgreSQL under cygwin

I'm trying to get Apache, PHP, and PostgreSQL compiled under cygwin (on Windows XP Home), but I haven't been very lucky so far.
Postgresql configure and make/make install worked just fine.
 
But PHP does not like me.
I have to
$ export PGSQL_INCLUDE=/usr/local/pgsql/include/
$ export PGSQL_LIBDIR=/usr/local/pgsql/lib/
to get the configure going:
 
./configure --with-apxs=/usr/sbin/apxs --with-pgsql=shared --enable-track-vars --with-xml

(otherwise it complains about not finding libpg.so)
 
make always stops at the following line, though, and I have not been able to get past it:
 
/bin/sh /usr/src/php-4.2.0-2/libtool --silent --mode=compile gcc -I. -I/usr/src/php-4.2.0-2/ext/pgsql -I/usr/src/php-4.2.0-2/main -I/usr/src/php-4.2.0-2 -I/usr/
include/apache -I/usr/src/php-4.2.0-2/Zend -I/usr/src/php-4.2.0-2/ext/mysql/libmysql -I/usr/local/pgsql/include -I/usr/src/php-4.2.0-2/ext/xml/expat /usr/local/
pgsql/include/ -DCYGWIN -DCYGWIN_WINSOCK -DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DUSE_EXPAT -DSHARED_CORE -I/usr/src/php-4.2.0-2/TSRM -g -O2 -prefer-pic  -c pgsql.c
&& touch pgsql.slo
gcc: cannot specify -o with -c or -S and multiple compilations
make[3]: *** [pgsql.slo] Error 1
make[3]: Leaving directory `/usr/src/php-4.2.0-2/ext/pgsql'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/php-4.2.0-2/ext/pgsql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/php-4.2.0-2/ext'
make: *** [all-recursive] Error 1
 
What am I doing wrong?
I tried configure --with-apache before, but it stops here as well.
 
All help is greatly appreciated! [I don't want to resort to MySQL!]
 
Clemens


DISCLAIMER:The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you.

Re: trouble compiling PHP with PostgreSQL under cygwin

From
"Clemens Bertram"
Date:
Thanks, Stuart,
 
your comments made me think about configure and make, so I tried autoconf, which got rid of my old problem, but during the next configure run, I saw many "bug warnings" relating to gcc, and make install finally crapped out on me again.
I gave up, got the windows binaries for apache and php, and compiled postgresql under cygwin. And finally, late last night, I was able to run php scripts connecting to my new postgresql DB. Maybe that's what I should've done in the first place...
 
Clemens
 
 -----Original Message-----
From: Henshall, Stuart - TNP Southwest [mailto:shenshall@tnp-southwest.co.uk]
Sent: Thursday, July 10, 2003 5:29 AM
To: Clemens Bertram; pgsql-cygwin@postgresql.org
Subject: RE: [CYGWIN] trouble compiling PHP with PostgreSQL under cygwin

A bit of a shot in the dark, but shouldn't there be a  -I infront of the /usr/local/pgsql/include
This looks like a php configure/makefile problem though so you'd probably get more help from their lists/groups.
hth,
- Stuart
-----Original Message-----
From: Clemens Bertram [mailto:clemens.bertram@semagix.com]
Sent: 08 July 2003 04:38
To: pgsql-cygwin@postgresql.org
Subject: [CYGWIN] trouble compiling PHP with PostgreSQL under cygwin

I'm trying to get Apache, PHP, and PostgreSQL compiled under cygwin (on Windows XP Home), but I haven't been very lucky so far.
Postgresql configure and make/make install worked just fine.
 
But PHP does not like me.
I have to
$ export PGSQL_INCLUDE=/usr/local/pgsql/include/
$ export PGSQL_LIBDIR=/usr/local/pgsql/lib/
to get the configure going:
 
./configure --with-apxs=/usr/sbin/apxs --with-pgsql=shared --enable-track-vars --with-xml

(otherwise it complains about not finding libpg.so)
 
make always stops at the following line, though, and I have not been able to get past it:
 
/bin/sh /usr/src/php-4.2.0-2/libtool --silent --mode=compile gcc -I. -I/usr/src/php-4.2.0-2/ext/pgsql -I/usr/src/php-4.2.0-2/main -I/usr/src/php-4.2.0-2 -I/usr/
include/apache -I/usr/src/php-4.2.0-2/Zend -I/usr/src/php-4.2.0-2/ext/mysql/libmysql -I/usr/local/pgsql/include -I/usr/src/php-4.2.0-2/ext/xml/expat /usr/local/
pgsql/include/ -DCYGWIN -DCYGWIN_WINSOCK -DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DUSE_EXPAT -DSHARED_CORE -I/usr/src/php-4.2.0-2/TSRM -g -O2 -prefer-pic  -c pgsql.c
&& touch pgsql.slo
gcc: cannot specify -o with -c or -S and multiple compilations
make[3]: *** [pgsql.slo] Error 1
make[3]: Leaving directory `/usr/src/php-4.2.0-2/ext/pgsql'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/php-4.2.0-2/ext/pgsql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/php-4.2.0-2/ext'
make: *** [all-recursive] Error 1
 
What am I doing wrong?
I tried configure --with-apache before, but it stops here as well.
 
All help is greatly appreciated! [I don't want to resort to MySQL!]
 
Clemens


DISCLAIMER:The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you.