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

Build error #3

Closed
tmccal2 opened this Issue Jun 15, 2016 · 5 comments

Comments

Projects
None yet
6 participants
@tmccal2

tmccal2 commented Jun 15, 2016

I am on trying to build Mitsuba on Ubuntu 16.04, yet I keep getting this error.

g++ -o build/release/integrators/misc/motion.os -c -O3 -Wall -g -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 -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/integrators/misc/motion.cpp
In file included from /usr/include/eigen3/Eigen/Core:341:0,
                 from include/mitsuba/core/autodiff.h:28,
                 from src/integrators/misc/motion.cpp:21:
/usr/include/eigen3/Eigen/src/Core/functors/AssignmentFunctors.h: In instantiation of ‘void Eigen::internal::mul_assign_op<DstScalar, SrcScalar>::assignCoeff(DstScalar&, const SrcScalar&) const [with DstScalar = DScalar1<float, Eigen::Matrix<float, 1, 7> >; SrcScalar = DScalar1<float, Eigen::Matrix<float, 1, 7> >]’:
/usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:577:5:   required from ‘void Eigen::internal::generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>::assignCoeff(Eigen::Index) [with DstEvaluatorTypeT = Eigen::internal::evaluator<Eigen::Matrix<DScalar1<float, Eigen::Matrix<float, 1, 7> >, 3, 1, 0, 3, 1> >; SrcEvaluatorTypeT = Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<DScalar1<float, Eigen::Matrix<float, 1, 7> > >, Eigen::Matrix<DScalar1<float, Eigen::Matrix<float, 1, 7> >, 3, 1, 0, 3, 1> > >; Functor = Eigen::internal::mul_assign_op<DScalar1<float, Eigen::Matrix<float, 1, 7> >, DScalar1<float, Eigen::Matrix<float, 1, 7> > >; int Version = 0; Eigen::Index = long int]’
/usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:213:5:   required from ‘static void Eigen::internal::copy_using_evaluator_LinearTraversal_CompleteUnrolling<Kernel, Index, Stop>::run(Kernel&) [with Kernel = Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<DScalar1<float, Eigen::Matrix<float, 1, 7> >, 3, 1, 0, 3, 1> >, Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<DScalar1<float, Eigen::Matrix<float, 1, 7> > >, Eigen::Matrix<DScalar1<float, Eigen::Matrix<float, 1, 7> >, 3, 1, 0, 3, 1> > >, Eigen::internal::mul_assign_op<DScalar1<float, Eigen::Matrix<float, 1, 7> >, DScalar1<float, Eigen::Matrix<float, 1, 7> > >, 0>; int Index = 0; int Stop = 3]’
/usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:470:106:   required from ‘static void Eigen::internal::dense_assignment_loop<Kernel, 1, 2>::run(Kernel&) [with Kernel = Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<DScalar1<float, Eigen::Matrix<float, 1, 7> >, 3, 1, 0, 3, 1> >, Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<DScalar1<float, Eigen::Matrix<float, 1, 7> > >, Eigen::Matrix<DScalar1<float, Eigen::Matrix<float, 1, 7> >, 3, 1, 0, 3, 1> > >, Eigen::internal::mul_assign_op<DScalar1<float, Eigen::Matrix<float, 1, 7> >, DScalar1<float, Eigen::Matrix<float, 1, 7> > >, 0>]’
/usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:653:37:   required from ‘void Eigen::internal::call_dense_assignment_loop(const DstXprType&, const SrcXprType&, const Functor&) [with DstXprType = Eigen::Matrix<DScalar1<float, Eigen::Matrix<float, 1, 7> >, 3, 1, 0, 3, 1>; SrcXprType = Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<DScalar1<float, Eigen::Matrix<float, 1, 7> > >, Eigen::Matrix<DScalar1<float, Eigen::Matrix<float, 1, 7> >, 3, 1, 0, 3, 1> >; Functor = Eigen::internal::mul_assign_op<DScalar1<float, Eigen::Matrix<float, 1, 7> >, DScalar1<float, Eigen::Matrix<float, 1, 7> > >]’
/usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:790:31:   required from ‘static void Eigen::internal::Assignment<DstXprType, SrcXprType, Functor, Eigen::internal::Dense2Dense, Scalar>::run(DstXprType&, const SrcXprType&, const Functor&) [with DstXprType = Eigen::Matrix<DScalar1<float, Eigen::Matrix<float, 1, 7> >, 3, 1, 0, 3, 1>; SrcXprType = Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<DScalar1<float, Eigen::Matrix<float, 1, 7> > >, Eigen::Matrix<DScalar1<float, Eigen::Matrix<float, 1, 7> >, 3, 1, 0, 3, 1> >; Functor = Eigen::internal::mul_assign_op<DScalar1<float, Eigen::Matrix<float, 1, 7> >, DScalar1<float, Eigen::Matrix<float, 1, 7> > >; Scalar = DScalar1<float, Eigen::Matrix<float, 1, 7> >]’
/usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:747:49:   required from ‘void Eigen::internal::call_assignment_no_alias(Dst&, const Src&, const Func&) [with Dst = Eigen::Matrix<DScalar1<float, Eigen::Matrix<float, 1, 7> >, 3, 1, 0, 3, 1>; Src = Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<DScalar1<float, Eigen::Matrix<float, 1, 7> > >, Eigen::Matrix<DScalar1<float, Eigen::Matrix<float, 1, 7> >, 3, 1, 0, 3, 1> >; Func = Eigen::internal::mul_assign_op<DScalar1<float, Eigen::Matrix<float, 1, 7> >, DScalar1<float, Eigen::Matrix<float, 1, 7> > >]’
/usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:712:27:   required from ‘void Eigen::internal::call_assignment(Dst&, const Src&, const Func&, typename Eigen::internal::enable_if<(! Eigen::internal::evaluator_assume_aliasing<Src>::value), void*>::type) [with Dst = Eigen::Matrix<DScalar1<float, Eigen::Matrix<float, 1, 7> >, 3, 1, 0, 3, 1>; Src = Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<DScalar1<float, Eigen::Matrix<float, 1, 7> > >, Eigen::Matrix<DScalar1<float, Eigen::Matrix<float, 1, 7> >, 3, 1, 0, 3, 1> >; Func = Eigen::internal::mul_assign_op<DScalar1<float, Eigen::Matrix<float, 1, 7> >, DScalar1<float, Eigen::Matrix<float, 1, 7> > >; typename Eigen::internal::enable_if<(! Eigen::internal::evaluator_assume_aliasing<Src>::value), void*>::type = void*]’
/usr/include/eigen3/Eigen/src/Core/SelfCwiseBinaryOp.h:19:28:   required from ‘Derived& Eigen::DenseBase<Derived>::operator*=(const Scalar&) [with Derived = Eigen::Matrix<DScalar1<float, Eigen::Matrix<float, 1, 7> >, 3, 1, 0, 3, 1>; Eigen::DenseBase<Derived>::Scalar = DScalar1<float, Eigen::Matrix<float, 1, 7> >]’
src/integrators/misc/motion.cpp:471:7:   required from here
/usr/include/eigen3/Eigen/src/Core/functors/AssignmentFunctors.h:88:102: error: no match for ‘operator*=’ (operand types are ‘DScalar1<float, Eigen::Matrix<float, 1, 7> >’ and ‘const DScalar1<float, Eigen::Matrix<float, 1, 7> >’)
 GEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(DstScalar& a, const SrcScalar& b) const { a *= b; }
                                                                                                  ^
scons: *** [build/release/integrators/misc/motion.os] Error 1
scons: building terminated because of errors.

Am I on a wrong version of Eigen? If so, what version should I be building against?

@wjakob

This comment has been minimized.

Member

wjakob commented Jun 15, 2016

You can just comment out that plugin if you don't need it (in the SConscript file). A major redesign is in the queue for Mitsuba, so we're currently not focusing on small-ish issues like this.

@wjakob wjakob closed this Jun 15, 2016

@BachiLi

This comment has been minimized.

BachiLi commented Jun 16, 2016

Or try adding the following lines to the class DScalar1:

inline DScalar1& operator*=(const DScalar1 &v) {
    grad = v.grad * value + grad * v.value;
    value *= v.value;
    return *this;
}

You might need to do the same thing to other operators.

@KevinAlb

This comment has been minimized.

KevinAlb commented Oct 4, 2016

I have the same problem than tmccal2.
I don't find class DScalar1, where can i find it ?

@anoother

This comment has been minimized.

anoother commented Oct 15, 2016

@BachiLi That worked perfectly. Perhaps you could submit it as a PR to further help others? I would, but don't want to take credit :)

@cdonovick

This comment has been minimized.

Contributor

cdonovick commented Nov 8, 2016

@KevinAlb
The DScalar1 class is in
include/mitsuba/core/autodiff.h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment