Обсуждение: postgresql 7.3.3

Поиск
Список
Период
Сортировка

postgresql 7.3.3

От
Franco Bruno Borghesi
Дата:
Hi everyone.

I've downloaded the new version of postgresql, and when trying to compile it, I get some errors
(you can see them at the bottom). It seems to be a problem with pg_dump.
Has it happened to anyone else? does anybody have an idea of why is it happening?

----------------
# uname -a
FreeBSD lucifer.akyasociados.com.ar 4.8-RELEASE FreeBSD 4.8-RELEASE #4: Sat Apr 26 16:26:40 ART 2003
root@lucifer.akyasociados.com.ar:/usr/obj/usr/src/sys/LUCIFER  i386

# gcc --version
2.95.4

# ./configure --prefix=/usr/local/pgsql --libdir=/usr/local/lib/postgresql/ --includedir=/usr/local/include/postgresql
--with-java
...
# make
...
gmake[4]: Leaving directory `/root/tmp/postgresql-7.3.3/src/backend/parser'
gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include
-DBINDIR=\"/usr/local/pgsql/bin\" -c -o pg_dump.o pg_dump.c 
pg_dump.c: In function `main':
pg_dump.c:192: elements of array `long_options' have incomplete type
pg_dump.c:193: warning: excess elements in struct initializer
pg_dump.c:193: warning: (near initialization for `long_options[0]')
pg_dump.c:193: `no_argument' undeclared (first use in this function)
pg_dump.c:193: (Each undeclared identifier is reported only once
pg_dump.c:193: for each function it appears in.)
pg_dump.c:193: warning: excess elements in struct initializer
pg_dump.c:193: warning: (near initialization for `long_options[0]')
...
pg_dump.c:227: warning: excess elements in struct initializer
pg_dump.c:227: warning: (near initialization for `long_options[28]')
pg_dump.c:228: invalid use of undefined type `struct option'
pg_dump.c:192: storage size of `long_options' isn't known
pg_dump.c:273: warning: implicit declaration of function `getopt_long'
gmake[3]: *** [pg_dump.o] Error 1
gmake[3]: Leaving directory `/root/tmp/postgresql-7.3.3/src/bin/pg_dump'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/root/tmp/postgresql-7.3.3/src/bin'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/root/tmp/postgresql-7.3.3/src'
gmake: *** [all] Error 2


Re: postgresql 7.3.3

От
Tom Lane
Дата:
Franco Bruno Borghesi <franco@akyasociados.com.ar> writes:
> I've downloaded the new version of postgresql, and when trying to compile it, I get some errors

> pg_dump.c:192: elements of array `long_options' have incomplete type
> ...
> pg_dump.c:273: warning: implicit declaration of function `getopt_long'

Hm.  It would seem that configure found the getopt_long() function in
libc, but the <getopt.h> include file either doesn't exist or doesn't
declare the function and associated structures.  Maybe you need to
install header files to go along with your libraries?

If you just want a quick and dirty solution, undefining HAVE_GETOPT_LONG
in src/include/pg_config.h would probably make it compile.

            regards, tom lane

Re: postgresql 7.3.3

От
Franco Bruno Borghesi
Дата:
I've reinstalled libgnugetopt from the ports, I've checked gnugetopt.h and libgenugetopt.*,
and all of them were reinstalled... but still didn't work.

So as you said, I undefined HAVE_GETOPT_LONG, and everything compiled perfectly. It's ok,
because I never use long options :).

Thanks Tom!

On Thursday 29 May 2003 16:55, you wrote:
> Franco Bruno Borghesi <franco@akyasociados.com.ar> writes:
> > I've downloaded the new version of postgresql, and when trying to compile
> > it, I get some errors
> >
> > pg_dump.c:192: elements of array `long_options' have incomplete type
> > ...
> > pg_dump.c:273: warning: implicit declaration of function `getopt_long'
>
> Hm.  It would seem that configure found the getopt_long() function in
> libc, but the <getopt.h> include file either doesn't exist or doesn't
> declare the function and associated structures.  Maybe you need to
> install header files to go along with your libraries?
>
> If you just want a quick and dirty solution, undefining HAVE_GETOPT_LONG
> in src/include/pg_config.h would probably make it compile.
>
>             regards, tom lane