[Bf-committers] Compile on Gentoo Liniux CMake / GCC fails - unable to find std::tr1

tenspd137 . dcday137 at gmail.com
Mon Nov 16 06:40:45 CET 2015


Hi all,

I was trying to compile blender 2.76b on my computer using CMke 3.3.2
and GCC 5.2.  It appears to fail after building bf_intern_cycles:

[ 98%] Linking CXX static library ../../../lib/libbf_intern_cycles.a
cd /var/tmp/portage/media-gfx/blender-2.76b/work/blender-2.76b_build/intern/cycles/blender
&& /usr/bin/cmake -P
CMakeFiles/bf_intern_cycles.dir/cmake_clean_target.cmake
cd /var/tmp/portage/media-gfx/blender-2.76b/work/blender-2.76b_build/intern/cycles/blender
&& /usr/bin/cmake -E cmake_link_script
CMakeFiles/bf_intern_cycles.dir/link.txt --verbose=1
/usr/bin/x86_64-pc-linux-gnu-ar cq ../../../lib/libbf_intern_cycles.a
CMakeFiles/bf_intern_cycles.dir/blender_camera.cpp.o
CMakeFiles/bf_intern_cycles.dir/blender_mesh.cpp.o
CMakeFiles/bf_intern_cycles.dir/blender_object.cpp.o
CMakeFiles/bf_intern_cycles.dir/blender_particles.cpp.o
CMakeFiles/bf_intern_cycles.dir/blender_curves.cpp.o
CMakeFiles/bf_intern_cycles.dir/blender_logging.cpp.o
CMakeFiles/bf_intern_cycles.dir/blender_python.cpp.o
CMakeFiles/bf_intern_cycles.dir/blender_session.cpp.o
CMakeFiles/bf_intern_cycles.dir/blender_shader.cpp.o
CMakeFiles/bf_intern_cycles.dir/blender_sync.cpp.o
CMakeFiles/bf_intern_cycles.dir/blender_texture.cpp.o
/usr/bin/x86_64-pc-linux-gnu-ranlib ../../../lib/libbf_intern_cycles.a
make[2]: Leaving directory
'/var/tmp/portage/media-gfx/blender-2.76b/work/blender-2.76b_build'
[ 98%] Built target bf_intern_cycles
make[1]: Leaving directory
'/var/tmp/portage/media-gfx/blender-2.76b/work/blender-2.76b_build'
Makefile:160: recipe for target 'all' failed


but it doesnt really say why it failed in the terminal output.  The
only other place I can think of to look is the CMakeErrors.log - at
the end of it, it has:

Run Build Command:"/usr/bin/gmake" "cmTC_1233e/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_1233e.dir/build.make
CMakeFiles/cmTC_1233e.dir/build
gmake[1]: Entering directory
'/var/tmp/portage/media-gfx/blender-2.76b/work/blender-2.76b_build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_1233e.dir/src.cxx.o
/usr/bin/x86_64-pc-linux-gnu-g++     -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNDEBUG -Wall
-Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self
-Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits
-Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith
-Wformat-signedness -Wuninitialized  -Wmissing-declarations
-march=corei7-avx -O2 -pipe -funsigned-char  -fuse-ld=gold -fopenmp
-msse2  -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing
-Wno-deprecated-declarations -Wno-unused-parameter
-Wno-error=unused-but-set-variable -DHAVE_SHARED_PTR_IN_TR1_NAMESPACE
 -o CMakeFiles/cmTC_1233e.dir/src.cxx.o -c
/var/tmp/portage/media-gfx/blender-2.76b/work/blender-2.76b_build/CMakeFiles/CMakeTmp/src.cxx
/var/tmp/portage/media-gfx/blender-2.76b/work/blender-2.76b_build/CMakeFiles/CMakeTmp/src.cxx:
In function ‘int main()’:
/var/tmp/portage/media-gfx/blender-2.76b/work/blender-2.76b_build/CMakeFiles/CMakeTmp/src.cxx:3:36:
error: ‘std::tr1’ has not been declared
                               std::tr1::shared_ptr<int> int_ptr;
                                    ^
/var/tmp/portage/media-gfx/blender-2.76b/work/blender-2.76b_build/CMakeFiles/CMakeTmp/src.cxx:3:52:
error: expected primary-expression before ‘int’
                               std::tr1::shared_ptr<int> int_ptr;
                                                    ^
CMakeFiles/cmTC_1233e.dir/build.make:65: recipe for target
'CMakeFiles/cmTC_1233e.dir/src.cxx.o' failed
gmake[1]: Leaving directory
'/var/tmp/portage/media-gfx/blender-2.76b/work/blender-2.76b_build/CMakeFiles/CMakeTmp'
gmake[1]: *** [CMakeFiles/cmTC_1233e.dir/src.cxx.o] Error 1
Makefile:126: recipe for target 'cmTC_1233e/fast' failed
gmake: *** [cmTC_1233e/fast] Error 2

Source file was:
#include <memory>
                                       int main() {
                                       std::tr1::shared_ptr<int> int_ptr;
                                       return 0;
                                       }


It looks as though it is getting std and std::tr1 mixed up somehow.  I
would think the above would work with #include<tr1/memory>  or
std::shared_ptr<int>.  This looks like more advanced CMake stuff than
what I am used to - any chance someone could help me determine what is
wrong?

Thanks!


More information about the Bf-committers mailing list