Skip to content

Troubleshooting

Stefan Zellmann edited this page Sep 19, 2018 · 7 revisions

Content of this page: A list with known errors and complications, and suggestions how to solve them.

Note that the current version of Visionaray is an early preview. At this stage, the framework, including the API, are likely to undergo frequent changes.

Problems building Visionaray from source

Compilation errors from gcc/clang

Q: When building Visionaray from source as described in the Getting Started Guide, compilation breaks with errors like:

warning: variadic templates only available with -std=c++11 or -std=gnu++11 [enabled by default]
...
error: expected ',' or '...' before '&&' token
...
error: parameter packs not expanded with '...'

or

warning: variadic templates are a C++11 extension [-Wc++11-extensions]
...
warning: rvalue references are a C++11 extension [-Wc++11-extensions]
...
error: 'auto' not allowed in function return type

A: Enable support for C++11 compilation by appending -std=c++11 to the cmake variable CMAKE_CXX_FLAGS in the file CMakeCache.txt in the build directory.

--

Q: Compilation stops in file obj_loader.cpp, with errors similar to the following:

error: constexpr constructor never produces a constant expression [-Winvalid-constexpr]
    (visionaray), face_index_t,

boost/fusion/adapted/struct/define_struct.hpp:34:9: note: expanded from macro 'BOOST_FUSION_DEFINE_STRUCT'
        NAME,

A: You can work around this error by defining the macro BOOST_NO_CXX11_CONSTEXPR , e.g. by appending the string -DBOOST_NO_CXX11_CONSTEXPR to the cmake variable CMAKE_CXX_FLAGS in the file CMakeCache.txt in the build directory.

Compilation errors from NVIDIA nvcc

Q: When building Visionaray from source, the nvcc compiler issues error messages like:

/usr/local/cuda/include/host_defines.h(224): error: expected a ";
...
error: identifier "nullptr" is undefined

A: CMake probably detected a local NVIDIA CUDA installation. NVIDIA CUDA builds are enabled by default. Either disable NVIDIA CUDA builds by adjusting the cmake variable VSNRAY_ENABLE_CUDA in the file CMakeCache.txt in the build directory, or pass compiler flags to nvcc to compile in C++11 mode. For more information on this, see the Building with NVIDIA CUDA support section in the Getting Started Guide.

General problems with source code builds

Q: Visionaray compiled successfully but when using the viewer or the example programs frame rates are inacceptable even for moderately sized models.

A: Although there are many possible sources of performance issues, and performance may in general vary on different platforms, one particular source of severe performance issues is using binaries that were compiled in Debug mode. With the CPU code path, which relies heavily on compiler optimizations such as function inlining or use of SIMD datapaths, it is crucial that binaries are compiled with a sufficiently high optimization level. You can accomplish this by choosing the Release build option (edit the cmake variable CMAKE_BUILD_TYPE in the file CMakeCache.txt in the build directory). It is also recommended to pass an architecture flag that describes the SIMD instruction set architecture of the target CPU (edit the cmake variables CMAKE_CXX_FLAGS | CMAKE_CXX_FLAGS_{build-type} in the file CMakeCache.txt in the build directory). See the documentation of your compiler for such a flag; for GCC-compatible compilers, examples are -msse4.1 or -mavx2.

Clone this wiki locally