<div dir="ltr">Hi,<div><br></div><div>This is interesting. Please try whether this patch makes it to work for you: <a href="http://pasteall.org/450760/diff">http://pasteall.org/450760/diff</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 28, 2017 at 4:00 PM, Paul Melis <span dir="ltr">&lt;<a href="mailto:paul.melis@surfsara.nl" target="_blank">paul.melis@surfsara.nl</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I&#39;ve been trying to build cycles (standalone version) on one of our<br>
systems and I keep running into an error that I don&#39;t see when compiling<br>
on my normal workstation:<br>
<br>
[ 27%] Built target cycles_render<br>
[ 29%] Built target extern_cuew<br>
[ 30%] Built target extern_clew<br>
[ 33%] Built target cycles_graph<br>
[ 34%] Building CXX object<br>
src/device/CMakeFiles/cycles_<wbr>device.dir/opencl/opencl_util.<wbr>cpp.o<br>
cd /home/paulm/c/cycles-release/<wbr>src/device &amp;&amp;<br>
/hpc/sw/clang-3.6.2/bin/clang+<wbr>+   -DBOOST_ALL_NO_LIB<br>
-DCCL_NAMESPACE_BEGIN=&quot;<wbr>namespace ccl {&quot; -DCCL_NAMESPACE_END=}<br>
-DCYCLES_TR1_UNORDERED_MAP -DNDEBUG -DWITH_CUDA -DWITH_CUDA_DYNLOAD<br>
-DWITH_CYCLES_STANDALONE_GUI -DWITH_KERNEL_AVX -DWITH_KERNEL_AVX2<br>
-DWITH_KERNEL_SSE2 -DWITH_KERNEL_SSE3 -DWITH_KERNEL_SSE41 -DWITH_MULTI<br>
-DWITH_OPENCL -Wall -Wno-sign-compare -fno-strict-aliasing -ffast-math<br>
-fno-finite-math-only<br>
-I/home/paulm/c/cycles-git/<wbr>third_party/cuew/include<br>
-I/home/paulm/c/cycles-git/<wbr>third_party/clew/include -isystem<br>
/hpc/sw/boost-1.59.0-gnu/<wbr>include -isystem<br>
/home/paulm/software/<wbr>openimageio-20160310/include -isystem<br>
/home/paulm/software/<wbr>openimageio-20160310/include/<wbr>OpenImageIO -isystem<br>
/home/paulm/software/openexr-<wbr>2.2.0/include<br>
-I/home/paulm/c/cycles-git/<wbr>src/../third_party/atomic<br>
-I/home/paulm/c/cycles-git/<wbr>src/device/..<br>
-I/home/paulm/c/cycles-git/<wbr>src/device/../../glew-mx<br>
-I/home/paulm/c/cycles-git/<wbr>src/device/../../../extern/<wbr>cuew/include<br>
-isystem<br>
/home/paulm/c/cycles-git/src/<wbr>device/../../../extern/clew/<wbr>include    -o<br>
CMakeFiles/cycles_device.dir/<wbr>opencl/opencl_util.cpp.o -c<br>
/home/paulm/c/cycles-git/src/<wbr>device/opencl/opencl_util.cpp<br>
/home/paulm/c/cycles-git/src/<wbr>device/opencl/opencl_util.cpp:<wbr>287:11:<br>
error: invalid operands to binary expression (&#39;ccl::StubStream&#39; and<br>
&#39;string&#39; (aka &#39;basic_string&lt;char&gt;&#39;))<br>
                 VLOG(2) &lt;&lt; msg;<br>
                 ~~~~~~~ ^  ~~~<br>
<br>
The compiler suite used here is a bit old, the above error is with clang<br>
3.6.2, but I also get it with Intel ICC 15 and GCC 5.2.0. It seems the<br>
error goes away when using -std=c++11 for this file, but this introduces<br>
issues for other files, e.g.<br>
<br>
[paulm@int2 cycles-release]$ make VERBOSE=1<br>
...<br>
[  1%] Building C object<br>
third_party/clew/CMakeFiles/<wbr>extern_clew.dir/src/clew.c.o<br>
cd /home/paulm/c/cycles-release/<wbr>third_party/clew &amp;&amp;<br>
/hpc/sw/clang-3.6.2/bin/clang  -DCL_USE_DEPRECATED_OPENCL_1_<wbr>1_APIS<br>
-DNDEBUG -std=c++11 -Wall -Wno-sign-compare -fno-strict-aliasing<br>
-I/home/paulm/c/cycles-git/<wbr>third_party/cuew/include<br>
-I/home/paulm/c/cycles-git/<wbr>third_party/clew/include<br>
-I/home/paulm/c/cycles-git/<wbr>third_party/clew/.    -o<br>
CMakeFiles/extern_clew.dir/<wbr>src/clew.c.o   -c<br>
/home/paulm/c/cycles-git/<wbr>third_party/clew/src/clew.c<br>
error: invalid argument &#39;-std=c++11&#39; not allowed with &#39;C/ObjC&#39;<br>
<br>
Apparently, CMAKE_CXX_FLAGS is used for C files as well, which clang<br>
doesn&#39;t like for -std=c++11.<br>
<br>
On my workstation I have GCC 7.1, which seems to have C++11 enabled by<br>
default (without a switch). So before I dig in any further, should the<br>
cycles code compile without C++11 mode or is it mandatory?<br>
<br>
Regards,<br>
Paul<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
<br>
Paul Melis<br>
| Visualization group leader &amp; developer | SURFsara |<br>
| Science Park 140 | 1098 XG Amsterdam |<br>
| T <a href="tel:020%20800%201312" value="+31208001312">020 800 1312</a> | <a href="mailto:paul.melis@surfsara.nl">paul.melis@surfsara.nl</a> | <a href="http://www.surfsara.nl" rel="noreferrer" target="_blank">www.surfsara.nl</a> |<br>
______________________________<wbr>_________________<br>
Bf-cycles mailing list<br>
<a href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
<a href="https://lists.blender.org/mailman/listinfo/bf-cycles" rel="noreferrer" target="_blank">https://lists.blender.org/<wbr>mailman/listinfo/bf-cycles</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div><span style="color:rgb(102,102,102)">With best regards, Sergey Sharybin</span></div></div>
</div>