Details
-
Bug
-
Status: Reviewing
-
Unset
-
Resolution: Unresolved
-
Boost 1.46.1 (probably affects Boost >= 1.44)
Description
The API of Boost's Filesystem Library has changed between Boost 1.43 and Boost 1.44, where the fs lib is called "Version 3". Most of that doesn't seem to affect us, but two changes impede compiling the llvfs build target using Boost 1.64.1 (and probably any version from 1.44 on), as LLDirIterator assumes the old API:
- In the old API, boost::filesystem::path::filename() returns a std::string, in v3 it returns a boost::filesystem::path.
- In the old API, boost::filesystem::basic_filesystem_error is a class template, in v3 it's a normal (non-template) class.
To reproduce:
- Install a Boost version >= 1.44
- If you now have several boost versions installed, make sure the right one is active.
- e.g. on Gentoo, for Boost 1.46 do
sudo eselect boost set boost-1.46/default
- e.g. on Gentoo, for Boost 1.46 do
- Make sure CMake will pick up the new boost.
Either:- configure in a fresh check-out from scratch (standalone)
or - adjust the CMake variables Boost_INCLUDE_DIR and Boost_LIBRARY_DIRS in an already configured (standalone) build dir to point to the new version
or - delete CMakeCache.txt from your build dir and reconfigure (standalone)
- configure in a fresh check-out from scratch (standalone)
- Try to build the viewer (standalone)
Observed
[ 22%] Built target llvfs_tests
|
Scanning dependencies of target llvfs
|
[ 22%] Building CXX object llvfs/CMakeFiles/llvfs.dir/lldiriterator.o
|
${SCR_DIR}/indra/llvfs/lldiriterator.cpp: In constructor 'LLDirIterator::Impl::Impl(const std::string&, const std::string&)':
|
${SCR_DIR}/indra/llvfs/lldiriterator.cpp:67: error: expected type-specifier
|
${SCR_DIR}/indra/llvfs/lldiriterator.cpp:67: error: expected unqualified-id before '<' token
|
${SCR_DIR}/indra/llvfs/lldiriterator.cpp:67: error: expected ')' before '<' token
|
${SCR_DIR}/indra/llvfs/lldiriterator.cpp:67: error: expected '{' before '<' token
|
${SCR_DIR}/indra/llvfs/lldiriterator.cpp:67: error: expected primary-expression before '<' token
|
${SCR_DIR}/indra/llvfs/lldiriterator.cpp:67: error: expected primary-expression before '>' token
|
${SCR_DIR}/indra/llvfs/lldiriterator.cpp:67: error: 'e' was not declared in this scope
|
${SCR_DIR}/indra/llvfs/lldiriterator.cpp:67: error: expected ';' before ')' token
|
${SCR_DIR}/indra/llvfs/lldiriterator.cpp:203: error: expected '}' at end of input
|
cc1plus: warnings being treated as errors
|
${SCR_DIR}/indra/llvfs/lldiriterator.cpp: At global scope:
|
${SCR_DIR}/indra/llvfs/lldiriterator.cpp:34: error: 'std::string glob_to_regex(const std::string&)' declared 'static' but never defined
|
/usr/include/boost-1_46/boost/system/error_code.hpp:214: error: 'boost::system::posix_category' defined but not used
|
/usr/include/boost-1_46/boost/system/error_code.hpp:215: error: 'boost::system::errno_ecat' defined but not used
|
/usr/include/boost-1_46/boost/system/error_code.hpp:216: error: 'boost::system::native_ecat' defined but not used
|
make[2]: *** [llvfs/CMakeFiles/llvfs.dir/lldiriterator.o] Error 1
|
make[1]: *** [llvfs/CMakeFiles/llvfs.dir/all] Error 2
|
make: *** [all] Error 2
|
ERROR: building default configuration returned 2
|
For more information: try re-running your command with --verbose or --debug
|
Expected
Viewer can also be built with Boost versions >= 1.44
Regression
The viewer builds fine with Boost 1.46 in revisions earlier than 73866181bd26, because the LLDirIterator code, although already present, isn't used before revision 73866181bd26. (So 73866181bd26 isn't to blame, it was just the first revision suffering from this.)