gmock_main.cc:(.text.startup+0xdb): undefined reference to `google::FlagRegisterer::FlagRegisterer<std::string>(char const*, char const*, char const*, std::string*, std::string*)'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 899
- PR merge metrics
- No merged PRs in 30d
Description
python setup.py build
Configuring...
-- A library with BLAS API found.
-- A library with LAPACK API found.
-- A library with BLAS API found.
-- Found AMD library: /usr/lib/x86_64-linux-gnu/libamd.so
-- Found AMD header in: /usr/include/suitesparse
-- Found CAMD library: /usr/lib/x86_64-linux-gnu/libcamd.so
-- Found CAMD header in: /usr/include/suitesparse
-- Found COLAMD library: /usr/lib/x86_64-linux-gnu/libcolamd.so
-- Found COLAMD header in: /usr/include/suitesparse
-- Found CCOLAMD library: /usr/lib/x86_64-linux-gnu/libccolamd.so
-- Found CCOLAMD header in: /usr/include/suitesparse
-- Found CHOLMOD library: /usr/lib/x86_64-linux-gnu/libcholmod.so
-- Found CHOLMOD header in: /usr/include/suitesparse
-- Found CXSPARSE library: /usr/lib/x86_64-linux-gnu/libcxsparse.so
-- Found SuiteSparseQR library: /usr/lib/x86_64-linux-gnu/libspqr.so
-- Found SuiteSparseQR header in: /usr/include/suitesparse
-- Found Intel Thread Building Blocks (TBB) library: /usr/lib/x86_64-linux-gnu/libtbb.so, assuming SuiteSparseQR was compiled with TBB.
-- Found Intel Thread Building Blocks (TBB) Malloc library: /usr/lib/x86_64-linux-gnu/libtbbmalloc.so
-- Found SuiteSparse_config library: /usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so
-- Found SuiteSparse_config header in: /usr/include/suitesparse
-- Adding librt: /usr/lib/x86_64-linux-gnu/librt.so to SuiteSparse_config libraries (required on Linux & Unix [not OSX] if SuiteSparse is compiled with timing).
-- Did not find METIS library (optional SuiteSparse dependency)
-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
-- Found installed version of gflags: /usr/local/lib/cmake/gflags
-- Detected gflags version: 2.2.1
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- python
Not using boost/python/numpy.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/chen/Documents/OpenSfM/cmake_build
Compiling extension...
Scanning dependencies of target gtest
[ 71%] Built target vl
[ 81%] Built target akaze
[ 83%] Building CXX object CMakeFiles/gtest.dir/third_party/gtest/gmock_main.cc.o
[ 87%] Built target csfm
[ 89%] Linking CXX static library libgtest.a
[ 91%] Built target gtest
[ 95%] Built target testing_main
[ 97%] Linking CXX executable depthmap_test
libgtest.a(gmock_main.cc.o): In function _GLOBAL__sub_I_gmock_main.cc':
gmock_main.cc:(.text.startup+0xdb): undefined reference to google::FlagRegisterer::FlagRegistererstd::string(char const*, char const*, char const*, std::string*, std::string*)'
collect2: error: ld returned 1 exit status
CMakeFiles/depthmap_test.dir/build.make:159: recipe for target 'depthmap_test' failed
make[2]: *** [depthmap_test] Error 1
CMakeFiles/Makefile2:105: recipe for target 'CMakeFiles/depthmap_test.dir/all' failed
make[1]: *** [CMakeFiles/depthmap_test.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2
Building package
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/opensfm
copying opensfm/reconstruction.py -> build/lib.linux-x86_64-2.7/opensfm
copying opensfm/video.py -> build/lib.linux-x86_64-2.7/opensfm
copying opensfm/geotag_from_gpx.py -> build/lib.linux-x86_64-2.7/opensfm
copying opensfm/matching.py -> build/lib.linux-x86_64-2.7/opensfm
copying opensfm/types.py -> build/lib.linux-x86_64-2.7/opensfm
copying opensfm/dense.py -> build/lib.linux-x86_64-2.7/opensfm
copying opensfm/sensors.py -> build/lib.linux-x86_64-2.7/opensfm
copying opensfm/features.py -> build/lib.linux-x86_64-2.7/opensfm
copying opensfm/dataset.py -> build/lib.linux-x86_64-2.7/opensfm
copying opensfm/unionfind.py -> build/lib.linux-x86_64-2.7/opensfm
copying opensfm/transformations.py -> build/lib.linux-x86_64-2.7/opensfm
copying opensfm/io.py -> build/lib.linux-x86_64-2.7/opensfm
copying opensfm/exif.py -> build/lib.linux-x86_64-2.7/opensfm
copying opensfm/init.py -> build/lib.linux-x86_64-2.7/opensfm
copying opensfm/context.py -> build/lib.linux-x86_64-2.7/opensfm
copying opensfm/log.py -> build/lib.linux-x86_64-2.7/opensfm
copying opensfm/geo.py -> build/lib.linux-x86_64-2.7/opensfm
copying opensfm/config.py -> build/lib.linux-x86_64-2.7/opensfm
copying opensfm/mesh.py -> build/lib.linux-x86_64-2.7/opensfm
copying opensfm/multiview.py -> build/lib.linux-x86_64-2.7/opensfm
copying opensfm/align.py -> build/lib.linux-x86_64-2.7/opensfm
creating build/lib.linux-x86_64-2.7/opensfm/commands
copying opensfm/commands/undistort.py -> build/lib.linux-x86_64-2.7/opensfm/commands
copying opensfm/commands/extract_metadata.py -> build/lib.linux-x86_64-2.7/opensfm/commands
copying opensfm/commands/detect_features.py -> build/lib.linux-x86_64-2.7/opensfm/commands
copying opensfm/commands/export_ply.py -> build/lib.linux-x86_64-2.7/opensfm/commands
copying opensfm/commands/match_features.py -> build/lib.linux-x86_64-2.7/opensfm/commands
copying opensfm/commands/export_openmvs.py -> build/lib.linux-x86_64-2.7/opensfm/commands
copying opensfm/commands/export_visualsfm.py -> build/lib.linux-x86_64-2.7/opensfm/commands
copying opensfm/commands/init.py -> build/lib.linux-x86_64-2.7/opensfm/commands
copying opensfm/commands/align_submodels.py -> build/lib.linux-x86_64-2.7/opensfm/commands
copying opensfm/commands/mesh.py -> build/lib.linux-x86_64-2.7/opensfm/commands
copying opensfm/commands/create_tracks.py -> build/lib.linux-x86_64-2.7/opensfm/commands
copying opensfm/commands/reconstruct.py -> build/lib.linux-x86_64-2.7/opensfm/commands
copying opensfm/commands/create_submodels.py -> build/lib.linux-x86_64-2.7/opensfm/commands
copying opensfm/commands/compute_depthmaps.py -> build/lib.linux-x86_64-2.7/opensfm/commands
copying opensfm/commands/export_geocoords.py -> build/lib.linux-x86_64-2.7/opensfm/commands
creating build/lib.linux-x86_64-2.7/opensfm/large
copying opensfm/large/tools.py -> build/lib.linux-x86_64-2.7/opensfm/large
copying opensfm/large/init.py -> build/lib.linux-x86_64-2.7/opensfm/large
copying opensfm/large/metadataset.py -> build/lib.linux-x86_64-2.7/opensfm/large
copying opensfm/csfm.so -> build/lib.linux-x86_64-2.7/opensfm
creating build/lib.linux-x86_64-2.7/opensfm/data
copying opensfm/data/sensor_data.json -> build/lib.linux-x86_64-2.7/opensfm/data
running build_scripts
creating build/scripts-2.7
copying bin/opensfm_run_all -> build/scripts-2.7
copying and adjusting bin/opensfm -> build/scripts-2.7
changing mode of build/scripts-2.7/opensfm from 664 to 775
python setup.sh build
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with python setup.py build and inspect the generated CMake target depthmap_test. Read third_party/gtest/gmock_main.cc and the gflags detection output, then verify the fix by completing the build without the undefined FlagRegisterer reference.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, python
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100