Debian compile problem

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Debian compile problem
Дата
Msg-id 20010415153854.B3896@klamath.dyndns.org
обсуждение исходный текст
Ответы Re: Debian compile problem  (Neil Conway <nconway@klamath.dyndns.org>)
Список 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
-otab-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@home.com>
Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc
Encrypted mail welcomed

Secrecy is the beginning of tyranny.
        -- Heinlein

В списке pgsql-general по дате отправления:

Предыдущее
От: newsreader@mediaone.net
Дата:
Сообщение: Re: man vacuum is broken?? in 7.1
Следующее
От: Christof Glaser
Дата:
Сообщение: Re: [SQL] How to simulate MEMO data type?Thanks!