RenderKit / ospray

An Open, Scalable, Portable, Ray Tracing Based Rendering Engine for High-Fidelity Visualization
http://ospray.org
Apache License 2.0
985 stars 180 forks source link

ospTutorialGLM/intel compile problem #469

Closed timsandstrom closed 3 years ago

timsandstrom commented 3 years ago

note: not really core functionality, but I had to route around it to finish the default scripts/superbuild install...

using icpc version 18.0.3 (gcc version 6.2.0 compatibility) ospTutorialGLM.cpp fails to compile with a constexpr issue:

the included version [g-truc/glm] type_vec2.hpp has: GLM_FUNC_DECL GLM_CONSTEXPR T& operator[](length_type i); GLM_FUNC_DECL GLM_CONSTEXPR T const& operator[](length_type i) const;

the upstream version of GLM [Groovounet/glm] type_vec2.hpp has GLM_FUNC_DECL value_type & operator[](size_type i); GLM_FUNC_DECL value_type const & operator[](size_type i) const;

cd /swbuild/tsandstr/ospray-2.4.0/build.icc/ospray/build/apps/ospTutorial && /[pathtocomplier]/icpc \ -DRKCOMMON_TASKING_TBB \ -D__TBB_NO_IMPLICIT_LINKAGE=1 \ -I/swbuild/tsandstr/ospray-2.4.0/ospray/include \ -I/swbuild/tsandstr/ospray-2.4.0/ospray \ -I/swbuild/tsandstr/ospray-2.4.0/build.icc/ospray/build \ -isystem /swbuild/tsandstr/ospray2/install.icc/rkcommon/include \ -isystem /swbuild/tsandstr/ospray2/install.icc/tbb/include \ -isystem /swbuild/tsandstr/ospray2/install.icc/glm \ -static-intel \ -fno-strict-aliasing \ -no-ansi-alias \ -Wno-unknown-pragmas \ -O3 \ -DNDEBUG \ -fPIE \ -std=c++11 \ -o CMakeFiles/ospTutorialGLM.dir/ospTutorialGLM.cpp.o \ -c /swbuild/tsandstr/ospray-2.4.0/apps/ospTutorial/ospTutorialGLM.cpp

In file included from /swbuild/tsandstr/ospray2/install.icc/glm/glm/./ext/vector_bool2.hpp(5), from /swbuild/tsandstr/ospray2/install.icc/glm/glm/vec2.hpp(5), from /swbuild/tsandstr/ospray-2.4.0/ospray/include/ospray/ospray_cpp/ext/glm.h(7), from /swbuild/tsandstr/ospray-2.4.0/apps/ospTutorial/ospTutorialGLM.cpp(25): /swbuild/tsandstr/ospray2/install.icc/glm/glm/./ext/../detail/type_vec2.hpp(93): error: cannot overload functions distinguished by return type alone GLM_FUNC_DECL GLM_CONSTEXPR T const& operator[](length_type i) const;

Twinklebear commented 3 years ago

Hi Tim, thanks for reporting this issue. Unfortunately this is a known issue with GLM on ICC 18 (and 19 from the looks of it, I'll have to test on 20 in a bit). The next release of OSPRay will add a BUILD_OSPRAY_APPS flag to the superbuild which you can set to OFF to disable building the apps. Then it won't try building the GLM tutorial as part of the superbuild. We can also add a specific flag to turn off the GLM one if you do need the other apps as part of the superbuild

johguenther commented 3 years ago

See dfa2863b23, included in OSPRay v2.5.0.