Hi,

I'm trying to compile Thrift 0.12.0 on a CentOS 7 system with a custom
Boost location. I configure it like this:

./configure --prefix=/opt/apache-thrift --enable-shared=no
--enable-tests=no --enable-tutorial=no --with-qt4=no --with-c_glib=no
--with-java=no --with-python=no --with-haskell=no --with-cpp=yes
--enable-static=yes --with-libevent=no --with-boost=/opt/3rdparty/boost

Configure seems to be picking up the custom location OK and sets up the C++
libraries for compilation:

thrift 0.12.0

Building C++ Library ......... : yes
...

C++ Library:
   C++ compiler .............. : g++ -std=c++11
   Build TZlibTransport ...... : yes
   Build TNonblockingServer .. :
   Build TQTcpServer (Qt4) ... : no
   Build TQTcpServer (Qt5) ... : no
   C++ compiler version ...... : g++ (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)

The include path flags seems to be set correctly:

# grep 3rdparty -R compiler/cpp | grep include
compiler/cpp/test/Makefile:BOOST_CPPFLAGS = -I/opt/3rdparty/boost/include
compiler/cpp/src/thrift/plugin/Makefile:BOOST_CPPFLAGS =
-I/opt/3rdparty/boost/include
compiler/cpp/src/Makefile:BOOST_CPPFLAGS = -I/opt/3rdparty/boost/include
compiler/cpp/Makefile:BOOST_CPPFLAGS = -I/opt/3rdparty/boost/include

But still, they don't seem to be actually used to compile the source code:

> make
...
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:31: fatal error:
boost/tokenizer.hpp: No such file or directory
 #include <boost/tokenizer.hpp>
                               ^
compilation terminated.
make[3]: *** [src/thrift/generate/thrift-t_cl_generator.o] Error 1

Notice that the BOOST_CPPFLAGS value is not included in the g++ command.
The missed file is available at the location provided to configure:

# ls /opt/3rdparty/boost/include/boost/tokenizer.hpp
/opt/3rdparty/boost/include/boost/tokenizer.hpp

Is there something missing?

Thanks,
Rares

Reply via email to