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

t_cl_generator.cc:29:10: fatal error: boost/tokenizer.hpp: No such file or directory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Duplicate
    • 0.12.0
    • 0.13.0
    • C++ - Compiler
    • None
    • Ubuntu 19.04

    Description

      Building Thrift 0.12.0 on Ubuntu 19.04, with this command:

      bobo@bobo-VirtualBox:~/Downloads/thrift-0.12.0$ ./configure --with-cpp --without-python --with-boost=/home/bobo/Downloads/boost_1_57_0 --with-openssl=/usr/lib/x86_64-linux-gnu/

       

      I get this error when building:

      g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../.. -I../../lib/cpp/src/thrift -I../../lib/c_glib/src/thrift  -I./src   -Wall -Wextra -pedantic -Werror -g -O2 -MT src/thrift/generate/thrift-t_rs_generator.o -MD -MP -MF src/thrift/generate/.deps/thrift-t_rs_generator.Tpo -c -o src/thrift/generate/thrift-t_rs_generator.o `test -f 'src/thrift/generate/t_rs_generator.cc' || echo './'`src/thrift/generate/t_rs_generator.cc
      mv -f src/thrift/generate/.deps/thrift-t_rs_generator.Tpo src/thrift/generate/.deps/thrift-t_rs_generator.Po
      g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../.. -I../../lib/cpp/src/thrift -I../../lib/c_glib/src/thrift  -I./src   -Wall -Wextra -pedantic -Werror -g -O2 -MT src/thrift/generate/thrift-t_cl_generator.o -MD -MP -MF src/thrift/generate/.deps/thrift-t_cl_generator.Tpo -c -o src/thrift/generate/thrift-t_cl_generator.o `test -f 'src/thrift/generate/t_cl_generator.cc' || echo './'`src/thrift/generate/t_cl_generator.cc
      src/thrift/generate/t_cl_generator.cc:29:10: fatal error: boost/tokenizer.hpp: No such file or directory
       #include <boost/tokenizer.hpp>
                ^~~~~~~~~~~~~~~~~~~~~
      compilation terminated.
      make[3]: *** [Makefile:1786: src/thrift/generate/thrift-t_cl_generator.o] Error 1

       

      Seems boost path is missing when compiling the compiler... When I run make command under strace, this is where it is looking for the tokenizer.hpp file.

      11590 openat(AT_FDCWD, "./boost/tokenizer.hpp", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
      11590 openat(AT_FDCWD, "../../boost/tokenizer.hpp", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
      11590 openat(AT_FDCWD, "../../lib/cpp/src/thrift/boost/tokenizer.hpp", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
      11590 openat(AT_FDCWD, "../../lib/c_glib/src/thrift/boost/tokenizer.hpp", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
      11590 openat(AT_FDCWD, "./src/boost/tokenizer.hpp", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
      11590 openat(AT_FDCWD, "/usr/include/c++/8/boost/tokenizer.hpp", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
      11590 openat(AT_FDCWD, "/usr/include/x86_64-linux-gnu/c++/8/boost/tokenizer.hpp", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
      11590 openat(AT_FDCWD, "/usr/include/c++/8/backward/boost/tokenizer.hpp", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
      11590 openat(AT_FDCWD, "/usr/lib/gcc/x86_64-linux-gnu/8/include/boost/tokenizer.hpp", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
      11590 openat(AT_FDCWD, "/usr/local/include/boost/tokenizer.hpp", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
      11590 openat(AT_FDCWD, "/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed/boost/tokenizer.hpp", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
      11590 openat(AT_FDCWD, "/usr/include/x86_64-linux-gnu/boost/tokenizer.hpp", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
      11590 openat(AT_FDCWD, "/usr/include/boost/tokenizer.hpp", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)

       

      So first issue is that the boost include path is not being passed correctly to the compiler or maybe the issue is that the reference to boost include tokenizer.hpp is not even needed.

       

      Then if I comment out the tokenizer.hpp file in the compiler/cpp/src/thrift/generate/t_cl_generator.cc file, like so:

      //#include <boost/tokenizer.hpp>

      it compiles fine.

       

      So is the real issue that this include statement should just be removed as it is not really needed?

       

      Attachments

        Issue Links

          Activity

            People

              jking3 James E. King III
              roccocorsi Rocco Corsi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: