Skip to content

build.sh error #661

Closed
Closed
@lucasjinreal

Description

@lucasjinreal

Simply installed depencies and run build.sh. got error:

/usr/local/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
 EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
                                     ^~~~~~~~~~
/home/jintain/work/codes/slam/ORB_SLAM2/src/Tracking.cc: In member function ‘void ORB_SLAM2::Tracking::Reset()’:
/home/jintain/work/codes/slam/ORB_SLAM2/src/Tracking.cc:1512:24: error: ‘usleep’ was not declared in this scope
             usleep(3000);
                        ^
CMakeFiles/ORB_SLAM2.dir/build.make:296: recipe for target 'CMakeFiles/ORB_SLAM2.dir/src/Viewer.cc.o' failed
make[2]: *** [CMakeFiles/ORB_SLAM2.dir/src/Viewer.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/ORB_SLAM2.dir/build.make:88: recipe for target 'CMakeFiles/ORB_SLAM2.dir/src/LocalMapping.cc.o' failed
make[2]: *** [CMakeFiles/ORB_SLAM2.dir/src/LocalMapping.cc.o] Error 1
CMakeFiles/ORB_SLAM2.dir/build.make:101: recipe for target 'CMakeFiles/ORB_SLAM2.dir/src/LoopClosing.cc.o' failed
make[2]: *** [CMakeFiles/ORB_SLAM2.dir/src/LoopClosing.cc.o] Error 1
CMakeFiles/ORB_SLAM2.dir/build.make:75: recipe for target 'CMakeFiles/ORB_SLAM2.dir/src/Tracking.cc.o' failed
make[2]: *** [CMakeFiles/ORB_SLAM2.dir/src/Tracking.cc.o] Error 1
CMakeFiles/ORB_SLAM2.dir/build.make:62: recipe for target 'CMakeFiles/ORB_SLAM2.dir/src/System.cc.o' failed
make[2]: *** [CMakeFiles/ORB_SLAM2.dir/src/System.cc.o] Error 1
CMakeFiles/Makefile2:257: recipe for target 'CMakeFiles/ORB_SLAM2.dir/all' failed
make[1]: *** [CMakeFiles/ORB_SLAM2.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

It's this a bug or my mistake for missed something?

Activity

missminga

missminga commented on Oct 16, 2018

@missminga

my mistake is the same as yours,but the"EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80"is bug?

cbachhuber

cbachhuber commented on Oct 16, 2018

@cbachhuber

The error is caused by a missing header inclusion, unistd.h is missing. This has been discussed before. Solution given here:

Put #include <unistd.h> in System.h.

lucasjinreal

lucasjinreal commented on Oct 16, 2018

@lucasjinreal
Author

Problem solved, thanks.

plutomedia

plutomedia commented on May 19, 2019

@plutomedia

Hi. I had a similar or the same problem. So I tried the solution above ('Put #include <unistd.h> in System.h.' from cbachhuber) but it didn't help.
But: after reading the following post I tried to Downgrade the Eigen to 3.2 and all the problems magically dissappeared :)
#317

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @plutomedia@lucasjinreal@cbachhuber@missminga

        Issue actions

          build.sh error · Issue #661 · raulmur/ORB_SLAM2