[Bf-committers] Boost 1.40.0 still supported?

Paul Melis paul.melis at sara.nl
Wed Jul 25 15:39:20 CEST 2012


Hi,

On an Ubuntu 10.04.4 LTS system (x86_64) Blender no longer builds, due
to an error related to boost. Is Boost 1.40.0 not supported anymore?
It's the version of Boost included with 10.04.4 LTS.

...
[ 85%] Building CXX object
intern/cycles/util/CMakeFiles/cycles_util.dir/util_cache.cpp.o
/home/paulmlocal/c/blender-svn/intern/cycles/util/util_cache.cpp: In
member function ‘void ccl::Cache::clear_except(const std::string&, const
std::set<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::less<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
std::allocator<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > > >&)’:
/home/paulmlocal/c/blender-svn/intern/cycles/util/util_cache.cpp:118:
error: ‘struct std::basic_string<char, std::char_traits<char>,
std::allocator<char> >’ has no member named ‘string’
make[2]: ***
[intern/cycles/util/CMakeFiles/cycles_util.dir/util_cache.cpp.o] Error 1
make[1]: *** [intern/cycles/util/CMakeFiles/cycles_util.dir/all] Error 2
make: *** [all] Error 2


Looks like this change to use .string() was introduced here:

------------------------------------------------------------------------
r48836 | nazgul | 2012-07-11 16:48:47 +0200 (Wed, 11 Jul 2012) | 8 lines

Patch #32074: Fix compilation with boost 1.50

This patch switches from boost's filesystem v2 to v3.

This should be completely smooth due to filesystem v3 is pretty
old already.

Patch by Sven-Hendrik Haase (aka svenstaro), thanks!
------------------------------------------------------------------------


$ svn diff -r48835:48836

Index: intern/cycles/util/util_cache.cpp
===================================================================
--- intern/cycles/util/util_cache.cpp   (revision 48835)
+++ intern/cycles/util/util_cache.cpp   (revision 48836)
@@ -26,8 +26,6 @@
 #include "util_path.h"
 #include "util_types.h"

-#define BOOST_FILESYSTEM_VERSION 2
-
 #include <boost/filesystem.hpp>
 #include <boost/algorithm/string.hpp>

@@ -117,7 +115,7 @@
                boost::filesystem::directory_iterator it(dir), it_end;

                for(; it != it_end; it++) {
-                       string filename = it->path().filename();
+                       string filename = it->path().filename().string();

                        if(boost::starts_with(filename, name))
                                if(except.find(filename) == except.end())
Index: intern/cycles/util/util_path.cpp
===================================================================
--- intern/cycles/util/util_path.cpp    (revision 48835)
+++ intern/cycles/util/util_path.cpp    (revision 48836)
@@ -26,8 +26,6 @@

 #include <stdio.h>

-#define BOOST_FILESYSTEM_VERSION 2
-
 #include <boost/filesystem.hpp>
 #include <boost/algorithm/string.hpp>

@@ -60,7 +58,7 @@

 string path_filename(const string& path)
 {
-       return boost::filesystem::path(path).filename();
+       return boost::filesystem::path(path).filename().string();
 }

 string path_dirname(const string& path)




More information about the Bf-committers mailing list