Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-865

C++ compiler build depends on libfl even when flex/lex not detected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.4
    • 0.5
    • C++ - Compiler
    • None
    • Linux ubuntu 2.6.32-24-generic #39-Ubuntu SMP Wed Jul 28 06:07:29 UTC 2010 i686 GNU/Linux

    Description

      I tried building the thrift 0.4.0 tarball on an Ubuntu machine that does not have Flex installed:

      % ./configure
      ...
      
      checking for bison... no
      checking for byacc... no
      checking for flex... no
      checking for lex... no
      ...
      
      % make && make install
      ...
      libtool: link: g++ -Wall -I./src -I/usr/include -g -O2 -Wall -o thrift thrift-thrifty.o thrift-thriftl.o thrift-main.o md5.o thrift-t_generator.o 
      thrift-t_cpp_generator.o thrift-t_java_generator.o thrift-t_as3_generator.o thrift-t_csharp_generator.o thrift-t_py_generator.o 
      thrift-t_rb_generator.o thrift-t_perl_generator.o thrift-t_php_generator.o thrift-t_erl_generator.o thrift-t_cocoa_generator.o 
      thrift-t_st_generator.o thrift-t_ocaml_generator.o thrift-t_hs_generator.o thrift-t_xsd_generator.o thrift-t_html_generator.o 
      thrift-t_js_generator.o  -L/usr/lib -lrt -lpthread
      thrift-thriftl.o: In function `yyinput':
      /home/carl/tmp/thrift-0.4.0/compiler/cpp/thriftl.cc:2947: undefined reference to `yywrap'
      thrift-thriftl.o: In function `yylex()':
      /home/carl/tmp/thrift-0.4.0/compiler/cpp/thriftl.cc:2642: undefined reference to `yywrap'
      collect2: ld returned 1 exit status
      make[3]: *** [thrift] Error 1
      make[3]: Leaving directory `/home/carl/tmp/thrift-0.4.0/compiler/cpp'
      make[2]: *** [all] Error 2
      make[2]: Leaving directory `/home/carl/tmp/thrift-0.4.0/compiler/cpp'
      make[1]: *** [all-recursive] Error 1
      make[1]: Leaving directory `/home/carl/tmp/thrift-0.4.0'
      make: *** [all] Error 2
      %
      

      Relevant: http://stackoverflow.com/questions/1811125/undefined-reference-to-yywrap

      Looks like the relevant token in compiler/cpp/thriftl.cc is YY_SKIP_YYWRAP.

      Attachments

        Activity

          People

            dreiss David Reiss
            cwsteinbach Carl Steinbach
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: