uoip / g2opy

Python binding of SLAM graph optimization framework g2o
668 stars 176 forks source link

make in Ubuntu error,I went to 99 percent but failed #46

Open 1761865308 opened 4 years ago

1761865308 commented 4 years ago

Building CXX object python/CMakeFiles/g2o.dir/g2o.cpp.o ........ make[2]: [python/CMakeFiles/g2o.dir/build.make:63:python/CMakeFiles/g2o.dir/g2o.cpp.o] error 1 make[1]: [CMakeFiles/Makefile2:1345:python/CMakeFiles/g2o.dir/all] error 2 make: *** [Makefile:130:all] error 2

SmileyScientist commented 4 years ago

Same here

1761865308 commented 4 years ago

Same here

I successly install g2opy in ubuntu 18.0 and python 3.8,you can replace your eigen3 by legacy version(eigen 3.4.4),good luck for you

SmileyScientist commented 4 years ago

@1761865308 , Thank you so much! I will try it right away!

ValeriiaIZH commented 4 years ago

I still have the same error. ubuntu 18.04, python 3.8, eigen 3.3.4-4.

koide3 commented 3 years ago

I encountered the same problem on Ubuntu 20.04. In my case, I could build the library by changing:

        .def("x", (double (Eigen::Quaterniond::*) () const) &Eigen::Quaterniond::x)
        .def("y", (double (Eigen::Quaterniond::*) () const) &Eigen::Quaterniond::y)
        .def("z", (double (Eigen::Quaterniond::*) () const) &Eigen::Quaterniond::z)
        .def("w", (double (Eigen::Quaterniond::*) () const) &Eigen::Quaterniond::w)

in g2opy/python/core/eigen_types.h to:

        .def("x", [](const Eigen::Quaterniond& q) { return q.x(); })
        .def("y", [](const Eigen::Quaterniond& q) { return q.y(); })
        .def("z", [](const Eigen::Quaterniond& q) { return q.z(); })
        .def("w", [](const Eigen::Quaterniond& q) { return q.w(); })
adeelakram03 commented 3 years ago

I have the same issue.

@1761865308 , Thank you so much! I will try it right away!

I have same issue. Did you find solution ?

Ali007788 commented 2 years ago

I still have the same problem! ubuntu 20.4, python 3.8.10 and eigen 3.3.7 Has anyone an idea how to solve it?

Twenkid commented 2 years ago

@Ali007788

Try the koide3's solution - it has just worked for me.

Ali007788 commented 2 years ago

@Twenkid I already tried it, but the building went to 99% then I got this #58! any tips?

Twenkid commented 2 years ago

Maybe out of memory error? Try: make -j3 -B Or -j1 (number of threads, -B -rebuild, -d debug;) Watch the RAM usage with htop.

BTW, that combination "make -j8" is often given by default, but sometimes it is too much - for virtual machines etc. and there are no notes about that in the building instructions.

mjunsen123 commented 6 months ago

Follow koide3's solution and downgrade my python from 3.11 to 3.9 works for me

keeperlibofan commented 3 months ago

I encountered the same problem on Ubuntu 20.04. In my case, I could build the library by changing:

        .def("x", (double (Eigen::Quaterniond::*) () const) &Eigen::Quaterniond::x)
        .def("y", (double (Eigen::Quaterniond::*) () const) &Eigen::Quaterniond::y)
        .def("z", (double (Eigen::Quaterniond::*) () const) &Eigen::Quaterniond::z)
        .def("w", (double (Eigen::Quaterniond::*) () const) &Eigen::Quaterniond::w)

in g2opy/python/core/eigen_types.h to:

        .def("x", [](const Eigen::Quaterniond& q) { return q.x(); })
        .def("y", [](const Eigen::Quaterniond& q) { return q.y(); })
        .def("z", [](const Eigen::Quaterniond& q) { return q.z(); })
        .def("w", [](const Eigen::Quaterniond& q) { return q.w(); })

It is useful!!! And I solved this problem.