Unix Technical Forum

compile problems

This is a discussion on compile problems within the pgsql Interfaces Pgadmin Hackers forums, part of the PostgreSQL category; --> Hi all, I am recompiling pgAdmin from SVN since I would like to check my updated translation, but I ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces Pgadmin Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 07:51 PM
Giuseppe Sacco
 
Posts: n/a
Default compile problems

Hi all,
I am recompiling pgAdmin from SVN since I would like to check my updated
translation, but I get these errors:

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
-D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -D__WXGTK__ -O2
-I/usr/include/libxml2 -I/usr/include/libxml2 -DDATA_DIR=
\"/usr/loca/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

anyone knows what's wrong?

Thanks,
Giuseppe

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-17-2008, 07:51 PM
Guillaume Lelarge
 
Posts: n/a
Default Re: compile problems

Hi Giuseppe,

Giuseppe Sacco a écrit :
> I am recompiling pgAdmin from SVN since I would like to check my updated
> translation, but I get these errors:
>
> 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
> -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -D__WXGTK__ -O2
> -I/usr/include/libxml2 -I/usr/include/libxml2 -DDATA_DIR=
> \"/usr/loca/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
>
> anyone knows what's wrong?
>


It compiles on my box with current SVN. Sometimes, I need to "make
clean" to have a correct build. Perhaps you can try this.


Regards.


--
Guillaume.
http://www.postgresqlfr.org
http://docs.postgresqlfr.org

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-17-2008, 07:51 PM
Giuseppe Sacco
 
Posts: n/a
Default Re: compile problems

Il giorno dom, 22/04/2007 alle 15.45 +0200, Guillaume Lelarge ha
scritto:
[...]
> It compiles on my box with current SVN. Sometimes, I need to "make
> clean" to have a correct build. Perhaps you can try this.


I tried both "make clean" and "make distclean". What version of
wxWidgets are you using?

Bye,
Giuseppe

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-17-2008, 07:51 PM
Guillaume Lelarge
 
Posts: n/a
Default Re: compile problems

Giuseppe Sacco a écrit :
> Il giorno dom, 22/04/2007 alle 15.45 +0200, Guillaume Lelarge ha
> scritto:
> [...]
>> It compiles on my box with current SVN. Sometimes, I need to "make
>> clean" to have a correct build. Perhaps you can try this.

>
> I tried both "make clean" and "make distclean". What version of
> wxWidgets are you using?
>


2.8.0, the one bundled with Ubuntu Feisty.

You can also try to rm your dir if you didn't make any changes (save
your .po file) and svn update the whole.


--
Guillaume.
http://www.postgresqlfr.org
http://docs.postgresqlfr.org

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-17-2008, 07:53 PM
Giuseppe Sacco
 
Posts: n/a
Default Re: compile problems

Il giorno dom, 22/04/2007 alle 17.13 +0200, Guillaume Lelarge ha
scritto:
[...]
> You can also try to rm your dir if you didn't make any changes (save
> your .po file) and svn update the whole.


I still cannot compile from current SVN. I deleted all the source tree,
checked out from svn, bootstrap, configure, make. I always get the
error:

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
-D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -D__WXGTK__ -O2
-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?

Thanks,
Giuseppe

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-17-2008, 07:53 PM
Florian G. Pflug
 
Posts: n/a
Default Re: compile problems

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
> -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -D__WXGTK__ -O2
> -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
pgadmin/include/keywords.h,
pgadmin/include/parse.h,
pgadmin/db/keywords.c
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:
#define YYSTYPE_IS_DECLARED
#define DECIMAL DECIMAL_P
typedef int YYSTYPE;

while postgres.h (which is included in keywords.c before parse.h) does the
following:
#define YYTOKENTYPE
#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 YYTOKENTYPE
#define YYSTYPE int
in postgres.h with
#define YYSTYPE_IS_DECLARED
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



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-17-2008, 07:54 PM
Dave Page
 
Posts: n/a
Default Re: compile problems

Florian G. Pflug wrote:
> @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...


Yeah, seems to be surplus. Removed, thanks.

/D

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-17-2008, 07:54 PM
Guillaume Lelarge
 
Posts: n/a
Default Re: compile problems

Dave Page a écrit :
> Florian G. Pflug wrote:
>> @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...

>
> Yeah, seems to be surplus. Removed, thanks.
>


I don't think so. Or you need this patch

Regards.


--
Guillaume.
http://www.postgresqlfr.org
http://docs.postgresqlfr.org


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-17-2008, 07:54 PM
Florian G. Pflug
 
Posts: n/a
Default Re: compile problems

Guillaume Lelarge wrote:
> Dave Page a écrit :
>> Florian G. Pflug wrote:
>>> @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...

>>
>> Yeah, seems to be surplus. Removed, thanks.
>>

>
> I don't think so. Or you need this patch


*Puts brown paper bag over his head* You're right of course.
I don't know what I was thinking when I grepped only through
the .c and .h files, and omitted the .cpp files, but it obviously
wasn't something very bright.. ;-)

greetings, Florian Pflug



---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 04-17-2008, 07:54 PM
Dave Page
 
Posts: n/a
Default Re: compile problems

Guillaume Lelarge wrote:
> Dave Page a écrit :
>> Florian G. Pflug wrote:
>>> @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...

>>
>> Yeah, seems to be surplus. Removed, thanks.
>>

>
> I don't think so. Or you need this patch


Hmm, Windows must define it elsewhere then. Reverted, thanks.

Regards, Dave.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:02 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com