Docker Installation Fails
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 899
- PR merge metrics
- No merged PRs in 30d
Description
I tried to build the library with Docker, after pulling the Github code.
git clone --recursive https://github.com/mapillary/OpenSfM
Looks like despite pulling the submodules, the ThirdParty files for gtest are missing, resulting in the following error
44.28 -- Performing Test HAS_FLTO
44.36 -- Performing Test HAS_FLTO - Success
44.36 -- LTO enabled
44.37 -- Configuring done
44.37 CMake Error at CMakeLists.txt:112 (add_library):
44.37 Cannot find source file:
44.37
44.37 testing_main.cc
44.37
44.37 Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
44.37 .hpp .hxx .in .txx
44.37
44.37
44.37 CMake Error at CMakeLists.txt:106 (add_library):
44.37 Cannot find source file:
44.37
44.37 third_party/gtest/gmock_gtest_all.cc
44.37
44.37 Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
44.37 .hpp .hxx .in .txx
44.37
44.37
44.37 CMake Error at CMakeLists.txt:112 (add_library):
44.37 No SOURCES given to target: test_main
44.37
44.37
44.37 CMake Error at CMakeLists.txt:106 (add_library):
44.37 No SOURCES given to target: gtest
44.37
44.37
44.37 CMake Error at third_party/vlfeat/CMakeLists.txt:11 (add_library):
44.37 No SOURCES given to target: vl
44.37
44.37
44.37 CMake Generate step failed. Build files cannot be regenerated correctly.
44.38 Configuring for python 3.8...
44.38 Traceback (most recent call last):
44.38 File "setup.py", line 59, in
44.38 configure_c_extension()
44.38 File "setup.py", line 43, in configure_c_extension
44.38 subprocess.check_call(cmake_command, cwd="cmake_build")
44.38 File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
44.38 raise CalledProcessError(retcode, cmd)
44.38 subprocess.CalledProcessError: Command '['cmake', '../opensfm/src', '-DPYTHON_EXECUTABLE=/usr/bin/python3']' returned non-zero exit status 1.
Dockerfile:30
29 |
30 | >>> RUN pip3 install -r requirements.txt &&
31 | >>> python3 setup.py build
32 |
ERROR: failed to solve: process "/bin/sh -c pip3 install -r requirements.txt && python3 setup.py build" did not complete successfully: exit code: 1
make: *** [Makefile:2: build] Error 1
Please advise on how to solve this. The whole point of providing a Docker is to have a smooth and painless installation...
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 with Dockerfile:30, setup.py, and the CMakeLists.txt entries at lines 106 and 112. Reproduce the Docker build and inspect whether the referenced gtest, testing_main.cc, and VLFeat sources are present after cloning submodules. Done means the documented Docker build completes without the missing-source and CMake generation errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, docker, python
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100