boostmakefileundefined-referencehoneypot

undefined reference to `boost::filesystem::detail::copy_file


I am trying to install Nova and HoneyD on a CentOS 7 machine but i have found myself with a problem.

The problem is that after I use the command make i get the following errors:

Config.cpp:(.text+0xa2d6): undefined reference to `boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::copy_option, boost::system::error_code*)'
../../NovaLibrary/Release//libNovaLibrary.a(NovaUtil.o): In function `Nova::RecursiveDirectoryCopy(boost::filesystem::path const&, boost::filesystem::path const&, bool)':
NovaUtil.cpp:(.text+0x25a4): undefined reference to `boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::copy_option, boost::system::error_code*)'
collect2: error: ld returned 1 exit status
make[2]: *** [novad] Error 1
make[2]: Leaving directory `/usr/share/Nova/Novad/Release'
make[1]: *** [novad-release] Error 2
make[1]: Leaving directory `/usr/share/Nova'
make: *** [release] Error 2

How could i fix this problem?


Solution

  • I found the solution to my own question.

    The solution is to edit the file Config.cpp and substitute the line:

    #include <boost/filesystem.hpp>
    

    For the following:

    #define BOOST_NO_CXX11_SCOPED_ENUMS
    #include <boost/filesystem.hpp>
    #undef BOOST_NO_CXX11_SCOPED_ENUMS
    

    After I did that i stopped getting the error.