thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeon <sjeon87+thr...@gmail.com>
Subject undefined reference to `yywarp' when building Thrift.
Date Tue, 04 Aug 2015 16:15:44 GMT
I am trying to build Thrift.

I've cloned Thrift source from git repository.

When I look into `config.log` generated after `./configure`

It is complaining about `yywrap'

The important part is:

    configure:16225: checking for bison
    configure:16241: found /usr/bin/bison
    configure:16253: result: yes
    configure:16272: checking for bison version >= 2.5
    configure:16286: result: yes
    configure:16328: checking for bison
    configure:16344: found /usr/bin/bison
    configure:16355: result: bison -y
    configure:16371: checking for flex
    configure:16387: found /usr/local/bin/flex
    configure:16398: result: flex
    configure:16436: flex conftest.l
    configure:16440: $? = 0
    configure:16442: checking lex output file root
    configure:16456: result: lex.yy
    configure:16461: checking lex library
    configure:16475: gcc -o conftest -g -O2   conftest.c   >&5
    conftest.c:23:0: warning: "BISON_VERSION" redefined [enabled by default]
     #define BISON_VERSION 3.0.2
     ^
    conftest.c:22:0: note: this is the location of the previous definition
     #define BISON_VERSION 0.0
     ^
    /tmp/ccSB2OwN.o: In function `input':
    /home/songsong/thrift/lex.yy.c:1173: undefined reference to `yywrap'
    /tmp/ccSB2OwN.o: In function `yylex':
    /home/songsong/thrift/lex.yy.c:871: undefined reference to `yywrap'
    /tmp/ccSB2OwN.o: In function `main':
    /home/songsong/thrift/conftest.l:18: undefined reference to `yywrap'
    collect2: error: ld returned 1 exit status
    configure:16475: $? = 1
    configure: failed program was:
    | /* confdefs.h */
    | #define PACKAGE_NAME "thrift"
    | #define PACKAGE_TARNAME "thrift"
    ...

I've google up for this problem,
and I found that it is flex-related compile issue
and that it can be solved by giving `-lfl` option to `gcc`

But, as I have little knowledge about compiling, make and makefile,
I have no idea in which file and in which line I should put `-lfl`, `
configure.ac`, `Makefile`.

Is there anyone who can give me a tiny hint of it?

For detail information, I am using Ubuntu 14.04 (kernel 3.13.0-55-generic),
Flex 2.5.39.

Regards,
Jeon.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message