mitsuba-renderer / mitsuba

Mitsuba renderer main repository
GNU General Public License v3.0
1.05k stars 321 forks source link

Build error, no matching call to ph::bind in irawan.h #103

Open adrianroth10 opened 5 years ago

adrianroth10 commented 5 years ago

Trying to build on Ubuntu 18.04.2 LTS and have tried following guide in the documentation and one other. Both result in the same issue and I would appreciate any help I can get.

When compiling the irawan.cpp file the error seems to be connected to a function ph::bind from the boost library where no matching function is found for the call. The full output is printed below:

$ scons
scons: Reading SConscript files ...
Using configuation file "/home/adrian/mitsuba/config.py"
Checking for Qt 4.x... yes
Checking for g++ ...(cached) yes
Checking for C header file png.h... (cached) yes
Checking for C header file jpeglib.h... (cached) yes
Checking for C++ header file ImfRgba.h... (cached) yes
Checking for C++ header file xercesc/dom/DOMLSParser.hpp... (cached) yes
Checking for C++ header file dae.h... (cached) no
COLLADA DOM is missing: not building the COLLADA importer
Checking for C++ header file pyconfig.h... (cached) yes
Checking for C++ header file boost/version.hpp... (cached) yes
Checking for C++ header file Eigen/Core... (cached) yes
Checking for C++ header file fftw3.h... (cached) yes
Checking for C header file GL/gl.h... (cached) yes
Checking for C header file GL/glu.h... (cached) yes
Checking for C header file GL/glext.h... (cached) yes
Checking for C header file GL/glew.h... (cached) yes
Checking for C type GLEWContext... (cached) yes
Checking for C header file X11/extensions/xf86vmode.h... (cached) yes
Checking for Mitsuba version .. 0.5.0
scons: done reading SConscript files.
scons: Building targets ...
g++ -o build/release/bsdfs/irawan.os -c -Wall -pipe -march=nocona -msse2 -ftree-vectorize -mfpmath=sse -funsafe-math-optimizations -fno-rounding-math -fno-signaling-nans -fno-math-errno -fomit-frame-pointer -DMTS_DEBUG -DSINGLE_PRECISION -DSPECTRUM_SAMPLES=3 -DMTS_SSE -DMTS_HAS_COHERENT_RT -fopenmp -fvisibility=hidden -mtls-dialect=gnu2 -Os -fPIC -DMTS_HAS_LIBPNG=1 -DMTS_HAS_LIBJPEG=1 -DMTS_HAS_OPENEXR=1 -DMTS_HAS_FFTW=1 -I/usr/include/eigen3 -I/usr/include/OpenEXR -Iinclude src/bsdfs/irawan.cpp
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h: In constructor ‘mitsuba::YarnGrammar<Iterator>::YarnGrammar(const mitsuba::Properties&)’:
src/bsdfs/irawan.h:314:84: error: no matching function for call to ‘bind(<unresolved overloaded function type>, const type, const _1_type&)’
        | (identifier [ _val = ph::bind(&Properties::getSpectrum, ph::ref(props), _1)]);
                                                                                    ^
In file included from /usr/include/boost/phoenix/bind.hpp:11:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_function.hpp:58:5: note: candidate: template<class RT, class ... T, class ... A> const typename boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::function_ptr<RT, RT (*)(T ...)>, A ...>::type boost::phoenix::bind(RT (*)(T ...), const A& ...)
     bind(RT (*f)(T...), A const&... a)
     ^~~~
/usr/include/boost/phoenix/bind/bind_function.hpp:58:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:314:84: note:   mismatched types ‘RT (*)(T ...)’ and ‘mitsuba::Spectrum (mitsuba::Properties::*)(const string&, const mitsuba::Spectrum&) const {aka mitsuba::Spectrum (mitsuba::Properties::*)(const std::__cxx11::basic_string<char>&, const mitsuba::Spectrum&) const}’
        | (identifier [ _val = ph::bind(&Properties::getSpectrum, ph::ref(props), _1)]);
                                                                                    ^
src/bsdfs/irawan.h:314:84: note:   mismatched types ‘RT (*)(T ...)’ and ‘mitsuba::Spectrum (mitsuba::Properties::*)(const string&) const {aka mitsuba::Spectrum (mitsuba::Properties::*)(const std::__cxx11::basic_string<char>&) const}’
src/bsdfs/irawan.h:314:84: note:   could not resolve address from overloaded function ‘& mitsuba::Properties::getSpectrum’
In file included from /usr/include/boost/phoenix/bind.hpp:12:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_function_object.hpp:24:5: note: candidate: template<class F> const typename boost::phoenix::detail::expression::function_eval<F>::type boost::phoenix::bind(F)
     bind(F f)
     ^~~~
/usr/include/boost/phoenix/bind/bind_function_object.hpp:24:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:314:84: note:   candidate expects 1 argument, 3 provided
        | (identifier [ _val = ph::bind(&Properties::getSpectrum, ph::ref(props), _1)]);
                                                                                    ^
In file included from /usr/include/boost/phoenix/bind.hpp:12:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_function_object.hpp:31:5: note: candidate: template<class F, class ... A> const typename boost::phoenix::detail::expression::function_eval<A0, A>::type boost::phoenix::bind(F, const A& ...)
     bind(F f, A const&... a)
     ^~~~
/usr/include/boost/phoenix/bind/bind_function_object.hpp:31:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:314:84: note:   couldn't deduce template parameter ‘F’
        | (identifier [ _val = ph::bind(&Properties::getSpectrum, ph::ref(props), _1)]);
                                                                                    ^
In file included from /usr/include/boost/phoenix/bind.hpp:13:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_member_function.hpp:70:5: note: candidate: template<class RT, class ClassT, class ... T, class ClassA, class ... A> const typename boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::member_function_ptr<RT, RT (ClassT::*)(T ...)>, ClassA, A ...>::type boost::phoenix::bind(RT (ClassT::*)(T ...), const ClassA&, const A& ...)
     bind(RT (ClassT::*f)(T...), ClassA const & obj, A const&... a)
     ^~~~
/usr/include/boost/phoenix/bind/bind_member_function.hpp:70:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:314:84: note:   types ‘RT (ClassT::)(T ...)’ and ‘mitsuba::Spectrum (mitsuba::Properties::)(const string&, const mitsuba::Spectrum&) const {aka mitsuba::Spectrum (mitsuba::Properties::)(const std::__cxx11::basic_string<char>&, const mitsuba::Spectrum&) const}’ have incompatible cv-qualifiers
        | (identifier [ _val = ph::bind(&Properties::getSpectrum, ph::ref(props), _1)]);
                                                                                    ^
src/bsdfs/irawan.h:314:84: note:   types ‘RT (ClassT::)(T ...)’ and ‘mitsuba::Spectrum (mitsuba::Properties::)(const string&) const {aka mitsuba::Spectrum (mitsuba::Properties::)(const std::__cxx11::basic_string<char>&) const}’ have incompatible cv-qualifiers
src/bsdfs/irawan.h:314:84: note:   could not resolve address from overloaded function ‘& mitsuba::Properties::getSpectrum’
In file included from /usr/include/boost/phoenix/bind.hpp:13:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_member_function.hpp:83:5: note: candidate: template<class RT, class ClassT, class ... T, class ClassA, class ... A> const typename boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::member_function_ptr<RT, RT (ClassT::*)(T ...) const>, ClassA, A ...>::type boost::phoenix::bind(RT (ClassT::*)(T ...) const, const ClassA&, const A& ...)
     bind(RT (ClassT::*f)(T...) const, ClassA const & obj, A const&... a)
     ^~~~
/usr/include/boost/phoenix/bind/bind_member_function.hpp:83:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:314:84: note:   couldn't deduce template parameter ‘RT’
        | (identifier [ _val = ph::bind(&Properties::getSpectrum, ph::ref(props), _1)]);
                                                                                    ^
In file included from /usr/include/boost/phoenix/bind.hpp:13:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_member_function.hpp:96:5: note: candidate: template<class RT, class ClassT, class ... T, class ... A> const typename boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::member_function_ptr<RT, RT (ClassT::*)(T ...)>, ClassT, A ...>::type boost::phoenix::bind(RT (ClassT::*)(T ...), ClassT&, const A& ...)
     bind(RT (ClassT::*f)(T...), ClassT & obj, A const&... a)
     ^~~~
/usr/include/boost/phoenix/bind/bind_member_function.hpp:96:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:314:84: note:   types ‘RT (ClassT::)(T ...)’ and ‘mitsuba::Spectrum (mitsuba::Properties::)(const string&, const mitsuba::Spectrum&) const {aka mitsuba::Spectrum (mitsuba::Properties::)(const std::__cxx11::basic_string<char>&, const mitsuba::Spectrum&) const}’ have incompatible cv-qualifiers
        | (identifier [ _val = ph::bind(&Properties::getSpectrum, ph::ref(props), _1)]);
                                                                                    ^
src/bsdfs/irawan.h:314:84: note:   types ‘RT (ClassT::)(T ...)’ and ‘mitsuba::Spectrum (mitsuba::Properties::)(const string&) const {aka mitsuba::Spectrum (mitsuba::Properties::)(const std::__cxx11::basic_string<char>&) const}’ have incompatible cv-qualifiers
src/bsdfs/irawan.h:314:84: note:   could not resolve address from overloaded function ‘& mitsuba::Properties::getSpectrum’
In file included from /usr/include/boost/phoenix/bind.hpp:13:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_member_function.hpp:109:5: note: candidate: template<class RT, class ClassT, class ... T, class ... A> const typename boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::member_function_ptr<RT, RT (ClassT::*)(T ...) const>, ClassT, A ...>::type boost::phoenix::bind(RT (ClassT::*)(T ...) const, const ClassT&, const A& ...)
     bind(RT (ClassT::*f)(T...) const, ClassT const& obj, A const&... a)
     ^~~~
/usr/include/boost/phoenix/bind/bind_member_function.hpp:109:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:314:84: note:   couldn't deduce template parameter ‘RT’
        | (identifier [ _val = ph::bind(&Properties::getSpectrum, ph::ref(props), _1)]);
                                                                                    ^
In file included from /usr/include/boost/phoenix/bind.hpp:14:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_member_variable.hpp:28:5: note: candidate: template<class RT, class ClassT, class ClassA> const typename boost::lazy_disable_if<boost::is_member_function_pointer<RT ClassT::*>, boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::member_variable<RT, RT ClassT::*>, ClassA> >::type boost::phoenix::bind(RT ClassT::*, const ClassA&)
     bind(RT ClassT::*mp, ClassA const& obj)
     ^~~~
/usr/include/boost/phoenix/bind/bind_member_variable.hpp:28:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:314:84: note:   candidate expects 2 arguments, 3 provided
        | (identifier [ _val = ph::bind(&Properties::getSpectrum, ph::ref(props), _1)]);
                                                                                    ^
In file included from /usr/include/boost/phoenix/bind.hpp:14:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_member_variable.hpp:44:5: note: candidate: template<class RT, class ClassT> const typename boost::lazy_disable_if<boost::is_member_function_pointer<RT ClassT::*>, boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::member_variable<RT, RT ClassT::*>, ClassT> >::type boost::phoenix::bind(RT ClassT::*, ClassT&)
     bind(RT ClassT::*mp, ClassT& obj)
     ^~~~
/usr/include/boost/phoenix/bind/bind_member_variable.hpp:44:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:314:84: note:   candidate expects 2 arguments, 3 provided
        | (identifier [ _val = ph::bind(&Properties::getSpectrum, ph::ref(props), _1)]);
                                                                                    ^
src/bsdfs/irawan.h:317:80: error: no matching function for call to ‘bind(<unresolved overloaded function type>, const type, const _1_type&)’
       | (identifier [ _val = ph::bind(&Properties::getFloat, ph::ref(props), _1)]);
                                                                                ^
In file included from /usr/include/boost/phoenix/bind.hpp:11:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_function.hpp:58:5: note: candidate: template<class RT, class ... T, class ... A> const typename boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::function_ptr<RT, RT (*)(T ...)>, A ...>::type boost::phoenix::bind(RT (*)(T ...), const A& ...)
     bind(RT (*f)(T...), A const&... a)
     ^~~~
/usr/include/boost/phoenix/bind/bind_function.hpp:58:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:317:80: note:   mismatched types ‘RT (*)(T ...)’ and ‘mitsuba::Float (mitsuba::Properties::*)(const string&, const Float&) const {aka float (mitsuba::Properties::*)(const std::__cxx11::basic_string<char>&, const float&) const}’
       | (identifier [ _val = ph::bind(&Properties::getFloat, ph::ref(props), _1)]);
                                                                                ^
src/bsdfs/irawan.h:317:80: note:   mismatched types ‘RT (*)(T ...)’ and ‘mitsuba::Float (mitsuba::Properties::*)(const string&) const {aka float (mitsuba::Properties::*)(const std::__cxx11::basic_string<char>&) const}’
src/bsdfs/irawan.h:317:80: note:   could not resolve address from overloaded function ‘& mitsuba::Properties::getFloat’
In file included from /usr/include/boost/phoenix/bind.hpp:12:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_function_object.hpp:24:5: note: candidate: template<class F> const typename boost::phoenix::detail::expression::function_eval<F>::type boost::phoenix::bind(F)
     bind(F f)
     ^~~~
/usr/include/boost/phoenix/bind/bind_function_object.hpp:24:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:317:80: note:   candidate expects 1 argument, 3 provided
       | (identifier [ _val = ph::bind(&Properties::getFloat, ph::ref(props), _1)]);
                                                                                ^
In file included from /usr/include/boost/phoenix/bind.hpp:12:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_function_object.hpp:31:5: note: candidate: template<class F, class ... A> const typename boost::phoenix::detail::expression::function_eval<A0, A>::type boost::phoenix::bind(F, const A& ...)
     bind(F f, A const&... a)
     ^~~~
/usr/include/boost/phoenix/bind/bind_function_object.hpp:31:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:317:80: note:   couldn't deduce template parameter ‘F’
       | (identifier [ _val = ph::bind(&Properties::getFloat, ph::ref(props), _1)]);
                                                                                ^
In file included from /usr/include/boost/phoenix/bind.hpp:13:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_member_function.hpp:70:5: note: candidate: template<class RT, class ClassT, class ... T, class ClassA, class ... A> const typename boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::member_function_ptr<RT, RT (ClassT::*)(T ...)>, ClassA, A ...>::type boost::phoenix::bind(RT (ClassT::*)(T ...), const ClassA&, const A& ...)
     bind(RT (ClassT::*f)(T...), ClassA const & obj, A const&... a)
     ^~~~
/usr/include/boost/phoenix/bind/bind_member_function.hpp:70:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:317:80: note:   types ‘RT (ClassT::)(T ...)’ and ‘mitsuba::Float (mitsuba::Properties::)(const string&, const Float&) const {aka float (mitsuba::Properties::)(const std::__cxx11::basic_string<char>&, const float&) const}’ have incompatible cv-qualifiers
       | (identifier [ _val = ph::bind(&Properties::getFloat, ph::ref(props), _1)]);
                                                                                ^
src/bsdfs/irawan.h:317:80: note:   types ‘RT (ClassT::)(T ...)’ and ‘mitsuba::Float (mitsuba::Properties::)(const string&) const {aka float (mitsuba::Properties::)(const std::__cxx11::basic_string<char>&) const}’ have incompatible cv-qualifiers
src/bsdfs/irawan.h:317:80: note:   could not resolve address from overloaded function ‘& mitsuba::Properties::getFloat’
In file included from /usr/include/boost/phoenix/bind.hpp:13:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_member_function.hpp:83:5: note: candidate: template<class RT, class ClassT, class ... T, class ClassA, class ... A> const typename boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::member_function_ptr<RT, RT (ClassT::*)(T ...) const>, ClassA, A ...>::type boost::phoenix::bind(RT (ClassT::*)(T ...) const, const ClassA&, const A& ...)
     bind(RT (ClassT::*f)(T...) const, ClassA const & obj, A const&... a)
     ^~~~
/usr/include/boost/phoenix/bind/bind_member_function.hpp:83:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:317:80: note:   couldn't deduce template parameter ‘RT’
       | (identifier [ _val = ph::bind(&Properties::getFloat, ph::ref(props), _1)]);
                                                                                ^
In file included from /usr/include/boost/phoenix/bind.hpp:13:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_member_function.hpp:96:5: note: candidate: template<class RT, class ClassT, class ... T, class ... A> const typename boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::member_function_ptr<RT, RT (ClassT::*)(T ...)>, ClassT, A ...>::type boost::phoenix::bind(RT (ClassT::*)(T ...), ClassT&, const A& ...)
     bind(RT (ClassT::*f)(T...), ClassT & obj, A const&... a)
     ^~~~
/usr/include/boost/phoenix/bind/bind_member_function.hpp:96:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:317:80: note:   types ‘RT (ClassT::)(T ...)’ and ‘mitsuba::Float (mitsuba::Properties::)(const string&, const Float&) const {aka float (mitsuba::Properties::)(const std::__cxx11::basic_string<char>&, const float&) const}’ have incompatible cv-qualifiers
       | (identifier [ _val = ph::bind(&Properties::getFloat, ph::ref(props), _1)]);
                                                                                ^
src/bsdfs/irawan.h:317:80: note:   types ‘RT (ClassT::)(T ...)’ and ‘mitsuba::Float (mitsuba::Properties::)(const string&) const {aka float (mitsuba::Properties::)(const std::__cxx11::basic_string<char>&) const}’ have incompatible cv-qualifiers
src/bsdfs/irawan.h:317:80: note:   could not resolve address from overloaded function ‘& mitsuba::Properties::getFloat’
In file included from /usr/include/boost/phoenix/bind.hpp:13:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_member_function.hpp:109:5: note: candidate: template<class RT, class ClassT, class ... T, class ... A> const typename boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::member_function_ptr<RT, RT (ClassT::*)(T ...) const>, ClassT, A ...>::type boost::phoenix::bind(RT (ClassT::*)(T ...) const, const ClassT&, const A& ...)
     bind(RT (ClassT::*f)(T...) const, ClassT const& obj, A const&... a)
     ^~~~
/usr/include/boost/phoenix/bind/bind_member_function.hpp:109:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:317:80: note:   couldn't deduce template parameter ‘RT’
       | (identifier [ _val = ph::bind(&Properties::getFloat, ph::ref(props), _1)]);
                                                                                ^
In file included from /usr/include/boost/phoenix/bind.hpp:14:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_member_variable.hpp:28:5: note: candidate: template<class RT, class ClassT, class ClassA> const typename boost::lazy_disable_if<boost::is_member_function_pointer<RT ClassT::*>, boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::member_variable<RT, RT ClassT::*>, ClassA> >::type boost::phoenix::bind(RT ClassT::*, const ClassA&)
     bind(RT ClassT::*mp, ClassA const& obj)
     ^~~~
/usr/include/boost/phoenix/bind/bind_member_variable.hpp:28:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:317:80: note:   candidate expects 2 arguments, 3 provided
       | (identifier [ _val = ph::bind(&Properties::getFloat, ph::ref(props), _1)]);
                                                                                ^
In file included from /usr/include/boost/phoenix/bind.hpp:14:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_member_variable.hpp:44:5: note: candidate: template<class RT, class ClassT> const typename boost::lazy_disable_if<boost::is_member_function_pointer<RT ClassT::*>, boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::member_variable<RT, RT ClassT::*>, ClassT> >::type boost::phoenix::bind(RT ClassT::*, ClassT&)
     bind(RT ClassT::*mp, ClassT& obj)
     ^~~~
/usr/include/boost/phoenix/bind/bind_member_variable.hpp:44:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:317:80: note:   candidate expects 2 arguments, 3 provided
       | (identifier [ _val = ph::bind(&Properties::getFloat, ph::ref(props), _1)]);
                                                                                ^
src/bsdfs/irawan.h: In constructor ‘mitsuba::WeavePatternGrammar<Iterator>::WeavePatternGrammar(const mitsuba::Properties&)’:
src/bsdfs/irawan.h:367:82: error: no matching function for call to ‘bind(<unresolved overloaded function type>, const type, const _1_type&)’
         | (identifier [ _val = ph::bind(&Properties::getFloat, ph::ref(props), _1)]);
                                                                                  ^
In file included from /usr/include/boost/phoenix/bind.hpp:11:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_function.hpp:58:5: note: candidate: template<class RT, class ... T, class ... A> const typename boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::function_ptr<RT, RT (*)(T ...)>, A ...>::type boost::phoenix::bind(RT (*)(T ...), const A& ...)
     bind(RT (*f)(T...), A const&... a)
     ^~~~
/usr/include/boost/phoenix/bind/bind_function.hpp:58:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:367:82: note:   mismatched types ‘RT (*)(T ...)’ and ‘mitsuba::Float (mitsuba::Properties::*)(const string&, const Float&) const {aka float (mitsuba::Properties::*)(const std::__cxx11::basic_string<char>&, const float&) const}’
         | (identifier [ _val = ph::bind(&Properties::getFloat, ph::ref(props), _1)]);
                                                                                  ^
src/bsdfs/irawan.h:367:82: note:   mismatched types ‘RT (*)(T ...)’ and ‘mitsuba::Float (mitsuba::Properties::*)(const string&) const {aka float (mitsuba::Properties::*)(const std::__cxx11::basic_string<char>&) const}’
src/bsdfs/irawan.h:367:82: note:   could not resolve address from overloaded function ‘& mitsuba::Properties::getFloat’
In file included from /usr/include/boost/phoenix/bind.hpp:12:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_function_object.hpp:24:5: note: candidate: template<class F> const typename boost::phoenix::detail::expression::function_eval<F>::type boost::phoenix::bind(F)
     bind(F f)
     ^~~~
/usr/include/boost/phoenix/bind/bind_function_object.hpp:24:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:367:82: note:   candidate expects 1 argument, 3 provided
         | (identifier [ _val = ph::bind(&Properties::getFloat, ph::ref(props), _1)]);
                                                                                  ^
In file included from /usr/include/boost/phoenix/bind.hpp:12:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_function_object.hpp:31:5: note: candidate: template<class F, class ... A> const typename boost::phoenix::detail::expression::function_eval<A0, A>::type boost::phoenix::bind(F, const A& ...)
     bind(F f, A const&... a)
     ^~~~
/usr/include/boost/phoenix/bind/bind_function_object.hpp:31:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:367:82: note:   couldn't deduce template parameter ‘F’
         | (identifier [ _val = ph::bind(&Properties::getFloat, ph::ref(props), _1)]);
                                                                                  ^
In file included from /usr/include/boost/phoenix/bind.hpp:13:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_member_function.hpp:70:5: note: candidate: template<class RT, class ClassT, class ... T, class ClassA, class ... A> const typename boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::member_function_ptr<RT, RT (ClassT::*)(T ...)>, ClassA, A ...>::type boost::phoenix::bind(RT (ClassT::*)(T ...), const ClassA&, const A& ...)
     bind(RT (ClassT::*f)(T...), ClassA const & obj, A const&... a)
     ^~~~
/usr/include/boost/phoenix/bind/bind_member_function.hpp:70:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:367:82: note:   types ‘RT (ClassT::)(T ...)’ and ‘mitsuba::Float (mitsuba::Properties::)(const string&, const Float&) const {aka float (mitsuba::Properties::)(const std::__cxx11::basic_string<char>&, const float&) const}’ have incompatible cv-qualifiers
         | (identifier [ _val = ph::bind(&Properties::getFloat, ph::ref(props), _1)]);
                                                                                  ^
src/bsdfs/irawan.h:367:82: note:   types ‘RT (ClassT::)(T ...)’ and ‘mitsuba::Float (mitsuba::Properties::)(const string&) const {aka float (mitsuba::Properties::)(const std::__cxx11::basic_string<char>&) const}’ have incompatible cv-qualifiers
src/bsdfs/irawan.h:367:82: note:   could not resolve address from overloaded function ‘& mitsuba::Properties::getFloat’
In file included from /usr/include/boost/phoenix/bind.hpp:13:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_member_function.hpp:83:5: note: candidate: template<class RT, class ClassT, class ... T, class ClassA, class ... A> const typename boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::member_function_ptr<RT, RT (ClassT::*)(T ...) const>, ClassA, A ...>::type boost::phoenix::bind(RT (ClassT::*)(T ...) const, const ClassA&, const A& ...)
     bind(RT (ClassT::*f)(T...) const, ClassA const & obj, A const&... a)
     ^~~~
/usr/include/boost/phoenix/bind/bind_member_function.hpp:83:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:367:82: note:   couldn't deduce template parameter ‘RT’
         | (identifier [ _val = ph::bind(&Properties::getFloat, ph::ref(props), _1)]);
                                                                                  ^
In file included from /usr/include/boost/phoenix/bind.hpp:13:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_member_function.hpp:96:5: note: candidate: template<class RT, class ClassT, class ... T, class ... A> const typename boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::member_function_ptr<RT, RT (ClassT::*)(T ...)>, ClassT, A ...>::type boost::phoenix::bind(RT (ClassT::*)(T ...), ClassT&, const A& ...)
     bind(RT (ClassT::*f)(T...), ClassT & obj, A const&... a)
     ^~~~
/usr/include/boost/phoenix/bind/bind_member_function.hpp:96:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:367:82: note:   types ‘RT (ClassT::)(T ...)’ and ‘mitsuba::Float (mitsuba::Properties::)(const string&, const Float&) const {aka float (mitsuba::Properties::)(const std::__cxx11::basic_string<char>&, const float&) const}’ have incompatible cv-qualifiers
         | (identifier [ _val = ph::bind(&Properties::getFloat, ph::ref(props), _1)]);
                                                                                  ^
src/bsdfs/irawan.h:367:82: note:   types ‘RT (ClassT::)(T ...)’ and ‘mitsuba::Float (mitsuba::Properties::)(const string&) const {aka float (mitsuba::Properties::)(const std::__cxx11::basic_string<char>&) const}’ have incompatible cv-qualifiers
src/bsdfs/irawan.h:367:82: note:   could not resolve address from overloaded function ‘& mitsuba::Properties::getFloat’
In file included from /usr/include/boost/phoenix/bind.hpp:13:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_member_function.hpp:109:5: note: candidate: template<class RT, class ClassT, class ... T, class ... A> const typename boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::member_function_ptr<RT, RT (ClassT::*)(T ...) const>, ClassT, A ...>::type boost::phoenix::bind(RT (ClassT::*)(T ...) const, const ClassT&, const A& ...)
     bind(RT (ClassT::*f)(T...) const, ClassT const& obj, A const&... a)
     ^~~~
/usr/include/boost/phoenix/bind/bind_member_function.hpp:109:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:367:82: note:   couldn't deduce template parameter ‘RT’
         | (identifier [ _val = ph::bind(&Properties::getFloat, ph::ref(props), _1)]);
                                                                                  ^
In file included from /usr/include/boost/phoenix/bind.hpp:14:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_member_variable.hpp:28:5: note: candidate: template<class RT, class ClassT, class ClassA> const typename boost::lazy_disable_if<boost::is_member_function_pointer<RT ClassT::*>, boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::member_variable<RT, RT ClassT::*>, ClassA> >::type boost::phoenix::bind(RT ClassT::*, const ClassA&)
     bind(RT ClassT::*mp, ClassA const& obj)
     ^~~~
/usr/include/boost/phoenix/bind/bind_member_variable.hpp:28:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:367:82: note:   candidate expects 2 arguments, 3 provided
         | (identifier [ _val = ph::bind(&Properties::getFloat, ph::ref(props), _1)]);
                                                                                  ^
In file included from /usr/include/boost/phoenix/bind.hpp:14:0,
                 from /usr/include/boost/spirit/include/phoenix_bind.hpp:11,
                 from src/bsdfs/irawan.h:27,
                 from src/bsdfs/irawan.cpp:33:
/usr/include/boost/phoenix/bind/bind_member_variable.hpp:44:5: note: candidate: template<class RT, class ClassT> const typename boost::lazy_disable_if<boost::is_member_function_pointer<RT ClassT::*>, boost::phoenix::detail::expression::function_eval<boost::phoenix::detail::member_variable<RT, RT ClassT::*>, ClassT> >::type boost::phoenix::bind(RT ClassT::*, ClassT&)
     bind(RT ClassT::*mp, ClassT& obj)
     ^~~~
/usr/include/boost/phoenix/bind/bind_member_variable.hpp:44:5: note:   template argument deduction/substitution failed:
In file included from src/bsdfs/irawan.cpp:33:0:
src/bsdfs/irawan.h:367:82: note:   candidate expects 2 arguments, 3 provided
         | (identifier [ _val = ph::bind(&Properties::getFloat, ph::ref(props), _1)]);
                                                                                  ^
scons: *** [build/release/bsdfs/irawan.os] Error 1
scons: building terminated because of errors.
therealjacobbrauer commented 4 years ago

I'm having the same problem when using scons, I'll reply if I figure it out. You haven't happened to figure it out by now, have you?

adrianroth10 commented 4 years ago

Nope sorry, I gave up.

DoubleQ0726 commented 4 years ago

so how to solve it?please

sohee-zoe commented 4 years ago

so how to solve it?please

reference https://cgcvtutorials.wordpress.com/2017/05/31/install-mitsuba-on-linux-16-04/

SOLUTION: modify « src/bsdfs/irawan.h » :

Line : #if BOOST_VERSION >= 106000

Becomes : #if BOOST_VERSION >= 105800

RE : http://stackoverflow.com/questions/3680

In my case, I can't solve.

sohee-zoe commented 4 years ago

Change mitsuba/src/bsdfs/irawan.h to https://github.com/shi-jian/mitsuba-shapenet/blob/master/src/bsdfs/irawan.h

frcsdes commented 4 years ago

The problem here is that Properties::getFloat and Properties::getSpectrum are overloaded functions, so asking for their address is ambiguous: the compiler says <unresolved overloaded function type>.

To solve this ambiguity, you can specify which overload to use. It should be the version taking a single string: &Properties::getFloat becomes static_cast<Float (Properties::*)(const std::string &) const>(&Properties::getFloat)

This fix should be applied to lines 314, 317, and 367 according to the property type.

weberhen commented 2 years ago

@soraennon suggestion worked for me (corrected link)