-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiling on Ubuntu 20.04 #24
Comments
Hi, thanks for your interest. As you can see, I'm not actively working on this project and not actively supporting it right now. However, I made a few small changes that might fix your compilation problem. Please try again and report back if possible |
Thank you for your quick response. It seems this has solved the issue and a large chunk of files compiles now, but there are still problems left with the compilation, so lets not close this issue for now. In case you would be interested, I have stated my further problem as a comment here (the last one at the bottom): This is some difficulty with glbinding and the way its cmake files use/link KHR platform header file. Seeing how any graphics backend porting/compilation is so troublesome, I wonder if you could give us/me some advice here. Please see my questions below and maybe you could share your comments/opinion.
|
I'm not sure I can help with the glbinding problem, I had no such issues before and no ubuntu system to test this on. |
I have finally made this work on my machine, so I will close this issue. There were four types of problem areas:
All the tests seemed to work, except the only remaining minor issue was that project1_volumetric_rendering did not display a full Sponza scene despite that it loaded correctly in the example test_model1. "Breakfast Room" and "San Miguel" scenes were amazingly lit and lots of options to tune and study. On my NVIDIA GTX 760, the timings were: Sponza - 10ms (test_model1), 100ms (project1_volumetric_rendering), Many thanks for this implementation of Bart Wronski's 2016 paper. It seems that this project is one of the very few open source codes that gets the god rays visible when the light source disappears from the frustum. |
I am trying to compile this code base on my Ubuntu 20.04 machine with GTX 760, and after getting through cmake and dependencies I get stuck on the following error:
"
tokyo@tokyo-Z87-DS3H:~/Graphics2/build$ make all
[ 1%] Building CXX object CMakeFiles/imgui.dir/external/imgui/imgui.cpp.o
[ 3%] Building CXX object CMakeFiles/imgui.dir/external/imgui/imgui_demo.cpp.o
[ 4%] Building CXX object CMakeFiles/imgui.dir/external/imgui/imgui_draw.cpp.o
[ 6%] Building CXX object CMakeFiles/imgui.dir/external/imgui/imgui_impl_glfw_gl3.cpp.o
[ 8%] Linking CXX static library libimgui.a
[ 8%] Built target imgui
Scanning dependencies of target Rendering
[ 9%] Building CXX object CMakeFiles/Rendering.dir/libraries/Rendering/Buffer.cpp.o
[ 11%] Building CXX object CMakeFiles/Rendering.dir/libraries/Rendering/Camera.cpp.o
[ 12%] Building CXX object CMakeFiles/Rendering.dir/libraries/Rendering/Cubemap.cpp.o
[ 14%] Building CXX object CMakeFiles/Rendering.dir/libraries/Rendering/FrameBuffer.cpp.o
[ 16%] Building CXX object CMakeFiles/Rendering.dir/libraries/Rendering/IBLCubemapMaker.cpp.o
[ 17%] Building CXX object CMakeFiles/Rendering.dir/libraries/Rendering/Image.cpp.o
[ 19%] Building CXX object CMakeFiles/Rendering.dir/libraries/Rendering/Light.cpp.o
[ 20%] Building CXX object CMakeFiles/Rendering.dir/libraries/Rendering/LightManager.cpp.o
[ 22%] Building CXX object CMakeFiles/Rendering.dir/libraries/Rendering/Mesh.cpp.o
In file included from /usr/include/c++/9/pstl/glue_execution_defs.h:53,
from /usr/include/c++/9/execution:32,
from /home/tokyo/Graphics2/libraries/Rendering/Mesh.cpp:5:
/usr/include/c++/9/pstl/numeric_impl.h: In instantiation of ‘_Tp __pstl::__internal::__brick_transform_reduce(_ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation, std::false_type) [with _ForwardIterator = __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >; _Tp = glm::mat<2, 3, float, glm::packed_highp>; _BinaryOperation = util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >; _UnaryOperation = __pstl::__internal::__no_op; std::false_type = std::integral_constant<bool, false>]’:
/usr/include/c++/9/pstl/numeric_impl.h:141:60: required from ‘_Tp __pstl::__internal::__pattern_transform_reduce(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation, _IsVector, std::true_type) [with _ExecutionPolicy = const __pstl::execution::v1::parallel_policy&; _ForwardIterator = __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >; _Tp = glm::mat<2, 3, float, glm::packed_highp>; _BinaryOperation = util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >; _UnaryOperation = __pstl::__internal::__no_op; _IsVector = std::integral_constant<bool, false>; std::true_type = std::integral_constant<bool, true>]’
/usr/include/c++/9/pstl/glue_numeric_impl.h:85:50: required from ‘__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::transform_reduce(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation) [with _ExecutionPolicy = const __pstl::execution::v1::parallel_policy&; _ForwardIterator = __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >; _Tp = glm::mat<2, 3, float, glm::packed_highp>; _BinaryOperation = util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >; _UnaryOperation = __pstl::__internal::__no_op; __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> = glm::mat<2, 3, float, glm::packed_highp>]’
/usr/include/c++/9/pstl/glue_numeric_impl.h:28:28: required from ‘__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::reduce(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation) [with _ExecutionPolicy = const __pstl::execution::v1::parallel_policy&; _ForwardIterator = __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >; _Tp = glm::mat<2, 3, float, glm::packed_highp>; _BinaryOperation = util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >; __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> = glm::mat<2, 3, float, glm::packed_highp>]’
/home/tokyo/Graphics2/libraries/Rendering/Mesh.cpp:167:126: required from here
/usr/include/c++/9/pstl/numeric_impl.h:102:29: error: request for member ‘operator()’ is ambiguous
102 | __init = __binary_op(__init, __unary_op(__first));
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tokyo/Graphics2/libraries/Rendering/Mesh.cpp:163:9: note: candidates are: ‘Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)>’
163 | [](glm::mat2x3 b1, glm::vec3 b2) {return glm::mat2x3(glm::min(b1[0], b2), glm::max(b1[1], b2)); }
| ^
/home/tokyo/Graphics2/libraries/Rendering/Mesh.cpp:162:9: note: ‘Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>’
162 | [](glm::vec3 b1, glm::mat2x3 b2) {return glm::mat2x3(glm::min(b1, b2[0]), glm::max(b1, b2[1])); },
| ^
/home/tokyo/Graphics2/libraries/Rendering/Mesh.cpp:161:9: note: ‘Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>’
161 | [](glm::vec3 b1, glm::vec3 b2) {return glm::mat2x3(glm::min(b1, b2), glm::max(b1, b2)); },
| ^
/home/tokyo/Graphics2/libraries/Rendering/Mesh.cpp:160:9: note: ‘Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>’
160 | [](glm::mat2x3 b1, glm::mat2x3 b2) {return glm::mat2x3(glm::min(b1[0], b2[0]), glm::max(b1[1], b2[1])); },
| ^
In file included from /usr/include/c++/9/pstl/parallel_backend.h:14,
from /usr/include/c++/9/pstl/algorithm_impl.h:25,
from /usr/include/c++/9/pstl/glue_execution_defs.h:52,
from /usr/include/c++/9/execution:32,
from /home/tokyo/Graphics2/libraries/Rendering/Mesh.cpp:5:
/usr/include/c++/9/pstl/parallel_backend_tbb.h: In instantiation of ‘void __pstl::__par_backend::__par_trans_red_body<_Index, _Up, _Tp, _Cp, _Rp>::operator()(const tbb::blocked_range&) [with _Index = __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >; _Up = __pstl::__internal::__pattern_transform_reduce(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation, _IsVector, std::true_type) [with _ExecutionPolicy = const __pstl::execution::v1::parallel_policy&; _ForwardIterator = __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >; _Tp = glm::mat<2, 3, float, glm::packed_highp>; _BinaryOperation = util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >; _UnaryOperation = __pstl::__internal::__no_op; _IsVector = std::integral_constant<bool, false>; std::true_type = std::integral_constant<bool, true>]::<lambda()>::<lambda(__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >)>; _Tp = glm::mat<2, 3, float, glm::packed_highp>; _Cp = util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >; _Rp = __pstl::__internal::__pattern_transform_reduce(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation, _IsVector, std::true_type) [with _ExecutionPolicy = const __pstl::execution::v1::parallel_policy&; _ForwardIterator = __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >; _Tp = glm::mat<2, 3, float, glm::packed_highp>; _BinaryOperation = util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >; _UnaryOperation = __pstl::__internal::__no_op; _IsVector = std::integral_constant<bool, false>; std::true_type = std::integral_constant<bool, true>]::<lambda()>::<lambda(__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >, __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >, glm::mat<2, 3, float, glm::packed_highp>)>]’:
/usr/include/tbb/parallel_reduce.h:150:47: required from ‘void tbb::interface9::internal::start_reduce<Range, Body, Partitioner>::run_body(Range&) [with Range = tbb::blocked_range<__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > > >; Body = __pstl::__par_backend::__par_trans_red_body<__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >, __pstl::__internal::__pattern_transform_reduce(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation, _IsVector, std::true_type) [with _ExecutionPolicy = const __pstl::execution::v1::parallel_policy&; _ForwardIterator = __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >; _Tp = glm::mat<2, 3, float, glm::packed_highp>; _BinaryOperation = util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >; _UnaryOperation = __pstl::__internal::__no_op; _IsVector = std::integral_constant<bool, false>; std::true_type = std::integral_constant<bool, true>]::<lambda()>::<lambda(__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >)>, glm::mat<2, 3, float, glm::packed_highp>, util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >, __pstl::__internal::__pattern_transform_reduce(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation, _IsVector, std::true_type) [with _ExecutionPolicy = const __pstl::execution::v1::parallel_policy&; _ForwardIterator = __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >; _Tp = glm::mat<2, 3, float, glm::packed_highp>; _BinaryOperation = util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >; _UnaryOperation = __pstl::__internal::__no_op; _IsVector = std::integral_constant<bool, false>; std::true_type = std::integral_constant<bool, true>]::<lambda()>::<lambda(__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >, __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >, glm::mat<2, 3, float, glm::packed_highp>)> >; Partitioner = const tbb::auto_partitioner]’
/usr/include/tbb/partitioner.h:423:13: required from ‘void tbb::interface9::internal::dynamic_grainsize_mode::work_balance(StartType&, Range&) [with StartType = tbb::interface9::internal::start_reduce<tbb::blocked_range<__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > > >, __pstl::__par_backend::__par_trans_red_body<__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >, __pstl::__internal::__pattern_transform_reduce(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation, _IsVector, std::true_type) [with _ExecutionPolicy = const __pstl::execution::v1::parallel_policy&; _ForwardIterator = __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >; _Tp = glm::mat<2, 3, float, glm::packed_highp>; _BinaryOperation = util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >; _UnaryOperation = __pstl::__internal::__no_op; _IsVector = std::integral_constant<bool, false>; std::true_type = std::integral_constant<bool, true>]::<lambda()>::<lambda(__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >)>, glm::mat<2, 3, float, glm::packed_highp>, util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >, __pstl::__internal::__pattern_transform_reduce(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation, _IsVector, std::true_type) [with _ExecutionPolicy = const __pstl::execution::v1::parallel_policy&; _ForwardIterator = __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >; _Tp = glm::mat<2, 3, float, glm::packed_highp>; _BinaryOperation = util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >; _UnaryOperation = __pstl::__internal::__no_op; _IsVector = std::integral_constant<bool, false>; std::true_type = std::integral_constant<bool, true>]::<lambda()>::<lambda(__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >, __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >, glm::mat<2, 3, float, glm::packed_highp>)> >, const tbb::auto_partitioner>; Range = tbb::blocked_range<__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > > >; Mode = tbb::interface9::internal::adaptive_modetbb::interface9::internal::auto_partition_type]’
/usr/include/tbb/partitioner.h:256:9: required from ‘void tbb::interface9::internal::partition_type_base::execute(StartType&, Range&) [with StartType = tbb::interface9::internal::start_reduce<tbb::blocked_range<__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > > >, __pstl::__par_backend::__par_trans_red_body<__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >, __pstl::__internal::__pattern_transform_reduce(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation, _IsVector, std::true_type) [with _ExecutionPolicy = const __pstl::execution::v1::parallel_policy&; _ForwardIterator = __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >; _Tp = glm::mat<2, 3, float, glm::packed_highp>; _BinaryOperation = util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >; _UnaryOperation = __pstl::__internal::__no_op; _IsVector = std::integral_constant<bool, false>; std::true_type = std::integral_constant<bool, true>]::<lambda()>::<lambda(__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >)>, glm::mat<2, 3, float, glm::packed_highp>, util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >, __pstl::__internal::__pattern_transform_reduce(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation, _IsVector, std::true_type) [with _ExecutionPolicy = const __pstl::execution::v1::parallel_policy&; _ForwardIterator = __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >; _Tp = glm::mat<2, 3, float, glm::packed_highp>; _BinaryOperation = util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >; _UnaryOperation = __pstl::__internal::__no_op; _IsVector = std::integral_constant<bool, false>; std::true_type = std::integral_constant<bool, true>]::<lambda()>::<lambda(__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >, __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >, glm::mat<2, 3, float, glm::packed_highp>)> >, const tbb::auto_partitioner>; Range = tbb::blocked_range<__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > > >; Partition = tbb::interface9::internal::auto_partition_type]’
/usr/include/tbb/parallel_reduce.h:190:9: required from ‘tbb::task* tbb::interface9::internal::start_reduce<Range, Body, Partitioner>::execute() [with Range = tbb::blocked_range<__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > > >; Body = __pstl::__par_backend::__par_trans_red_body<__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >, __pstl::__internal::__pattern_transform_reduce(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation, _IsVector, std::true_type) [with _ExecutionPolicy = const __pstl::execution::v1::parallel_policy&; _ForwardIterator = __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >; _Tp = glm::mat<2, 3, float, glm::packed_highp>; _BinaryOperation = util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >; _UnaryOperation = __pstl::__internal::__no_op; _IsVector = std::integral_constant<bool, false>; std::true_type = std::integral_constant<bool, true>]::<lambda()>::<lambda(__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >)>, glm::mat<2, 3, float, glm::packed_highp>, util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >, __pstl::__internal::__pattern_transform_reduce(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation, _IsVector, std::true_type) [with _ExecutionPolicy = const __pstl::execution::v1::parallel_policy&; _ForwardIterator = __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >; _Tp = glm::mat<2, 3, float, glm::packed_highp>; _BinaryOperation = util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >; _UnaryOperation = __pstl::__internal::__no_op; _IsVector = std::integral_constant<bool, false>; std::true_type = std::integral_constant<bool, true>]::<lambda()>::<lambda(__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >, __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >, glm::mat<2, 3, float, glm::packed_highp>)> >; Partitioner = const tbb::auto_partitioner]’
/usr/include/tbb/parallel_reduce.h:181:11: required from here
/usr/include/c++/9/pstl/parallel_backend_tbb.h:176:13: error: request for member ‘operator()’ is ambiguous
176 | new (&_M_sum_storage)
| ^~~~~~~~~~~~~~~~~~~~~
177 | _Tp(_M_combine(_M_u(__i), _M_u(__i + 1))); // The condition i+1 < j is provided by the grain size of 3
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tokyo/Graphics2/libraries/Rendering/Mesh.cpp:163:9: note: candidates are: ‘Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)>’
163 | [](glm::mat2x3 b1, glm::vec3 b2) {return glm::mat2x3(glm::min(b1[0], b2), glm::max(b1[1], b2)); }
| ^
/home/tokyo/Graphics2/libraries/Rendering/Mesh.cpp:162:9: note: ‘Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>’
162 | [](glm::vec3 b1, glm::mat2x3 b2) {return glm::mat2x3(glm::min(b1, b2[0]), glm::max(b1, b2[1])); },
| ^
/home/tokyo/Graphics2/libraries/Rendering/Mesh.cpp:161:9: note: ‘Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>’
161 | [](glm::vec3 b1, glm::vec3 b2) {return glm::mat2x3(glm::min(b1, b2), glm::max(b1, b2)); },
| ^
/home/tokyo/Graphics2/libraries/Rendering/Mesh.cpp:160:9: note: ‘Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>’
160 | [](glm::mat2x3 b1, glm::mat2x3 b2) {return glm::mat2x3(glm::min(b1[0], b2[0]), glm::max(b1[1], b2[1])); },
| ^
In file included from /usr/include/c++/9/pstl/parallel_backend.h:14,
from /usr/include/c++/9/pstl/algorithm_impl.h:25,
from /usr/include/c++/9/pstl/glue_execution_defs.h:52,
from /usr/include/c++/9/execution:32,
from /home/tokyo/Graphics2/libraries/Rendering/Mesh.cpp:5:
/usr/include/c++/9/pstl/parallel_backend_tbb.h: In instantiation of ‘void __pstl::__par_backend::__par_trans_red_body<_Index, _Up, _Tp, _Cp, _Rp>::join(__pstl::__par_backend::__par_trans_red_body<_Index, _Up, _Tp, _Cp, _Rp>&) [with _Index = __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >; _Up = __pstl::__internal::__pattern_transform_reduce(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation, _IsVector, std::true_type) [with _ExecutionPolicy = const __pstl::execution::v1::parallel_policy&; _ForwardIterator = __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >; _Tp = glm::mat<2, 3, float, glm::packed_highp>; _BinaryOperation = util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >; _UnaryOperation = __pstl::__internal::__no_op; _IsVector = std::integral_constant<bool, false>; std::true_type = std::integral_constant<bool, true>]::<lambda()>::<lambda(__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >)>; _Tp = glm::mat<2, 3, float, glm::packed_highp>; _Cp = util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >; _Rp = __pstl::__internal::__pattern_transform_reduce(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation, _IsVector, std::true_type) [with _ExecutionPolicy = const __pstl::execution::v1::parallel_policy&; _ForwardIterator = __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >; _Tp = glm::mat<2, 3, float, glm::packed_highp>; _BinaryOperation = util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >; _UnaryOperation = __pstl::__internal::__no_op; _IsVector = std::integral_constant<bool, false>; std::true_type = std::integral_constant<bool, true>]::<lambda()>::<lambda(__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >, __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >, glm::mat<2, 3, float, glm::packed_highp>)>]’:
/usr/include/tbb/parallel_reduce.h:68:17: required from ‘tbb::task tbb::interface9::internal::finish_reduce::execute() [with Body = __pstl::__par_backend::__par_trans_red_body<__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >, __pstl::__internal::__pattern_transform_reduce(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation, _IsVector, std::true_type) [with _ExecutionPolicy = const __pstl::execution::v1::parallel_policy&; _ForwardIterator = __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >; _Tp = glm::mat<2, 3, float, glm::packed_highp>; _BinaryOperation = util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >; _UnaryOperation = __pstl::__internal::__no_op; _IsVector = std::integral_constant<bool, false>; std::true_type = std::integral_constant<bool, true>]::<lambda()>::<lambda(__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >)>, glm::mat<2, 3, float, glm::packed_highp>, util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >, __pstl::__internal::__pattern_transform_reduce(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Tp, _BinaryOperation, _UnaryOperation, _IsVector, std::true_type) [with _ExecutionPolicy = const __pstl::execution::v1::parallel_policy&; _ForwardIterator = __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >; _Tp = glm::mat<2, 3, float, glm::packed_highp>; _BinaryOperation = util::overload<Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>, Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>, Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)> >; _UnaryOperation = __pstl::__internal::__no_op; _IsVector = std::integral_constant<bool, false>; std::true_type = std::integral_constant<bool, true>]::<lambda()>::<lambda(__gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >, __gnu_cxx::__normal_iterator<const glm::vec<3, float, glm::packed_highp>, std::vector<glm::vec<3, float, glm::packed_highp> > >, glm::mat<2, 3, float, glm::packed_highp>)> >]’
/usr/include/tbb/parallel_reduce.h:64:15: required from here
/usr/include/c++/9/pstl/parallel_backend_tbb.h:165:15: error: request for member ‘operator()’ is ambiguous
165 | sum() = _M_combine(sum(), __rhs.sum());
/home/tokyo/Graphics2/libraries/Rendering/Mesh.cpp:163:9: note: candidates are: ‘Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::vec3)>’
163 | [](glm::mat2x3 b1, glm::vec3 b2) {return glm::mat2x3(glm::min(b1[0], b2), glm::max(b1[1], b2)); }
| ^
/home/tokyo/Graphics2/libraries/Rendering/Mesh.cpp:162:9: note: ‘Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::mat2x3)>’
162 | [](glm::vec3 b1, glm::mat2x3 b2) {return glm::mat2x3(glm::min(b1, b2[0]), glm::max(b1, b2[1])); },
| ^
/home/tokyo/Graphics2/libraries/Rendering/Mesh.cpp:161:9: note: ‘Mesh::calculateBoundingBox()::<lambda(glm::vec3, glm::vec3)>’
161 | [](glm::vec3 b1, glm::vec3 b2) {return glm::mat2x3(glm::min(b1, b2), glm::max(b1, b2)); },
| ^
/home/tokyo/Graphics2/libraries/Rendering/Mesh.cpp:160:9: note: ‘Mesh::calculateBoundingBox()::<lambda(glm::mat2x3, glm::mat2x3)>’
160 | [](glm::mat2x3 b1, glm::mat2x3 b2) {return glm::mat2x3(glm::min(b1[0], b2[0]), glm::max(b1[1], b2[1])); },
| ^
make[2]: *** [CMakeFiles/Rendering.dir/build.make:167: CMakeFiles/Rendering.dir/libraries/Rendering/Mesh.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:303: CMakeFiles/Rendering.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
"
So apparently there is a problem with an overloading mechanism defined in ../libraries/Utils/UtilCollection.h:
"
...
/**
* \brief Container for overloaded functions/lambdas
*/
template<class... Fs>
struct overload : Fs...
{
overload(Fs&&... fs)
: Fs(std::move(fs))...
{}
};
...
"
This is then applied in ../libraries/Rendering/Mesh.cpp:
"
...
const glm::mat2x3& Mesh::calculateBoundingBox()
{
auto minMaxFun = util::make_overload(
[](glm::mat2x3 b1, glm::mat2x3 b2) {return glm::mat2x3(glm::min(b1[0], b2[0]), glm::max(b1[1], b2[1])); },
[](glm::vec3 b1, glm::vec3 b2) {return glm::mat2x3(glm::min(b1, b2), glm::max(b1, b2)); },
[](glm::vec3 b1, glm::mat2x3 b2) {return glm::mat2x3(glm::min(b1, b2[0]), glm::max(b1, b2[1])); },
[](glm::mat2x3 b1, glm::vec3 b2) {return glm::mat2x3(glm::min(b1[0], b2), glm::max(b1[1], b2)); }
);
}
...
"
However, the parallel STL lib does not understand how to work with this overloading.
Could you please see if this could be alleviated somehow, since it would be great to have this code run on Linux. I intend to make more tests and could help people with rendering real time volumetric light effects on Linux, but right now I am stuck at the compilation stage and any help/hints would be appreciated.
The text was updated successfully, but these errors were encountered: