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

Sergey Sharybin sergey.vfx at gmail.com
Wed Jul 5 12:16:53 CEST 2017


Hi,

Compilation error when CYCLES_LOGGING=OFF is now fixed in both Blender and
Cycles. The issue was happening with any GCC version when C++11 was not
enabled.

If you build Cycles with CYCLES_LOGGING=ON, then the only thing you need to
do is to use --debug command line argument. The logging is happening to the
stderr.

For example: ./bin/cycles --debug --verbose 1 ../examples/scene_monkey.xml

This shows quite a lot of logging for me here, If that doesn't work for
you, please try with latest sources, and if that doesn't work please show
your CMakeCache.txt to see the configuration.

On Thu, Jun 29, 2017 at 4:52 PM, Paul Melis <paul.melis at surfsara.nl> wrote:

> Hi Sergey,
>
> A follow-up question related to VLOG (slight off-topic). I'm trying to
> debug the reason I only a single thread to do CPU , even when using
> --threads. I compiled with CYCLES_LOGGING=ON, linking against glog 0.3.4
> and gflags 2.2.0. What is the way to get the logging output to show? I
> tried things like --verbose 1, --debug, setting GLOG_logtostderr=1, etc,
> but get no logging output on stdout/stderr or in some log file.
>
> Thanks,
> Paul
>
> On 28-06-17 16:59, Paul Melis wrote:
> > Patch solves the error (when compiling without -std=c++11)!
> >
> > Thanks,
> > Paul
> >
> > On 28-06-17 16:25, Sergey Sharybin wrote:
> >> 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
> >> <mailto: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 <tel:020%20800%201312> | paul.melis at surfsara.nl
> >>      <mailto:paul.melis at surfsara.nl> | www.surfsara.nl
> >>      <http://www.surfsara.nl> |
> >>      _______________________________________________
> >>      Bf-cycles mailing list
> >>      Bf-cycles at blender.org <mailto:Bf-cycles at blender.org>
> >>      https://lists.blender.org/mailman/listinfo/bf-cycles
> >>      <https://lists.blender.org/mailman/listinfo/bf-cycles>
> >>
> >>
> >>
> >>
> >> --
> >> With best regards, Sergey Sharybin
> >>
> >>
> >> _______________________________________________
> >> Bf-cycles mailing list
> >> Bf-cycles at blender.org
> >> https://lists.blender.org/mailman/listinfo/bf-cycles
> >>
> >
> >
>
>
> --
>
> 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/20170705/2a750ec7/attachment.htm 


More information about the Bf-cycles mailing list