pmoulon / CMVS-PMVS

This software (CMVS) takes the output of a structure-from-motion (SfM) software as input, then decomposes the input images into a set of image clusters of managable size. An MVS software can be used to process each cluster independently and in parallel, where the union of reconstructions from all the clusters should not miss any details that can be otherwise obtained from the whole image set. CMVS should be used in conjunction with an SfM software Bundler and an MVS software PMVS2 (PMVS version 2).
http://opensourcephotogrammetry.blogspot.com/
939 stars 464 forks source link

Compilation error: tinycthread.h not found #21

Closed jwingnut closed 7 years ago

jwingnut commented 7 years ago

I'm trying to compile this project on Ubuntu 16.04 but I get the following error:

fatal error: tinycthread.h: No such file or directory compilation terminated.

I tried following the partial directions on Readme.txt.

These are the command lines that I ran:

git clone --recursive https://github.com/pmoulon/CMVS-PMVS
cd CMVS-PMVS/program/main
mkdir OutputLinux
cd OutputLinux
cmake . ..

So far so good, cmake . .. outputs:

-- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- 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 -- Configuring done -- Generating done -- Build files have been written to: /home/user/github/CMVS-PMVS/program/main/OutputLinux

But now when I do: make

I get:

make Scanning dependencies of target genOption [ 16%] Building CXX object CMakeFiles/genOption.dir/genOption.cc.o [ 33%] Linking CXX executable genOption [ 33%] Built target genOption Scanning dependencies of target cmvs [ 50%] Building CXX object CMakeFiles/cmvs.dir/cmvs.cc.o In file included from /home/user/github/CMVS-PMVS/program/main/../base/cmvs/bundle.h:15:0, from /home/user/github/CMVS-PMVS/program/main/cmvs.cc:4: /home/user/github/CMVS-PMVS/program/main/../base/cmvs/../stann/sfcnn.hpp:25:25: fatal error: tinycthread.h: No such file or directory compilation terminated. CMakeFiles/cmvs.dir/build.make:62: recipe for target 'CMakeFiles/cmvs.dir/cmvs.cc.o' failed make[2]: [CMakeFiles/cmvs.dir/cmvs.cc.o] Error 1 CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/cmvs.dir/all' failed make[1]: [CMakeFiles/cmvs.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

As the Readme.txt is incomplete as far as compilation instructions for non-programmers I think I'm probably missing something simple here.

@pmoulon Any ideas? It'd be great to have this option working for processing OpenMVG's output using large datasets.

pmoulon commented 7 years ago

Hi,

Normally the file must be found since there is an include here https://github.com/pmoulon/CMVS-PMVS/blob/a5c2bc12e3d4bd06284096140ec0df9a88cec0ae/program/CMakeLists.txt#L26

Since the library is embedded you must not meet any error https://github.com/pmoulon/CMVS-PMVS/tree/master/program/thirdParty/tinycthread

Did you try it from a fresh checkout of the repo and inside an empty build dir?

jwingnut commented 7 years ago

Yes, I found the error and suggested a fix.

The Readme.txt says to use the makefile in program/main however this leads to the error I reported. The correct makefile is in program/, not program/main.

Thanks for your kind response.

pmoulon commented 7 years ago

ok, perhaps the readme is deprecated, makefile are not used and normally only the cmake build must be used.

jwingnut commented 7 years ago

Oh, I see, I thought cmake used the makefile.