Vicalib fully installed along with dependencies but wont run due to 'logtostderr' flag error
RoboBAR opened this issue · comments
Hi,
Vicalib is fully built and installed along with all its dependencies, however, unfortunately i cant run it.
i keep getting an error whenever i try any "vicalib" command in the terminal, here is the message:
"ERROR: something wrong with flag 'logtostderr' in file '...glog/src/logging.cc'. One possibility: file '.../glog/src/logging.cc' is being linked both statically and dynamically into this executable."
i did my (googling) research and came up empty.
here is what i have tried:
i removed and re-built/installed gflags and glog using ccmake, make, make install.
Then i re-built/installed vicalib, unfortunately the problem persists.
This might not be an issue with vicalib but rather one of its dependencies, however id seriouslly appreciate any help as i am desprate to solve this and start using vicalib.
Thanks for any dispensed advice,
CajaYairB
This is not a problem with vicalib but is due to your build environment. We've seen this come up when one of your deps are built against a static glog and another is built against dynamic glog.
Trouble is when you build a static library it is subsumed by the downstream packages, making this problem particularly difficult to address and requiring removal and rebuild of packages that subsumed the offending binary.
Your fix is unfortunately to find which one is building against static glog and then rebuild it against dynamic glog. If you built Node, that could be what's causing this error. I'd remove Node and rebuild HAL, etc.
You may have two versions of glog (static and dynamic) on your device. Ensure the packages you're building are linking to the dynamic libs, and to save yourself this pain in the future, build these libraries as dynamic libs too. That's an option in ccmake as BUILD_SHARED_LIBS
.
If you have the two versions of glog installed, I would recommend removing the static one. There's no easy way to see if cmake is creating makefiles to link your library against the static version, but there is a hack: grep -ri '\-lglog' *
in your build dirs for the library you're creating; I usually do this to debug deep cmake related problems.
Other approaches e.g. ldd [libraryname].so
doesn't work since static libraries don't show up in it; you'd have to actually go and run nm
or some other symbol exposing utility on the resulting binary and see if symbols from the static library are present in the new binary.
Closing this issue as it's not a bug with vicalib but a problem with the user's build environment.