Skip site navigation (1) Skip section navigation (2)

Re: compile problems

From: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
To: Giuseppe Sacco <giuseppe(at)eppesuigoccas(dot)homedns(dot)org>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: compile problems
Date: 2007-05-01 15:45:02
Message-ID: (view raw or whole thread)
Lists: pgadmin-hackers
Giuseppe Sacco wrote:
> if gcc -DHAVE_CONFIG_H -I. -I. -I..   -I/usr/include/postgresql -DSSL
> -I/usr/local/wxWidgets-2.8.2/lib/wx/include/gtk2-unicode-release-2.8
> -I/usr/local/wxWidgets-2.8.2/include/wx-2.8 -D_FILE_OFFSET_BITS=64
> -I/usr/include/libxml2 -I/usr/include/libxml2 -DDATA_DIR=
> \"/usr/local/pgadmin3-1.8.2/share/pgadmin3/\" -Wall -I../pgadmin/include
> -MT keywords.o -MD -MP -MF ".deps/keywords.Tpo" -c -o keywords.o `test
> -f './db/keywords.c' || echo './'`./db/keywords.c; \
> 	then mv -f ".deps/keywords.Tpo" ".deps/keywords.Po"; else rm -f
> ".deps/keywords.Tpo"; exit 1; fi
> In file included from ./db/keywords.c:22:
> gram.y:122: error: expected specifier-qualifier-list before ‘JoinType’
> make[2]: *** [keywords.o] Error 1
> I checked the source and I believe there is something missing: JoinType
> is never defined. Could you please tell me in what source it is defined?
Hm, the files
are periodically copied from the postgresql sources, where parse.h is
actually generated by bison from gram.y

JoinType is some postgresql-internal datastructure, that is neither needed
nor used inside pgAdmin3 - it just happens to be mentioned in parse.h, because
this file originates from postgresql.

I think that the only parts of parse.h that pgAdmin3 is interested in are
the defines at the top, and maybe the enum yytokentype.

misc.cpp does the following before including parse.h to suppress the typedef:
   typedef int YYSTYPE;

while postgres.h (which is included in keywords.c before parse.h) does the
#define YYSTYPE int

I think that for some reason, the former does what it's supposed to on your
system, but that latter doesn't. Could you try replacing
#define YYSTYPE int
in postgres.h with
   typedef int YYSTYPE;
and see if that helps? If no, please also try adding the
#define YYTOKENTYPE back to postgres.h (but keep the other changes)

@dave: I think that the "#define DECIMAL DECIMAP_P" isn't needed anymore -
or at least "find ./ -name "*.h" | xargs grep DECIMAL" and
"find ./ -name "*.c" | xargs grep DECIMAL" seem to indicate that...

greetings, Florian Pflug

In response to


pgadmin-hackers by date

Next:From: svnDate: 2007-05-01 15:55:01
Subject: SVN Commit by dpage: r6253 - trunk/pgadmin3/pgadmin/utils
Previous:From: svnDate: 2007-05-01 08:05:14
Subject: SVN Commit by dpage: r6252 - trunk/www/development

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group