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

gmock_gtest_all not found #1078

Open
Diego1890 opened this issue Nov 8, 2024 · 3 comments
Open

gmock_gtest_all not found #1078

Diego1890 opened this issue Nov 8, 2024 · 3 comments

Comments

@Diego1890
Copy link

Hello, I was trying to build OpenSFM and I folled the documentation for building:

git clone --recursive https://github.com/mapillary/OpenSfM
pip install -r requirements
#Install some dependencies
python3 setup.py build

But I got the error that these files were not located:
gmock_gtest_all.cc
gmock_main.cc
testing_main.cc

If you have any advice I would appreciate it.

@dizzyrue
Copy link

I encountered the same problem, did you solve it?

@DiegoHerrera1890
Copy link

DiegoHerrera1890 commented Nov 14, 2024

I have the same issue and still haven't found a solution. However, when using git checkout v0.5.1, the files become available, but other issues arise.

@alessandro-pistola-me
Copy link

The most frequent errors encountered are:

  1. pyyaml installation error (cython error with pyyaml version 5.4.1)
  2. pybundle error
  3. third_party/gtest error

By reviewing the commit history from August 9 (commit ef872b2399cf1cc036d91e950f210a7be33c2745) onward, you’ll notice that all workflows for subsequent commits, like "Docker CI / Build docker and run tests (push)" and "Docker CI / Build docker installing CeresSolver 2 and run tests (push)," fail.

Below is a step-by-step guide explaining how I resolved these issues.

The missing files should be taken from the release, but only those for the third_party folder (missing gtest files), as the release uses outdated dependencies and likely Ceres 2.0.

To begin, create two clones of the latest repository:

  • One will serve as the main repository.
  • The other will be used to retrieve the missing parts.

In the root of the main repo, run:
`git submodule update --init --recursive
This will load the removed submodules.

In the main repo, remove pyyaml==5.4.1 from requirements.txt and install it manually with the following command:
pip install "cython<3.0.0" && pip install --no-build-isolation pyyaml==5.1

In the second repo, go to the August 9 commit:
git checkout ef872b2399cf1cc036d91e950f210a7be33c2745

From this commit, copy the missing files (gmock_gtest_all.cc, gmock_main.cc, testing_main.cc, and any other required files) into the main repository.
Now you should be able to build the image from the modified dockerfile in which you should install ceres 2.2 insted ceres 2.0
RUN \ curl -L http://ceres-solver.org/ceres-solver-2.2.0.tar.gz | tar xz && \ mkdir ceres-bin && cd ceres-bin && \ cmake ../ceres-solver-2.2.0 && \ make -j3 && \ make install

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

No branches or pull requests

4 participants