Lists: | pgsql-hackers |
---|
From: | Rugal Bernstein <ryujinwrath(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | preproc.c compilation error |
Date: | 2014-01-09 12:34:37 |
Message-ID: | CAHoyg32dDY+WNa3iG7ETxSZq5vJ5P+Jj4hSB9k_jOGTpN4-ojQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hello all:
This is my first time mail to all, yesterday I tried to compile
postgresin my linux, but an error keep bother me.
env:
Ubuntu 13.10
Linux rugal-TM8473 3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:17:04 UTC
2013 x86_64 x86_64 x86_64 GNU/Linux
gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu9)
bison (GNU Bison) 2.7.12-4996
version might be update to dated
[rugal(at)rugal-TM8473 postgresql]> git pull
Already up-to-date.
{
make -C preproc all
make[4]: Entering directory `/home/rugal/workspace/postgres
ql/src/interfaces/ecpg/preproc'
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute
-Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard
-pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS
-DECPG_COMPILE -I../include -I../../../../src/interfaces/ecpg/include -I.
-I. -DMAJOR_VERSION=4 -DMINOR_VERSION=10 -DPATCHLEVEL=0
-I../../../../src/include -D_GNU_SOURCE -c -o preproc.o preproc.c -MMD
-MP -MF .deps/preproc.Po
In file included from preproc.y:15004:0:
pgc.l: In function ‘base_yylex’:
pgc.l:403:24: error: ‘ET_FATAL’ undeclared (first use in this function)
BEGIN(state_before);
^
pgc.l:403:24: note: each undeclared identifier is reported only once for
each function it appears in
In file included from preproc.y:15004:0:
pgc.l: In function ‘parse_include’:
pgc.l:1366:28: error: ‘ET_FATAL’ undeclared (first use in this function)
if (!yyin)
^
make[4]: *** [preproc.o] Error 1
}
This problem keep bothering even after I use
[./configure --enable-depend]
and I find a solution
--- a/src/interfaces/ecpg/preproc/type.h<http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/interfaces/ecpg/preproc/type.h;h=b7768fd66146e16547f385d30272e2a42e4d6832;hb=b7768fd66146e16547f385d30272e2a42e4d6832>
+++ b/src/interfaces/ecpg/preproc/type.h<http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/interfaces/ecpg/preproc/type.h;h=cd0d1da8c4a1a641acd9f6b6b7dfa88e7241394d;hb=cd0d1da8c4a1a641acd9f6b6b7dfa88e7241394d>
@@ -186,7<http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/interfaces/ecpg/preproc/type.h;h=b7768fd66146e16547f385d30272e2a42e4d6832;hb=b7768fd66146e16547f385d30272e2a42e4d6832#l186>
+186,7<http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/interfaces/ecpg/preproc/type.h;h=cd0d1da8c4a1a641acd9f6b6b7dfa88e7241394d;hb=cd0d1da8c4a1a641acd9f6b6b7dfa88e7241394d#l186>@@
struct assignment
enum errortype
{
- ET_WARNING, ET_ERROR, ET_FATAL
+ ET_WARNING, ET_ERROR
};
After add this enum, ET_FATAL . compilation become successful!
Is there any mistakes or typos with the latest version?
regard!
From: | Rugal Bernstein <ryujinwrath(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: preproc.c compilation error |
Date: | 2014-01-09 12:36:13 |
Message-ID: | CAHoyg32HNLGexSCXBAZkGoRhyYteWzEQ+8qcSPTkqmQ=2mrC_Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
and even successfully compiled PG, I got warning
preproc.y: In function ‘vmmerror’:
preproc.y:76:2: warning: enumeration value ‘ET_FATAL’ not handled in switch
[-Wswitch]
switch(type)
^
2014/1/9 Rugal Bernstein <ryujinwrath(at)gmail(dot)com>
> Hello all:
> This is my first time mail to all, yesterday I tried to compile
> postgres in my linux, but an error keep bother me.
>
> env:
>
> Ubuntu 13.10
> Linux rugal-TM8473 3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:17:04 UTC
> 2013 x86_64 x86_64 x86_64 GNU/Linux
> gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu9)
> bison (GNU Bison) 2.7.12-4996
>
> version might be update to dated
>
> [rugal(at)rugal-TM8473 postgresql]> git pull
> Already up-to-date.
>
>
> {
> make -C preproc all
> make[4]: Entering directory `/home/rugal/workspace/postgres
> ql/src/interfaces/ecpg/preproc'
> gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
> -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute
> -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard
> -pthread -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS
> -DECPG_COMPILE -I../include -I../../../../src/interfaces/ecpg/include -I.
> -I. -DMAJOR_VERSION=4 -DMINOR_VERSION=10 -DPATCHLEVEL=0
> -I../../../../src/include -D_GNU_SOURCE -c -o preproc.o preproc.c -MMD
> -MP -MF .deps/preproc.Po
> In file included from preproc.y:15004:0:
> pgc.l: In function ‘base_yylex’:
> pgc.l:403:24: error: ‘ET_FATAL’ undeclared (first use in this function)
> BEGIN(state_before);
> ^
> pgc.l:403:24: note: each undeclared identifier is reported only once for
> each function it appears in
> In file included from preproc.y:15004:0:
> pgc.l: In function ‘parse_include’:
> pgc.l:1366:28: error: ‘ET_FATAL’ undeclared (first use in this function)
> if (!yyin)
> ^
> make[4]: *** [preproc.o] Error 1
> }
>
>
>
> This problem keep bothering even after I use
> [./configure --enable-depend]
>
> and I find a solution
>
> --- a/src/interfaces/ecpg/preproc/type.h<http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/interfaces/ecpg/preproc/type.h;h=b7768fd66146e16547f385d30272e2a42e4d6832;hb=b7768fd66146e16547f385d30272e2a42e4d6832>
> +++ b/src/interfaces/ecpg/preproc/type.h<http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/interfaces/ecpg/preproc/type.h;h=cd0d1da8c4a1a641acd9f6b6b7dfa88e7241394d;hb=cd0d1da8c4a1a641acd9f6b6b7dfa88e7241394d>
> @@ -186,7<http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/interfaces/ecpg/preproc/type.h;h=b7768fd66146e16547f385d30272e2a42e4d6832;hb=b7768fd66146e16547f385d30272e2a42e4d6832#l186>
> +186,7<http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/interfaces/ecpg/preproc/type.h;h=cd0d1da8c4a1a641acd9f6b6b7dfa88e7241394d;hb=cd0d1da8c4a1a641acd9f6b6b7dfa88e7241394d#l186>@@
> struct assignment
>
> enum errortype
> {
> - ET_WARNING, ET_ERROR, ET_FATAL
> + ET_WARNING, ET_ERROR
> };
>
>
> After add this enum, ET_FATAL . compilation become successful!
> Is there any mistakes or typos with the latest version?
>
> regard!
>
From: | Michael Meskes <meskes(at)postgresql(dot)org> |
---|---|
To: | Rugal Bernstein <ryujinwrath(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: preproc.c compilation error |
Date: | 2014-01-09 13:45:47 |
Message-ID: | 20140109134547.GA17985@feivel.credativ.lan |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
You have to rebuild the auto-generated pgc.c, preproc.c and preproc.y or simply
remove them to force a rebuild.
Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
Jabber: michael.meskes at gmail dot com
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL
From: | Rugal Bernstein <ryujinwrath(at)gmail(dot)com> |
---|---|
To: | Rugal Bernstein <ryujinwrath(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: preproc.c compilation error |
Date: | 2014-01-09 14:12:53 |
Message-ID: | CAHoyg30aVffUP69bSKyW0m6k__uEp8WWZOXNMaXgPc46bZKOnQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Thanks, seems it is because the first time pgc.c and others are generated,
but [make distclean] did not clean them, which lead to this problem!
after [rm pgc.c preproc.h preproc.c preproc.y]
it is now successfully compiled without any warning! thank you!
Java Developer; Mysql/Oracle DBA; C/Java/Python/Bash; Vim; Linux; Pianist;
Hadoop/Spark/Storm
blog <http://rugal.ml>
github <https://github.com/Rugal>
twitter <https://twitter.com/ryujinwrath>
On Thu, Jan 9, 2014 at 9:45 PM, Michael Meskes <meskes(at)postgresql(dot)org>wrote:
> You have to rebuild the auto-generated pgc.c, preproc.c and preproc.y or
> simply
> remove them to force a rebuild.
>
> Michael
> --
> Michael Meskes
> Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
> Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
> Jabber: michael.meskes at gmail dot com
> VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL
>
From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Rugal Bernstein <ryujinwrath(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: preproc.c compilation error |
Date: | 2014-01-09 14:15:49 |
Message-ID: | 20140109141549.GB12378@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 2014-01-09 22:12:53 +0800, Rugal Bernstein wrote:
> Thanks, seems it is because the first time pgc.c and others are generated,
> but [make distclean] did not clean them, which lead to this problem!
> after [rm pgc.c preproc.h preproc.c preproc.y]
> it is now successfully compiled without any warning! thank you!
maintainer-clean removes those, distclean doesn't because they are
distributed so people without flex/bison can compile postgres.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services