按照https://github.com/JakobEngel/dso上的说明,make -j4的时候出现一下错误:
/home/zhao/dso/src/FullSystem/CoarseInitializer.cpp:373:23: error: expected ‘;’ before ‘VecNRf’
EIGEN_ALIGN32 VecNRf dp7;
^
/home/zhao/dso/src/FullSystem/CoarseInitializer.cpp:374:23: error: expected ‘;’ before ‘VecNRf’
EIGEN_ALIGN32 VecNRf dd;
^
/home/zhao/dso/src/FullSystem/CoarseInitializer.cpp:375:23: error: expected ‘;’ before ‘VecNRf’
EIGEN_ALIGN32 VecNRf r;
^
/home/zhao/dso/src/FullSystem/CoarseInitializer.cpp:426:4: error: ‘dp0’ was not declared in this scope
dp0[idx] = new_idepth*dxInterp;
^
/home/zhao/dso/src/FullSystem/CoarseInitializer.cpp:427:4: error: ‘dp1’ was not declared in this scope
dp1[idx] = new_idepth*dyInterp;
^
/home/zhao/dso/src/FullSystem/CoarseInitializer.cpp:428:4: error: ‘dp2’ was not declared in this scope
dp2[idx] = -new_idepth*(u*dxInterp + v*dyInterp);
^
/home/zhao/dso/src/FullSystem/CoarseInitializer.cpp:429:4: error: ‘dp3’ was not declared in this scope
dp3[idx] = -u*v*dxInterp - (1+v*v)*dyInterp;
^
/home/zhao/dso/src/FullSystem/CoarseInitializer.cpp:430:4: error: ‘dp4’ was not declared in this scope
dp4[idx] = (1+u*u)*dxInterp + u*v*dyInterp;
^
/home/zhao/dso/src/FullSystem/CoarseInitializer.cpp:431:4: error: ‘dp5’ was not declared in this scope
dp5[idx] = -v*dxInterp + u*dyInterp;
^
原因是EIGEN_ALIGN32 was introduced in eigen 3.3; therefore not available in libeigen apt-get version
Workaround: define yourself。
解决办法:
在/home/zhao/dso/src/FullSystem/CoarseInitializer.cpp里面添加:#define EIGEN_ALIGN32 EIGEN_ALIGN_TO_BOUNDARY(32)
重新编译即可。