Re: preproc.c compilation error

Поиск
Список
Период
Сортировка
От Rugal Bernstein
Тема Re: preproc.c compilation error
Дата
Msg-id CAHoyg32HNLGexSCXBAZkGoRhyYteWzEQ+8qcSPTkqmQ=2mrC_Q@mail.gmail.com
обсуждение исходный текст
Ответ на preproc.c compilation error  (Rugal Bernstein <ryujinwrath@gmail.com>)
Ответы Re: preproc.c compilation error  (Michael Meskes <meskes@postgresql.org>)
Список 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@gmail.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@rugal-TM8473 postgresql]> git pull
Already up-to-date.


{
make -C preproc all
make[4]: Entering directory `/home/rugal/workspace/postgresql/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

@@ -186,7 +186,7 @@ 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!

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

Предыдущее
От: Rugal Bernstein
Дата:
Сообщение: preproc.c compilation error
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [bug fix] multibyte messages are displayed incorrectly on the client