Re: [ceres-solver] ceres solver build error build error

326 views
Skip to first unread message

Alex Stewart

unread,
Sep 8, 2016, 4:32:31 PM9/8/16
to ceres-...@googlegroups.com
Shahnawaz,

Can you clarify your setup please.  Your version of glog is statically linked, presumably your version of gflags is also statically linked?

-Alex

On Sep 7, 2016, at 10:06 PM, Shahnawaz Ahmed <math....@gmail.com> wrote:

Hi,

I am trying to install the Ceres Solver library following the instructions in the web. But I am having problems in building it. I am not sure what is going wrong. Following is the problem :

[ 43%] Building CXX object internal/ceres/CMakeFiles/test_util.dir/test_util.cc.o
[ 43%] Linking CXX executable ../bin/simple_bundle_adjuster
/usr/local/lib/libglog.a(logging.cc.o): In function `__static_initialization_and_destruction_0(int, int)':
logging.cc:(.text+0x6370): undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
logging.cc:(.text+0x63fc): undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
logging.cc:(.text+0x6482): undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
logging.cc:(.text+0x6508): undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
logging.cc:(.text+0x653b): undefined reference to `google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
logging.cc:(.text+0x65c6): undefined reference to `google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
logging.cc:(.text+0x6682): undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
logging.cc:(.text+0x66f7): undefined reference to `google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
logging.cc:(.text+0x676c): undefined reference to `google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
logging.cc:(.text+0x67e1): undefined reference to `google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
logging.cc:(.text+0x6856): undefined reference to `google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
logging.cc:(.text+0x68e1): undefined reference to `google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
logging.cc:(.text+0x698c): undefined reference to `google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
logging.cc:(.text+0x6a17): undefined reference to `google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
logging.cc:(.text+0x6ad8): undefined reference to `google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
logging.cc:(.text+0x6b83): undefined reference to `google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
logging.cc:(.text+0x6c09): undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
logging.cc:(.text+0x6c94): undefined reference to `google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/usr/local/lib/libglog.a(utilities.cc.o): In function `__static_initialization_and_destruction_0(int, int)':
utilities.cc:(.text+0x998): undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
/usr/local/lib/libglog.a(vlog_is_on.cc.o): In function `__static_initialization_and_destruction_0(int, int)':
vlog_is_on.cc:(.text+0x7fd): undefined reference to `google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
vlog_is_on.cc:(.text+0x888): undefined reference to `google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
collect2: error: ld returned 1 exit status
examples/CMakeFiles/simple_bundle_adjuster.dir/build.make:114: recipe for target 'bin/simple_bundle_adjuster' failed
make[2]: *** [bin/simple_bundle_adjuster] Error 1
CMakeFiles/Makefile2:3078: recipe for target 'examples/CMakeFiles/simple_bundle_adjuster.dir/all' failed
make[1]: *** [examples/CMakeFiles/simple_bundle_adjuster.dir/all] Error 2
[ 44%] Linking CXX static library ../../lib/libtest_util.a
[ 44%] Built target test_util
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2


When I again do the make it starts to build again  but it again fails at 88%. I have searched for the problem. Looks like it is coming from Glog. My Gflag version is 2.1.2 and Glog is 0.3.4. I am using Ubuntu 16.04.


Scanning dependencies of target numeric_diff_cost_function_test
[ 88%] Building CXX object internal/ceres/CMakeFiles/numeric_diff_cost_function_test.dir/numeric_diff_cost_function_test.cc.o
[ 88%] Linking CXX executable ../../bin/numeric_diff_cost_function_test
[ 88%] Built target numeric_diff_cost_function_test
[ 88%] Linking CXX executable ../bin/simple_bundle_adjuster
/usr/local/lib/libglog.a(logging.cc.o): In function `__static_initialization_and_destruction_0(int, int)':
logging.cc:(.text+0x6370): undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
logging.cc:(.text+0x63fc): undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
logging.cc:(.text+0x6482): undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
logging.cc:(.text+0x6508): undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
logging.cc:(.text+0x653b): undefined reference to `google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
logging.cc:(.text+0x65c6): undefined reference to `google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
logging.cc:(.text+0x6682): undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
logging.cc:(.text+0x66f7): undefined reference to `google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
logging.cc:(.text+0x676c): undefined reference to `google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
logging.cc:(.text+0x67e1): undefined reference to `google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
logging.cc:(.text+0x6856): undefined reference to `google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
logging.cc:(.text+0x68e1): undefined reference to `google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
logging.cc:(.text+0x698c): undefined reference to `google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
logging.cc:(.text+0x6a17): undefined reference to `google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
logging.cc:(.text+0x6ad8): undefined reference to `google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
logging.cc:(.text+0x6b83): undefined reference to `google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
logging.cc:(.text+0x6c09): undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
logging.cc:(.text+0x6c94): undefined reference to `google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/usr/local/lib/libglog.a(utilities.cc.o): In function `__static_initialization_and_destruction_0(int, int)':
utilities.cc:(.text+0x998): undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
/usr/local/lib/libglog.a(vlog_is_on.cc.o): In function `__static_initialization_and_destruction_0(int, int)':
vlog_is_on.cc:(.text+0x7fd): undefined reference to `google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
vlog_is_on.cc:(.text+0x888): undefined reference to `google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
collect2: error: ld returned 1 exit status
examples/CMakeFiles/simple_bundle_adjuster.dir/build.make:114: recipe for target 'bin/simple_bundle_adjuster' failed
make[2]: *** [bin/simple_bundle_adjuster] Error 1
CMakeFiles/Makefile2:3078: recipe for target 'examples/CMakeFiles/simple_bundle_adjuster.dir/all' failed
make[1]: *** [examples/CMakeFiles/simple_bundle_adjuster.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

Looking forward to any help.

Thank you.

Shahnawaz

--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/c6a06090-614f-4f1c-a722-5d659ba65fdf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages