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

Can't build matlab_wrapper #552

Closed
huanhexiao opened this issue Oct 2, 2020 · 10 comments
Closed

Can't build matlab_wrapper #552

huanhexiao opened this issue Oct 2, 2020 · 10 comments
Assignees
Labels
matlab Related to MATLAB wrapper

Comments

@huanhexiao
Copy link

huanhexiao commented Oct 2, 2020

When compiling gtsam,it stops at "[ 76%] Building CXX object gtsam/CMakeFiles/gtsam_matlab_wrapper.dir/wrap/gtsam/gtsam_wrapper.cpp.o
", the memory has been increasing until overflow and killing by the compiler.

I set GTSAM_INSTALL_MATLAB_TOOLBOX as "ON", my OS is Ubuntu16.04.

Any help?

@jlblancoc
Copy link
Member

jlblancoc commented Oct 2, 2020 via email

@fangxu622
Copy link

fangxu622 commented Oct 15, 2020

@jlblancoc @varunagrawal hi ~~when build matlab wrapper . it happens some error like this

/usr/include/boost/smart_ptr/make_shared_object.hpp:256:5: error: no matching function for call to

[ 76%] Building CXX object examples/CMakeFiles/Pose2SLAMExampleExpressions.dir/Pose2SLAMExampleExpressions.cpp.o
In file included from /usr/include/boost/smart_ptr/make_shared.hpp:14:0,
                 from /usr/include/boost/make_shared.hpp:14,
                 from /media/fangxu/Segate3T/PHD-Project/gtsam/wrap/matlab.h:40,
                 from /media/fangxu/Segate3T/PHD-Project/gtsam/build/gtsam/wrap/gtsam/gtsam_wrapper.cpp:1:
/usr/include/boost/smart_ptr/make_shared_object.hpp: In instantiation of ‘typename boost::detail::sp_if_not_array<T>::type boost::make_shared(Args&& ...) [with T = std::vector<long unsigned int, tbb::tbb_allocator<long unsigned int> >; Args = {std::vector<long unsigned int, std::allocator<long unsigned int> >}; typename boost::detail::sp_if_not_array<T>::type = boost::shared_ptr<std::vector<long unsigned int, tbb::tbb_allocator<long unsigned int> > >]’:
/media/fangxu/Segate3T/PHD-Project/gtsam/build/gtsam/wrap/gtsam/gtsam_wrapper.cpp:22749:87:   required from here
/usr/include/boost/smart_ptr/make_shared_object.hpp:256:5: error: no matching function for call to ‘std::vector<long unsigned int, tbb::tbb_allocator<long unsigned int> >::vector(std::vector<long unsigned int>)’
     ::new( pv ) T( boost::detail::sp_forward<Args>( args )... );
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from /usr/include/boost/format.hpp:17,
                 from /media/fangxu/Segate3T/PHD-Project/gtsam/gtsam/base/Matrix.h:31,
                 from /media/fangxu/Segate3T/PHD-Project/gtsam/wrap/matlab.h:26,
                 from /media/fangxu/Segate3T/PHD-Project/gtsam/build/gts
[ 97%] Built target gtsam_unstable_py
gtsam/CMakeFiles/gtsam_matlab_wrapper.dir/build.make:81: recipe for target 'gtsam/CMakeFiles/gtsam_matlab_wrapper.dir/wrap/gtsam/gtsam_wrapper.cpp.o' failed
make[2]: *** [gtsam/CMakeFiles/gtsam_matlab_wrapper.dir/wrap/gtsam/gtsam_wrapper.cpp.o] Error 1
CMakeFiles/Makefile2:1490: recipe for target 'gtsam/CMakeFiles/gtsam_matlab_wrapper.dir/all' failed
make[1]: *** [gtsam/CMakeFiles/gtsam_matlab_wrapper.dir/all] Error 2

@fangxu622
Copy link

have you solved it? @huanhexiao

@ProfFan
Copy link
Collaborator

ProfFan commented Oct 17, 2020

Since currently no one here is actively using the MATLAB wrapper, you can try use the Python wrapper instead.

@fangxu622
Copy link

Since currently no one here is actively using the MATLAB wrapper, you can try use the Python wrapper instead.

yeah, python wrapper is ok, build the matlab wrapper because it has more examples~~

@huanhexiao
Copy link
Author

have you solved it? @huanhexiao

@fangxu622
yeah, it seems like a matter of memory size. When building matlab_wrapper, i close any other applications, and this needs a long time

@varunagrawal
Copy link
Collaborator

I've seen this issue with the python wrapper too unfortunately. This is going to require quite a bit of leg work to figure out. 🙁

@varunagrawal
Copy link
Collaborator

@fangxu622 can you try compiling with the GTSAM_WITH_TBB set to OFF?

E.g. cmake -DGTSAM_WITH_TBB=OFF .. && make -j4

@varunagrawal
Copy link
Collaborator

@fangxu622 #603 should fix your issue. If you pull the latest develop branch, you should be able to compile the Matlab wrapper.

@huanhexiao any updates? Please try with the latest develop branch.

@varunagrawal varunagrawal self-assigned this Nov 16, 2020
@varunagrawal varunagrawal added the matlab Related to MATLAB wrapper label Nov 16, 2020
@varunagrawal
Copy link
Collaborator

Closing this due to lack of responses. Please feel free to reopen if your issue has not been resolved.

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

No branches or pull requests

5 participants