Building tests fails with "undefined reference to `fLI::FLAGS_v'"

1,389 views
Skip to first unread message

Steffen Gauglitz

unread,
Sep 2, 2015, 11:27:15 AM9/2/15
to Ceres Solver
Hello all,

On my machine, building Ceres (with shared libs -DBUILD_SHARED_LIBS=ON, and including the tests, per default) fails with
 ../../lib/libtest_util.so: undefined reference to `fLI::FLAGS_v'
...and I'm hoping somebody could point me in the right direction of what might be wrong.

(The build succeeds when excluding the tests (cmake with -DBUILD_TESTING=OFF), though then I'm seeing (presumably related) linker issues when using Ceres later.)

Searching for the error gives me a few hits on other projects (not related to Ceres), but also using glog (e.g.: https://code.google.com/p/server1/issues/detail?id=1 -- the solution suggested there doesn't do the trick for me however).

This is a fresh git clone (head I6f1e42b419), Ubuntu 14.04, c++/g++ (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4; glog and gflags installed via apt-get install cmake libgoogle-glog-dev (as suggested at http://ceres-solver.org/building.html#dependencies). dpkg -s libgoogle-glog-dev shows version 0.3.3-1; dpkg -s libgflags-dev shows version 2.0-1.1ubuntu1.

Any hints appreciated.

Thanks much!
 Steffen

Steffen Gauglitz

unread,
Sep 2, 2015, 3:17:53 PM9/2/15
to Ceres Solver
Addendum: this happens both with the current head on master as well as the 1.10.0 release (after fixing the latter with the patch from https://ceres-solver.googlesource.com/ceres-solver/+/378b5752177427f5b8a2807422ba77c50a164f93%5E!/#F0 as described here: https://groups.google.com/forum/#!topic/ceres-solver/58m1efsZZCc), and also when building the lib statically (without the -DBUILD_SHARED_LIBS=ON)...

...any ideas?

Andreu Corominas Murtra

unread,
Sep 2, 2015, 3:25:35 PM9/2/15
to ceres-...@googlegroups.com
Hi Steffen,

just try to follow that 5 step recipe (we work with the same ingredients and works for us):

    https://wiki.iri.upc.edu/index.php/Wolf#Ceres_.285_steps.29

hope it helps,

andreu



 
--
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/6ee4d5c1-3a1f-4bcb-a907-281ec09d5e87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
--------------------------------------------------
   Andreu Corominas Murtra
   PhD Engineer
   Mobile Robotics & Artificial Perception
   www.beta-robots.com
--------------------------------------------------

Alex Stewart

unread,
Sep 2, 2015, 3:40:20 PM9/2/15
to ceres-...@googlegroups.com
Steffen,

I can’t replicate this on my 14.04.2 build machine (a slightly earlier version to yours based on the GCC version: Ubuntu 4.8.2-19ubuntu1), which also uses the libgoogle-glog-dev (0.3.3-1) & libgflags-dev (2.0-1.1ubuntu1) packages.

Do you have multiple versions of glog (or gflags) installed on your machine?  Specifically a version installed in /usr/local?  If you run the CMake ncurses GUI (ccmake) and <t> to see the advanced view after configuring, what are the values of:

GFLAGS_INCLUDE_DIR
GFLAGS_LIBRARY

GLOG_INCLUDE_DIR
GLOG_LIBRARY

?  If you are using the system versions these should point to /usr/include & /usr/lib/x86_64-linux-gnu/XXX respectively.  My suspicion would be that Ceres is detecting a different install of glog.

-Alex

Steffen Gauglitz

unread,
Sep 2, 2015, 4:31:38 PM9/2/15
to Ceres Solver
Alex,

Many thanks for your reply! I think Ceres detecting a different install may have been the issue (?). Can't say for sure (I had already uninstalled glog & gflags in order to try building them from source instead when I got your message), but eventually removing them (verified by Ceres not finding them any more) and re-installing them (via apt-get) and rebuilding Ceres appears to have fixed it! Thanks again.

Andreu, many thanks for your help too -- however it seems that the link you sent leads to a password-protected internal site?

Thanks!
 Steffen

Andreu Corominas Murtra

unread,
Sep 2, 2015, 4:48:48 PM9/2/15
to ceres-...@googlegroups.com
Hi Steffen,

I'm not logged in ... try at http://wiki.iri.upc.edu/index.php/Wolf , and then move up to the section "Ceres (5 steps)"

let me know ...

andreu





For more options, visit https://groups.google.com/d/optout.

Steffen Gauglitz

unread,
Sep 3, 2015, 8:28:26 AM9/3/15
to Ceres Solver
Andreu,

Yes that link works (seems like the 'https' redirects it to a login page) -- thanks! Will keep in mind should any problems arise again.

-Steffen
Reply all
Reply to author
Forward
0 new messages