Uploaded image for project: 'Open Development'
  1. Open Development
  2. OPEN-67

LLDirIterator implementation incompatible to boost::filesystem v3 (as found in Boost 1.44 and newer)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Reviewing
    • Priority: Unset
    • Resolution: Unresolved
    • Component/s: libraries, viewer build
    • Labels:
    • Environment:
      Boost 1.46.1 (probably affects Boost >= 1.44)
    • Acceptance Criteria:
      Hide
      * Viewer builds with Boost 1.46.
      * Viewer still builds with whatever Boost version LL currently uses.
      * Functionality doesn't change, independent of used Boost version. (What should be tested here?)
      Show
      * Viewer builds with Boost 1.46. * Viewer still builds with whatever Boost version LL currently uses. * Functionality doesn't change, independent of used Boost version. (What should be tested here?)

      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:

      To reproduce:

      1. Install a Boost version >= 1.44
      2. 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

      3. 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)
      4. 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.)

        Attachments

          Activity

            People

            • Assignee:
              boroondas.gupte Boroondas Gupte
              Reporter:
              boroondas.gupte Boroondas Gupte
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: