gazebosim / gazebosim/gz-rendering
failure to build with optix
- Dominant language
- C++
- Stars
- 81
- Forks
- 90
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 10
Description
## Environment
* OS Version: macOS 10.13.6
* Source or binary build?
source, main, ff16689ff6c7c96a7fb58b57e3fa9f11e844c283
```
In file included from /Users/xlla/git/gz-rendering/optix/src/OptixSphere.cc:17:
In file included from /Users/xlla/git/gz-rendering/optix/include/ignition/rendering/optix/OptixSphere.hh:18:
In file included from /Users/xlla/git/gz-rendering/optix/include/gz/rendering/optix/OptixSphere.hh:20:
In file included from /Users/xlla/git/gz-rendering/optix/include/gz/rendering/optix/OptixPrimitive.hh:21:
In file included from /Users/xlla/git/gz-rendering/optix/include/gz/rendering/optix/OptixGeometry.hh:21:
In file included from /Users/xlla/git/gz-rendering/optix/include/gz/rendering/optix/OptixIncludes.hh:21:
In file included from /usr/local/optix/include/optixu/optixpp.h:35:
In file included from /usr/local/optix/include/optixu/optixu_math.h:52:
In file included from /usr/local/optix/include/optixu/optixu_math_namespace.h:41:
In file included from /usr/local/optix/include/optixu/../internal/optix_datatypes.h:33:
/usr/local/cuda/include/host_defines.h:54:2: warning: "host_defines.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h
or cuda_runtime.h instead." [-W#warnings]
#warning "host_defines.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead."
^
/Users/xlla/git/gz-rendering/optix/src/OptixScene.cc:206:38: error: allocating an object of abstract class type 'ignition::rendering::v7::OptixDirectionalLight'
OptixDirectionalLightPtr light(new OptixDirectionalLight);
^
/Users/xlla/git/gz-rendering/include/gz/rendering/Light.hh:112:30: note: unimplemented pure virtual method 'Intensity' in 'OptixDirectionalLight'
public: virtual double Intensity() const = 0;
^
/Users/xlla/git/gz-rendering/include/gz/rendering/Light.hh:116:28: note: unimplemented pure virtual method 'SetIntensity' in 'OptixDirectionalLight'
public: virtual void SetIntensity(double _intensity) = 0;
^
/Users/xlla/git/gz-rendering/optix/src/OptixScene.cc:215:32: error: allocating an object of abstract class type 'ignition::rendering::v7::OptixPointLight'
OptixPointLightPtr light(new OptixPointLight);
^
/Users/xlla/git/gz-rendering/include/gz/rendering/Light.hh:112:30: note: unimplemented pure virtual method 'Intensity' in 'OptixPointLight'
public: virtual double Intensity() const = 0;
^
/Users/xlla/git/gz-rendering/include/gz/rendering/Light.hh:116:28: note: unimplemented pure virtual method 'SetIntensity' in 'OptixPointLight'
public: virtual void SetIntensity(double _intensity) = 0;
^
/Users/xlla/git/gz-rendering/optix/src/OptixScene.cc:224:31: error: allocating an object of abstract class type 'ignition::rendering::v7::OptixSpotLight'
OptixSpotLightPtr light(new OptixSpotLight);
^
/Users/xlla/git/gz-rendering/include/gz/rendering/Light.hh:112:30: note: unimplemented pure virtual method 'Intensity' in 'OptixSpotLight'
public: virtual double Intensity() const = 0;
^
/Users/xlla/git/gz-rendering/include/gz/rendering/Light.hh:116:28: note: unimplemented pure virtual method 'SetIntensity' in 'OptixSpotLight'
public: virtual void SetIntensity(double _intensity) = 0;
^
In file included from /Users/xlla/git/gz-rendering/optix/src/OptixRenderEngine.cc:26:
```
## Description
* Expected behavior: build libs
* Actual behavior: failure
make[2]: Leaving directory '/Users/xlla/git/gz-rendering/build'
CMakeFiles/Makefile2:663: recipe for target 'optix/src/CMakeFiles/ignition-rendering7-optix.dir/all' failed
make[1]: *** [optix/src/CMakeFiles/ignition-rendering7-optix.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
## Steps to reproduce
1. clone the source
2. checkout origin/main
3. mkdir build && cd build
4. cmake
cmake \
.. \
-DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/ignition-rendering7/6.999.999~0~20220414 \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_FIND_FRAMEWORK=LAST \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-Wno-dev \
-DBUILD_TESTING=OFF \
-DBUILD_TESTING=Off \
-DCMAKE_INSTALL_RPATH=@loader_path/../lib \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14
## Output
Contributor guide
Research direction
Start with optix/src/OptixScene.cc and the Optix light classes referenced by the compiler, then compare them with include/gz/rendering/Light.hh to understand the missing pure virtual methods. Reproduce the macOS build using the reported CMake command. Done means the OptiX target builds without the abstract-class errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100