Re: 8.0 beta 2, configuation for ECPG seems to lack something

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Dann Corbit <DCorbit(at)connx(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 8.0 beta 2, configuation for ECPG seems to lack something
Date: 2004-09-02 01:57:15
Message-ID: 200409020157.i821vFZ20971@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Yes, I just realized the problem myself. The cause is that you ran
win32.mak, creating the SYSCONFDIR-only file, then went to build ecpg
using MinGW.

We really should have a way to prevent such problems. The issue is that
Unix and MinGW builds use port/pg_config_paths.h with full values, while
the libpq/*.mak files don't have these values (because of no configure
run) and they should be in the libpq directory rather than in the
src/port directory so the build doesn't have to go looking into /port
more than it has to.

What I just applied (attached) is a change that will allow win32.mak
'clean' remove the file so the build of ecpg will recreate it properly
and not see the old version in libpq. I made the same change in psql.

---------------------------------------------------------------------------

Dann Corbit wrote:
> It seems that there are two identically named include files:
>
> U:\postgresql-8.0.0beta2\src\interfaces\libpq>type pg_config_paths.h
> #define SYSCONFDIR ""
>
> U:\postgresql-8.0.0beta2\src\port>type pg_config_paths.h
> #define PGBINDIR "/usr/local/pgsql/bin"
> #define PGSHAREDIR "/usr/local/pgsql/share"
> #define SYSCONFDIR "/usr/local/pgsql/etc"
> #define INCLUDEDIR "/usr/local/pgsql/include"
> #define PKGINCLUDEDIR "/usr/local/pgsql/include"
> #define INCLUDEDIRSERVER "/usr/local/pgsql/include/server"
> #define LIBDIR "/usr/local/pgsql/lib"
> #define PKGLIBDIR "/usr/local/pgsql/lib"
> #define LOCALEDIR ""
>
> > -----Original Message-----
> > From: Dann Corbit
> > Sent: Wednesday, September 01, 2004 1:30 PM
> > To: Dann Corbit; PostgreSQL-development
> > Subject: RE: [HACKERS] 8.0 beta 2, configuation for ECPG
> > seems to lack something for MINGW
> >
> >
> > I see that these symbols are found in src\port\pg_config_paths.h
> >
> > I will try to find out why that file did not get included in path.c
> >
> > > -----Original Message-----
> > > From: pgsql-hackers-owner(at)postgresql(dot)org
> > > [mailto:pgsql-hackers-owner(at)postgresql(dot)org] On Behalf Of Dann Corbit
> > > Sent: Wednesday, September 01, 2004 1:26 PM
> > > To: PostgreSQL-development
> > > Subject: [HACKERS] 8.0 beta 2, configuation for ECPG seems to
> > > lack something for MINGW
> > >
> > >
> > > Probably an error on my part. I assume that there is some
> > > configuration script that is supposed to define the following:
> > >
> > > INCLUDEDIR
> > > INCLUDEDIRSERVER
> > > LIBDIR
> > > LOCALEDIR
> > > PGBINDIR
> > > PGSHAREDIR
> > > PKGINCLUDEDIR
> > > PKGLIBDIR
> > >
> > > Because of this:
> > >
> > > make -C ecpglib all
> > > make[4]: Entering directory
> > > `/u/postgresql-8.0.0beta2/src/interfaces/ecpg/ecpglib'
> > > gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
> > > -Wmissing-declarations -DFRONTEND
> > > -I../../../../src/interfaces/ecpg/include
> > > -I../../../../src/interfaces/libpq -I../../../../src/port
> > > -I../../../../src/include -I./src/include/port/win32
> > > -DEXEC_BACKEND "-I../../../../src/include/port/win32" -c -o
> > > execute.o execute.c gcc -O2 -fno-strict-aliasing -Wall
> > > -Wmissing-prototypes
> > > -Wmissing-declarations -DFRONTEND
> > > -I../../../../src/interfaces/ecpg/include
> > > -I../../../../src/interfaces/libpq -I../../../../src/port
> > > -I../../../../src/include -I./src/include/port/win32
> > > -DEXEC_BACKEND "-I../../../../src/include/port/win32" -c -o
> > > typename.o typename.c gcc -O2 -fno-strict-aliasing -Wall
> > > -Wmissing-prototypes
> > > -Wmissing-declarations -DFRONTEND
> > > -I../../../../src/interfaces/ecpg/include
> > > -I../../../../src/interfaces/libpq -I../../../../src/port
> > > -I../../../../src/include -I./src/include/port/win32
> > > -DEXEC_BACKEND "-I../../../../src/include/port/win32" -c -o
> > > descriptor.o descriptor.c gcc -O2 -fno-strict-aliasing -Wall
> > > -Wmissing-prototypes
> > > -Wmissing-declarations -DFRONTEND
> > > -I../../../../src/interfaces/ecpg/include
> > > -I../../../../src/interfaces/libpq -I../../../../src/port
> > > -I../../../../src/include -I./src/include/port/win32
> > > -DEXEC_BACKEND "-I../../../../src/include/port/win32" -c -o
> > > data.o data.c gcc -O2 -fno-strict-aliasing -Wall
> > -Wmissing-prototypes
> > > -Wmissing-declarations -DFRONTEND
> > > -I../../../../src/interfaces/ecpg/include
> > > -I../../../../src/interfaces/libpq -I../../../../src/port
> > > -I../../../../src/include -I./src/include/port/win32
> > > -DEXEC_BACKEND "-I../../../../src/include/port/win32" -c -o
> > > error.o error.c gcc -O2 -fno-strict-aliasing -Wall
> > > -Wmissing-prototypes
> > > -Wmissing-declarations -DFRONTEND
> > > -I../../../../src/interfaces/ecpg/include
> > > -I../../../../src/interfaces/libpq -I../../../../src/port
> > > -I../../../../src/include -I./src/include/port/win32
> > > -DEXEC_BACKEND "-I../../../../src/include/port/win32" -c -o
> > > prepare.o prepare.c gcc -O2 -fno-strict-aliasing -Wall
> > > -Wmissing-prototypes
> > > -Wmissing-declarations -DFRONTEND
> > > -I../../../../src/interfaces/ecpg/include
> > > -I../../../../src/interfaces/libpq -I../../../../src/port
> > > -I../../../../src/include -I./src/include/port/win32
> > > -DEXEC_BACKEND "-I../../../../src/include/port/win32" -c -o
> > > memory.o memory.c gcc -O2 -fno-strict-aliasing -Wall
> > > -Wmissing-prototypes
> > > -Wmissing-declarations -DFRONTEND
> > > -I../../../../src/interfaces/ecpg/include
> > > -I../../../../src/interfaces/libpq -I../../../../src/port
> > > -I../../../../src/include -I./src/include/port/win32
> > > -DEXEC_BACKEND "-I../../../../src/include/port/win32" -c -o
> > > connect.o connect.c gcc -O2 -fno-strict-aliasing -Wall
> > > -Wmissing-prototypes
> > > -Wmissing-declarations -DFRONTEND
> > > -I../../../../src/interfaces/ecpg/include
> > > -I../../../../src/interfaces/libpq -I../../../../src/port
> > > -I../../../../src/include -I./src/include/port/win32
> > > -DEXEC_BACKEND "-I../../../../src/include/port/win32" -c -o
> > > misc.o misc.c rm -f path.c && ln -s
> > > ../../../../src/port/path.c . gcc -O2 -fno-strict-aliasing
> > > -Wall -Wmissing-prototypes
> > > -Wmissing-declarations -DFRONTEND
> > > -I../../../../src/interfaces/ecpg/include
> > > -I../../../../src/interfaces/libpq -I../../../../src/port
> > > -I../../../../src/include -I./src/include/port/win32
> > > -DEXEC_BACKEND "-I../../../../src/include/port/win32" -c -o
> > > path.o path.c
> > > path.c: In function `get_share_path':
> > > path.c:198: error: `PGBINDIR' undeclared (first use in this
> > function)
> > > path.c:198: error: (Each undeclared identifier is reported only once
> > > path.c:198: error: for each function it appears in.)
> > > path.c:198: error: `PGSHAREDIR' undeclared (first use in this
> > > function)
> > > path.c: In function `get_etc_path':
> > > path.c:215: error: `PGBINDIR' undeclared (first use in this
> > function)
> > > path.c: In function `get_include_path':
> > > path.c:232: error: `PGBINDIR' undeclared (first use in this
> > function)
> > > path.c:232: error: `INCLUDEDIR' undeclared (first use in this
> > > function)
> > > path.c: In function `get_pkginclude_path':
> > > path.c:249: error: `PGBINDIR' undeclared (first use in this
> > function)
> > > path.c:249: error: `PKGINCLUDEDIR' undeclared (first use in this
> > > function)
> > > path.c: In function `get_includeserver_path':
> > > path.c:266: error: `PGBINDIR' undeclared (first use in this
> > function)
> > > path.c:266: error: `INCLUDEDIRSERVER' undeclared (first use in this
> > > function)
> > > path.c: In function `get_lib_path':
> > > path.c:283: error: `PGBINDIR' undeclared (first use in this
> > function)
> > > path.c:283: error: `LIBDIR' undeclared (first use in this function)
> > > path.c: In function `get_pkglib_path':
> > > path.c:300: error: `PGBINDIR' undeclared (first use in this
> > function)
> > > path.c:300: error: `PKGLIBDIR' undeclared (first use in
> > this function)
> > > path.c: In function `get_locale_path':
> > > path.c:319: error: `PGBINDIR' undeclared (first use in this
> > function)
> > > path.c:319: error: `LOCALEDIR' undeclared (first use in
> > this function)
> > > make[4]: *** [path.o] Error 1
> > > make[4]: Leaving directory
> > > `/u/postgresql-8.0.0beta2/src/interfaces/ecpg/ecpglib'
> > > make[3]: *** [all] Error 2
> > > make[3]: Leaving directory
> > > `/u/postgresql-8.0.0beta2/src/interfaces/ecpg'
> > > make[2]: *** [all] Error 2
> > > make[2]: Leaving directory `/u/postgresql-8.0.0beta2/src/interfaces'
> > > make[1]: *** [all] Error 2
> > > make[1]: Leaving directory `/u/postgresql-8.0.0beta2/src'
> > > make: *** [all] Error 2
> > >
> > > ---------------------------(end of
> > > broadcast)---------------------------
> > > TIP 4: Don't 'kill -9' the postmaster
> > >
> >
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 2.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-09-02 02:09:35 My upcoming trip
Previous Message Ameya S. Sakhalkar 2004-09-02 01:38:23 Implementation of MMDBMS