From: Дилян Палаузов <dpa-postgres@aegee.org>
To: pgsql-bugs@postgresql.org
Subject: base_yylex undefined in src/interface/ecpg/preproc/parser.c
Date: Sun, 11 Dec 2016 17:49:39 +0100
Message-ID: <d845c1af-e18d-6651-178f-9f08cdf37e10@aegee.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Hello,
with the newest flex (v2.6.2-19-g6bea32e, which is newer than 2.6.3) I
need this patch to compile postgres:
diff --git a/src/interfaces/ecpg/preproc/pgc.l
b/src/interfaces/ecpg/preproc/pgc.l
index 0453409d37..1c82b58e18 100644inline patch 1: src/interfaces/ecpg/preproc/pgc.l (+0/-0 lines) download inline-1.patch--- a/src/interfaces/ecpg/preproc/pgc.l+++ b/src/interfaces/ecpg/preproc/pgc.l@@ -30,7 +30,7 @@ static int xcdepth = 0; /* depth of nesting in slash-star comments */
static char *dolqstart = NULL; /* current $foo$ quote start
string */
static YY_BUFFER_STATE scanbufhandle;
static char *scanbuf;
-
+#define yylex base_yylex
/*
* literalbuf is used to accumulate literal values when multiple rules
* are needed to parse a single literal. Call startlit to reset buffer
otherwise the linker fails with:
gcc -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute
-Wformat-security -fno-strict-aliasing -fwrapv
-fexcess-precision=standard -g -O0 -pthread -D_REENTRANT -D_THREAD_SAFE
-D_POSIX_PTHREAD_SEMANTICS -DECPG_COMPILE -L../../../../src/port
-L../../../../src/common -L/usr/local/lib -L/usr/local/lib
-L/usr/local/lib -Wl,--as-needed
-Wl,-rpath,'/usr/local/lib',--enable-new-dtags preproc.o type.o ecpg.o
output.o parser.o keywords.o c_keywords.o ecpg_keywords.o kwlookup.o
../ecpglib/typename.o descriptor.o variable.o -lpgcommon -lpgport -lxslt
-lxml2 -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lrt -lcrypt -ldl -lm
-lpthread -o ecpg
parser.o: In function `filtered_base_yylex':
/git/postgresql/src/interfaces/ecpg/preproc/parser.c:68: undefined
reference to `base_yylex'
/git/postgresql/src/interfaces/ecpg/preproc/parser.c:105: undefined
reference to `base_yylex'
collect2: error: ld returned 1 exit status
make: *** [Makefile:42: ecpg] Error 1
because of ecpg/preproc/parser.c:68 (in REL9_5_STABLE)
With previous versions of flex the compilation has worked. But I do not
find in the code where is supposed yylex to be renamed to base_yylex
when parser.c is proccessed. pgc.l also does not use %option
prefix=base_yy, which would be the right way to rename yylex (apart from
#define YY_DECL).
What is the purpose to rename yylex to base_yylex?
Greetings
Дилян
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: dpa-postgres@aegee.org
Subject: Re: base_yylex undefined in src/interface/ecpg/preproc/parser.c
In-Reply-To: <d845c1af-e18d-6651-178f-9f08cdf37e10@aegee.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox