Debian compile problem

From: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Debian compile problem
Date: 2001-04-15 19:38:55
Message-ID: 20010415153854.B3896@klamath.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

I'm embarrased to admit I'm having some problems getting the 7.1
release to compile on my machine.

I'm using the official 7.1 release, with Debian unstable current,
gcc 2.95.4 20010319 (Debian prerelease), and libreadline 4.2.
I execute './configure' and everything seems fine: readline is
detected properly. When I execute 'make', the core of Postgres
compiles fine. However, when it gets to psql, I get these errors:

gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include -c -o tab-complete.o tab-complete.c
tab-complete.c: In function `initialize_readline':
tab-complete.c:103: warning: assignment from incompatible pointer type
tab-complete.c: In function `psql_completion':
tab-complete.c:292: warning: implicit declaration of function `completion_matches'
tab-complete.c:292: warning: assignment makes pointer from integer without a cast
tab-complete.c:296: warning: assignment makes pointer from integer without a cast
tab-complete.c:301: warning: assignment makes pointer from integer without a cast
[snipped: warnings like the above for nearly every line of source]
tab-complete.c:734: `filename_completion_function' undeclared (first use in this function)
tab-complete.c:734: (Each undeclared identifier is reported only once
tab-complete.c:734: for each function it appears in.)
tab-complete.c:734: warning: assignment makes pointer from integer without a cast
tab-complete.c:749: warning: assignment makes pointer from integer without a cast
tab-complete.c:763: warning: assignment makes pointer from integer without a cast

(Note the section I've cut out: the same message is repeated 50 or 60 times).

The warnings are a bit worrying, but fixing the error was pretty easy.
In src/bin/psql/tab-complete.c, remove the #ifndef starting on line 63:

#ifndef HAVE_FILENAME_COMPLETION_FUNCTION_DECL
char *filename_completion_function(char *, int);

#endif

(So that the function is always declared).

This allows Postgres to compile for me, but I still find the warnings
(and the need to hack the source) to be concerning.

Is this a bug, or have I messed something up? After getting it to compile
I installed Postgres, and everything, AFAICT, works fine (including psql
and tab completion) -- is there a need for me to re-install?

Cheers,

Neil

--
Neil Conway <neilconway(at)home(dot)com>
Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc
Encrypted mail welcomed

Secrecy is the beginning of tyranny.
-- Heinlein

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stoppel, Brett W 2001-04-15 20:00:07 RE: Bug, feature, quirk? HELP
Previous Message Nils Zonneveld 2001-04-15 19:38:47 Re: Changes in PostgreSQL 7.1