Обсуждение: building postgres.exe ./configure dies
Hi folks, I'm trying to build postgres 7.1.1 (or 7.1.2) on Windows NTW4SP6 using the latest cygwin. The machine I am compiling on has a dual processor, PIII configuration. In the very first step, ./configure errors out! >checking whether gcc accepts -g... yes >using CFLAGS=-O2 >checking whether the C compiler (gcc -O2 ) works... no >configure: error: installation or configuration problem: C compiler cannot >create executables. This is using gcc version 2.95.3-4 (cygwin special). The exact same problem occurs with postgres 7.1.2 Having never seen configure die like this, I am not sure what to do.... Is this a problem in the ./configure script (and if so what can I do), or is this a problem with gcc (???) as the configure script would claim? Where is this problem best reported? Here on the cygwin digest, or somewhere in postgres land? Thank you, Jerry Asher P.S. The complete configure output is here: >./configure >creating cache ./config.cache >checking host system type... i686-pc-cygwin >checking which template to use... win >checking whether to build with locale support... no >checking whether to build with recode support... no >checking whether to build with multibyte character support... no >checking whether to build with Unicode conversion support... no >checking for default port number... 5432 >checking for default soft limit on number of connections... 32 >checking for gcc... gcc >checking whether the C compiler (gcc ) works... yes >checking whether the C compiler (gcc ) is a cross-compiler... no >checking whether we are using GNU C... yes >checking whether gcc accepts -g... yes >using CFLAGS=-O2 >checking whether the C compiler (gcc -O2 ) works... no >configure: error: installation or configuration problem: C compiler cannot >create executables. >Administrator@DUALBERT:c:/cygnus/usr/src/postgresql-7.1.1$ which gcc >/usr/bin/gcc >Administrator@DUALBERT:c:/cygnus/usr/src/postgresql-7.1.1$ gcc -v >Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-4/specs >gcc version 2.95.3-4 (cygwin special) >Administrator@DUALBERT:c:/cygnus/usr/src/postgresql-7.1.1$ ===================================================== Jerry Asher jerry@hollyjerry.org 1678 Shattuck Avenue Suite 161 Tel: (510) 549-2980 Berkeley, CA 94709 Fax: (877) 311-8688
Jerry, On Tue, May 29, 2001 at 01:28:43PM -0700, Jerry Asher wrote: > Hi folks, > > I'm trying to build postgres 7.1.1 (or 7.1.2) on Windows NTW4SP6 using the > latest cygwin. The machine I am compiling on has a dual processor, PIII > configuration. I'm just curious, but why doesn't the pre-built 7.1.2 provided with Cygwin meet your needs? > In the very first step, ./configure errors out! > > >checking whether gcc accepts -g... yes > >using CFLAGS=-O2 > >checking whether the C compiler (gcc -O2 ) works... no > >configure: error: installation or configuration problem: C compiler cannot > >create executables. Did you forgot to install cygipc? If so, then download it from: http://www.neuro.gatech.edu/users/cwilson/cygutils/V1.1/cygipc/ If you check the end of your config.log, then you should be able to confirm whether or not I am correct. The following (although a little dated) may be helpful too: http://people.freebsd.org/~kevlo/postgres/portNT.html Jason -- Jason Tishler Director, Software Engineering Phone: 732.264.8770 x235 Dot Hill Systems Corp. Fax: 732.264.8798 82 Bethany Road, Suite 7 Email: Jason.Tishler@dothill.com Hazlet, NJ 07730 USA WWW: http://www.dothill.com
Jason Tishler writes: > On Tue, May 29, 2001 at 01:28:43PM -0700, Jerry Asher wrote: >> I'm trying to build postgres 7.1.1 (or 7.1.2) on Windows NTW4SP6 using >> the latest cygwin. > I'm just curious, but why doesn't the pre-built 7.1.2 provided with > Cygwin meet your needs? The stronger answer (but it's not the real reason) is that there was one bug in postgres that prevented it from working with the OpenACS (www.openacs.org) in 7.1.1, and I have a fix for that bug, and there is an entirely different bug in 7.1.2 that keeps it from working with the OpenACS and I don't know the fix for that, so for now, OpenACS developers need this half breed version of postgres. But that was not the real reason when I asked the question. The real reason was that last night I was beating my head into a wall on Linux with a fresh Ant install trying to get postgres to cough up postgresql.jar, its jdbc driver. I was getting all sorts of bizarro results, enough so, that I thought I would try to reproduce the bad results by compiling under Windows to see if the problem was something I had caused under Linux. I was actually counting on the fine cygwin setup program to help ensure that postgres and gcc were installed correctly. So Step One to getting the jdbc driver is to ./configure postgres and then run make in the src/interface/jdbc directory, which led to this error. Anyway, today I was able to get a working jdbc driver out of linux, and being 100% pure java, that works just fine on NT as well. (Today within an hour or so, I had java programs on linux and nt speaking to Oracle and Postgres on Linux and SQL Server (via jdbc-odbc) on NT. Pretty nice!) So that leaves wanting 7.1.1 on Linux so that I can try an NT OpenACS development project. (Sorry you asked?) >> In the very first step, ./configure errors out! >> >> >checking whether gcc accepts -g... yes >> >using CFLAGS=-O2 >> >checking whether the C compiler (gcc -O2 ) works... no >> >configure: error: installation or configuration problem: C compiler cannot >> >create executables. > > Did you forgot to install cygipc? If so, then download it from: > > http://www.neuro.gatech.edu/users/cwilson/cygutils/V1.1/cygipc/ You're right I hadn't installed that yet. Although on the face of it, it seems odd that the lack of cygipc would make gcc -O2 not work, doesn't it? Thanks for your help, Jerry Asher
Jerry, On Wed, May 30, 2001 at 04:03:06AM +0000, Jerry Asher wrote: > Jason Tishler writes: > > On Tue, May 29, 2001 at 01:28:43PM -0700, Jerry Asher wrote: > >> I'm trying to build postgres 7.1.1 (or 7.1.2) on Windows NTW4SP6 using > >> the latest cygwin. > > > I'm just curious, but why doesn't the pre-built 7.1.2 provided with > > Cygwin meet your needs? > > The stronger answer (but it's not the real reason) is that there was one bug > in postgres that prevented it from working with the OpenACS > (www.openacs.org) in 7.1.1, and I have a fix for that bug, and there is an > entirely different bug in 7.1.2 that keeps it from working with the OpenACS > and I don't know the fix for that, so for now, OpenACS developers need this > half breed version of postgres. But that was not the real reason when I > asked the question. Fair enough, but when you figure out what is "wrong" with 7.1.2 please submit a patch to pgsql-patches@postgresql.org for consideration to be included in 7.2. > The real reason was that last night I was beating my head into a wall on > Linux with a fresh Ant install trying to get postgres to cough up > postgresql.jar, its jdbc driver. I was getting all sorts of bizarro > results, enough so, that I thought I would try to reproduce the bad results > by compiling under Windows to see if the problem was something I had caused > under Linux. BTW, the Cygwin PostgreSQL 7.1.2 distribution contains a pre-built postgresql.jar. > I was actually counting on the fine cygwin setup program to > help ensure that postgres and gcc were installed correctly. Cygwin's setup.exe did its job, but it can only install packages that it knows about. cygipc is not one of the latest or contrib packages. However, it is quite likely that the cygipc functionality will be integrated directly into the Cygwin DLL and a new server executable in the (hopefully) near future. > >> In the very first step, ./configure errors out! > >> > >> >checking whether gcc accepts -g... yes > >> >using CFLAGS=-O2 > >> >checking whether the C compiler (gcc -O2 ) works... no > >> >configure: error: installation or configuration problem: C compiler cannot > >> >create executables. > > > > Did you forgot to install cygipc? If so, then download it from: > > > > http://www.neuro.gatech.edu/users/cwilson/cygutils/V1.1/cygipc/ > > You're right I hadn't installed that yet. Although on the face of it, it > seems odd that the lack of cygipc would make gcc -O2 not work, doesn't it? The lack of cygipc does not prevent gcc from working -- the error message just reports the (link) error as such. This conclusion can be derived from reading the config.log. However, PostgreSQL should have a FAQ item for this one since it has bitten many people. Jason -- Jason Tishler Director, Software Engineering Phone: 732.264.8770 x235 Dot Hill Systems Corp. Fax: 732.264.8798 82 Bethany Road, Suite 7 Email: Jason.Tishler@dothill.com Hazlet, NJ 07730 USA WWW: http://www.dothill.com
At first, this message was going to speak to how with 7.1.2 freshly installed, psql was hanging. But, I've since discovered that psql hangs when I use it from within an emacs 20.7 bash shell. Psql (et. al.) apparently work fine from a command prompt running bash. But I love emacs so, yes I do. So is there something I am doing wrong, or what is the reason that I can't run psql from inside an emacs bash shell? Thanks, (and thanks for all the work getting pg working under NT!) Jerry ===================================================== Jerry Asher jerry@hollyjerry.org 1678 Shattuck Avenue Suite 161 Tel: (510) 549-2980 Berkeley, CA 94709 Fax: (877) 311-8688