ecpg hackery to get ecpg to compile from FreeBSD ports...

From: Sean Chittenden <sean(at)chittenden(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: ecpg hackery to get ecpg to compile from FreeBSD ports...
Date: 2002-09-08 21:45:41
Message-ID: 20020908214541.GM26147@ninja1.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Different bogon that I ran across:

2:35pm sean(at)mat:ecpg/lib > gmake
cc -O -pipe -g -O -I/usr/local/include -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPIC -I../../../../src/interfaces/ecpg/include -I../../../../src/interfaces/libpq -I../../../../src/include -I/usr/local/include -I/usr/local/include -c -o connect.o connect.c
connect.c: In function `ECPGnoticeProcessor':
connect.c:148: `ECPG_WARNING_UNRECOGNIZED' undeclared (first use in this function)
connect.c:148: (Each undeclared identifier is reported only once
connect.c:148: for each function it appears in.)
connect.c:166: `ECPG_WARNING_QUERY_IGNORED' undeclared (first use in this function)
connect.c:175: `ECPG_WARNING_UNKNOWN_PORTAL' undeclared (first use in this function)
connect.c:182: `ECPG_WARNING_IN_TRANSACTION' undeclared (first use in this function)
connect.c:193: `ECPG_WARNING_NO_TRANSACTION' undeclared (first use in this function)
connect.c:201: `ECPG_WARNING_PORTAL_EXISTS' undeclared (first use in this function)
gmake: *** [connect.o] Error 1
2:35pm sean(at)mat:ecpg/lib > pwd
/usr/ports/databases/postgresql7-beta/work/postgresql-7.3b1/src/interfaces/ecpg/lib

This works:
cc -O -pipe -g -O -I../../../../src/interfaces/ecpg/include -I/usr/local/include -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPIC -I../../../../src/interfaces/libpq -I../../../../src/include -I/usr/local/include -I/usr/local/include -c -o connect.o connect.c

This doesn't:
cc -O -pipe -g -O -I/usr/local/include -I../../../../src/interfaces/ecpg/include -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPIC -I../../../../src/interfaces/libpq -I../../../../src/include -I/usr/local/include -I/usr/local/include -c -o connect.o connect.c

I've got an older ecpgerrno.h in /usr/local/include that doesn't seem
to have these defined. Two quick suggestions:

*) Prepend the CPPFLAGS to the CFLAGS (works, but is hackish)
*) Alter the #ifndef

This strikes me as an upgrade problem for folks that others are going
to run across. -sc

--
Sean Chittenden

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tatsuo Ishii 2002-09-09 02:06:03 Re: crash in apache
Previous Message Sean Chittenden 2002-09-08 21:27:12 pg_config Makefile bogon...