galkahana / pdf-text-extraction

cli for extracting text from PDF files (and maybe possibly tables)
Apache License 2.0
74 stars 19 forks source link

CMake Error when attempting to build project #21

Closed IronIron2121 closed 1 year ago

IronIron2121 commented 1 year ago

After cloning and then running

cd pdf-text-extraction
mkdir build
cd build
cmake ..
make

I get

Downloads/pdf-text-extraction/build$ cmake ..
-- The C compiler identification is GNU 9.4.0 
-- The CXX compiler identification is GNU 
-- Check for working C compiler: /usr/bin/
-- Check for working C compiler: /usr/bin/cc 
-- Detecting C compiler ABI 
-- Detecting C compiler ABI info - done 
-- Detecting C compile 
-- Detecting C compile features - done 
-- Check for working CXX compiler: /usr/bin/c++   
-- Check for working CXX compiler: /usr/bin/c++ -- works        
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done 
-- Detecting CXX compile features  
-- Detecting CXX compile features - done
Scanning dependencies of target pdfhummus-populate 
[11%] Creating directories for 'pdfhummus-populate'                                                                                                                                                               [ 22%] Performing download step (git clone) for 'pdfhummus-populate'
-- Avoiding repeated git clone, stamp file is up to date: 'Downloads/pdf-text-extraction/build/_deps/pdfhummus-subbuild/pdfhummus-populate-prefix/src/pdfhummus-populate-stamp/pdfhummus-populate-gitinfo.txt'                                                                                                                                                                                                             [ 33%] No patch step for 'pdfhummus-populate' [44%] Performing update step for 'pdfhummus-populate' 
CMake Error at /home/gokaf001/Downloads/pdf-text-extraction/build/_deps/pdfhummus-subbuild/pdfhummus-populate-prefix/tmp/pdfhummus-populate-gitupdate.cmake:10 (message):
Failed to get the hash for HEAD 
make[2]: *** [CMakeFiles/pdfhummus-populate.dir/build.make:97: pdfhummus-populate-prefix/src/pdfhummus-populate-stamp/pdfhummus-populate-update] 
Error 1 make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/pdfhummus-populate.dir/all] 
Error 2 make: *** [Makefile:84: all]
Error 2 CMake Error at /usr/share/cmake-3.16/Modules/FetchContent.cmake:915 (message): 
Build step for pdfhummus failed: 
Call Stack (most recent call first: 
usr/share/cmake-3.16/Modules/FetchContent.cmake:1006 (__FetchContent_directPopulate
/usr/share/cmake-3.16/Modules/FetchContent.cmake:1047 (FetchContent_Populate)
CMakeLists.txt:17 (FetchContent_MakeAvailable)
 -- Configuring incomplete, errors occurred
"See also "/Downloads/pdf-text-extraction/build/CMakeFiles/CMakeOutput.log".  

My wifi is fine, git and cmake are the latest versions...no idea what could be wrong here.

IronIron2121 commented 1 year ago

Appears to have been fixed by upgrading from cmake 3.16 to 3.27