Skip to content
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

errors occur when make FullSystem.cpp #248

Open
zhangletian2 opened this issue Apr 24, 2022 · 5 comments
Open

errors occur when make FullSystem.cpp #248

zhangletian2 opened this issue Apr 24, 2022 · 5 comments

Comments

@zhangletian2
Copy link

the errors are as follows:
make[2]: *** [CMakeFiles/dso.dir/build.make:63: CMakeFiles/dso.dir/src/FullSystem/FullSystem.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:105: CMakeFiles/dso.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

and here are the specific errors(_1 _2 _3 are also not declared)
/home/happy/dso/src/FullSystem/FullSystem.cpp:646:117: error: ‘_4’ was not declared in this scope
646 | ointsMT_Reductor, this, &optimized, &toOptimize, _1, _2, _3, _4), 0, toOptimize.size(), 50);
|

@owlshrimp
Copy link

owlshrimp commented May 5, 2022

I'm experiencing the same problem. Does anyone know when the last time was when DSO compiled successfully or what may have changed?

For me the problem first appears in dso/src/FullSystem/FullSystem.cpp

dso/src/FullSystem/FullSystem.cpp:646:109: error: ‘_2’ was not declared in this scope
646 | treadReduce.reduce(boost::bind(&FullSystem::activatePointsMT_Reductor, this, &optimized, &toOptimize, _1, _2, _3, _4), 0, toOptimize.size(), 50);
|

Though strangely it's immediately followed by suggestions of alternative definitions from various places.

@owlshrimp
Copy link

owlshrimp commented May 5, 2022

I have no idea if this is correct at all, but I got around that error by adding std::placeholders:: in front of every _1 _2 _3 and _4 in
dso/src/util/IndexThreadReduce.h
and
dso/src/FullSystem.cpp

Now there are new errors though, so something is still not right.

EDIT: 7.6MB of new errors, so I think this is clearly not the right path forward.

@lukasvst
Copy link

lukasvst commented May 5, 2022

I think the reason is the newer Boost version.
You could try adding using namespace boost::placeholders; to line 36 of dso/src/util/IndexThreadReduce.h

That's what I did to make DM-VIO work with new Boost versions.

@owlshrimp
Copy link

That did the trick. I also had to swap:

CV_LOAD_IMAGE_GRAYSCALE with cv::IMREAD_GRAYSCALE
CV_LOAD_IMAGE_COLOR with cv::IMREAD_COLOR0
CV_LOAD_IMAGE_UNCHANGED cv::IMREAD_UNCHANGED

in dso/src/IOWrapper/OpenCV/ImageRW_OpenCV.cpp:

@minz27
Copy link

minz27 commented Mar 5, 2023

Just pointing out a small typo, it's cv::IMREAD_COLOR not cv::IMREAD_COLOR0. Thanks for posting the solution though, it works for me now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants