[Bf-cycles] Compile error related to VLOG / C++11

Sergey Sharybin sergey.vfx at gmail.com
Wed Jun 28 16:25:06 CEST 2017


Hi,

This is interesting. Please try whether this patch makes it to work for
you: http://pasteall.org/450760/diff

On Wed, Jun 28, 2017 at 4:00 PM, Paul Melis <paul.melis at surfsara.nl> wrote:

> Hi,
>
> I've been trying to build cycles (standalone version) on one of our
> systems and I keep running into an error that I don't see when compiling
> on my normal workstation:
>
> [ 27%] Built target cycles_render
> [ 29%] Built target extern_cuew
> [ 30%] Built target extern_clew
> [ 33%] Built target cycles_graph
> [ 34%] Building CXX object
> src/device/CMakeFiles/cycles_device.dir/opencl/opencl_util.cpp.o
> cd /home/paulm/c/cycles-release/src/device &&
> /hpc/sw/clang-3.6.2/bin/clang++   -DBOOST_ALL_NO_LIB
> -DCCL_NAMESPACE_BEGIN="namespace ccl {" -DCCL_NAMESPACE_END=}
> -DCYCLES_TR1_UNORDERED_MAP -DNDEBUG -DWITH_CUDA -DWITH_CUDA_DYNLOAD
> -DWITH_CYCLES_STANDALONE_GUI -DWITH_KERNEL_AVX -DWITH_KERNEL_AVX2
> -DWITH_KERNEL_SSE2 -DWITH_KERNEL_SSE3 -DWITH_KERNEL_SSE41 -DWITH_MULTI
> -DWITH_OPENCL -Wall -Wno-sign-compare -fno-strict-aliasing -ffast-math
> -fno-finite-math-only
> -I/home/paulm/c/cycles-git/third_party/cuew/include
> -I/home/paulm/c/cycles-git/third_party/clew/include -isystem
> /hpc/sw/boost-1.59.0-gnu/include -isystem
> /home/paulm/software/openimageio-20160310/include -isystem
> /home/paulm/software/openimageio-20160310/include/OpenImageIO -isystem
> /home/paulm/software/openexr-2.2.0/include
> -I/home/paulm/c/cycles-git/src/../third_party/atomic
> -I/home/paulm/c/cycles-git/src/device/..
> -I/home/paulm/c/cycles-git/src/device/../../glew-mx
> -I/home/paulm/c/cycles-git/src/device/../../../extern/cuew/include
> -isystem
> /home/paulm/c/cycles-git/src/device/../../../extern/clew/include    -o
> CMakeFiles/cycles_device.dir/opencl/opencl_util.cpp.o -c
> /home/paulm/c/cycles-git/src/device/opencl/opencl_util.cpp
> /home/paulm/c/cycles-git/src/device/opencl/opencl_util.cpp:287:11:
> error: invalid operands to binary expression ('ccl::StubStream' and
> 'string' (aka 'basic_string<char>'))
>                  VLOG(2) << msg;
>                  ~~~~~~~ ^  ~~~
>
> The compiler suite used here is a bit old, the above error is with clang
> 3.6.2, but I also get it with Intel ICC 15 and GCC 5.2.0. It seems the
> error goes away when using -std=c++11 for this file, but this introduces
> issues for other files, e.g.
>
> [paulm at int2 cycles-release]$ make VERBOSE=1
> ...
> [  1%] Building C object
> third_party/clew/CMakeFiles/extern_clew.dir/src/clew.c.o
> cd /home/paulm/c/cycles-release/third_party/clew &&
> /hpc/sw/clang-3.6.2/bin/clang  -DCL_USE_DEPRECATED_OPENCL_1_1_APIS
> -DNDEBUG -std=c++11 -Wall -Wno-sign-compare -fno-strict-aliasing
> -I/home/paulm/c/cycles-git/third_party/cuew/include
> -I/home/paulm/c/cycles-git/third_party/clew/include
> -I/home/paulm/c/cycles-git/third_party/clew/.    -o
> CMakeFiles/extern_clew.dir/src/clew.c.o   -c
> /home/paulm/c/cycles-git/third_party/clew/src/clew.c
> error: invalid argument '-std=c++11' not allowed with 'C/ObjC'
>
> Apparently, CMAKE_CXX_FLAGS is used for C files as well, which clang
> doesn't like for -std=c++11.
>
> On my workstation I have GCC 7.1, which seems to have C++11 enabled by
> default (without a switch). So before I dig in any further, should the
> cycles code compile without C++11 mode or is it mandatory?
>
> Regards,
> Paul
>
>
> --
>
> Paul Melis
> | Visualization group leader & developer | SURFsara |
> | Science Park 140 | 1098 XG Amsterdam |
> | T 020 800 1312 | paul.melis at surfsara.nl | www.surfsara.nl |
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> https://lists.blender.org/mailman/listinfo/bf-cycles
>



-- 
With best regards, Sergey Sharybin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-cycles/attachments/20170628/059325be/attachment.htm 


More information about the Bf-cycles mailing list