alicevision / AliceVision

Photogrammetric Computer Vision Framework
http://alicevision.org
Other
2.95k stars 820 forks source link

Compile error: no EigenTypes.h after the success on cmake(configuration). #992

Closed hzhshok closed 3 years ago

hzhshok commented 3 years ago

The first step(cmake) succeed for compilation, but during make it happens the following,

[ 79%] Linking CXX executable ../../../Linux-x86_64/aliceVision_meshDenoising
/usr/bin/ld: cannot find -lMeshSDLibrary

Where is MeshSDLibrary from ? which is from openmesh and this name (lMeshSDLibrary) just changed to xx? because i checked that cpp, and the suspected is used openmesh's includes.

I just add the path of EigenTypes.h into build.make to temporary fix this failure.

[ 79%] Building CXX object src/software/pipeline/CMakeFiles/aliceVision_meshDenoising.dir/main_meshDenoising.cpp.o
AliceVision/src/software/pipeline/main_meshDenoising.cpp:13:10: fatal error: EigenTypes.h: No such file or directory
   13 | #include <EigenTypes.h>
      |          ^~~~~~~~~~~~~~

So, what library(dependence) needed to be install to naturally pass this step? i found that file is inside MeshSDFilter, so what i shall do if i did not use option '-DALICEVISION_BUILD_DEPENDENCIES=ON'? do i need to compile MeshSDFilter first?

During the compile(make), i happened, and i just renamed the Parallel function(from Rotate to RotateP) to fix this failure since that error showed it wish to used the function inside namespace(otherwise, it can just use RotateP without any namespace constrain).

STATIC_INLINE m128i RotateP(m128i x, int c) { return Or(_mm_slli_epi32(x, c), _mm_srli_epi32(x, 32 - c)); } /usr/local/include/OpenImageIO/detail/farmhash.h:1305:39: error: \u2018Rotate32\u2019 is not a member of \u2018OpenImageIO_v2_3::farmhash\u2019; did you mean \u2018OpenImageIO_v2_3::farmhash::inlined::Rotate32\u2019? a = NAMESPACE_FOR_HASH_FUNCTIONS::Rotate32(a, 21);

Thks for your comments in advance!

simogasp commented 3 years ago

That depends on MeshSDFilter, which is a library normally embedded in the code but you need to clone the repository with the --recursive flag or do git submodule update -i after. see here https://github.com/alicevision/AliceVision/tree/develop/src/dependencies If your MeshSDFilter directory is empty you need to run the submodule update line above.

hzhshok commented 3 years ago

I update MeshSDFilter using your link, and which works. originally i git that MeshSDFilter(master) using https://github.com/alicevision/MeshSDFilter.git, and CMakeList.txt is different with yours, and i just thought exploring to branch and the link under code button should also be the branch, but not noticed that the link from code push button still is master link.

Thks for your help!

Also Leave some clues during compilation, maybe other guys suffers that.

  1. libopencv_imgcodecs.so.4.1: undefined reference to `TIFFReadDirectory@LIBTIFF_4.0'. Which is because the opencv compiled(linked to ) with libtiff4.0, but libtiff are not libtiff4.0, but, e.g. 5.0 which is install later than libtiff4.0(maybe libtiff4.0 was uninstalled). that openimage/openexr... also refereed to libtiff4.0 with same issue. Other the similar issue like this, one component depend/use on different version and current install only one version(this happens for apt-get+make install/uninstall).

    so, please take care of install/uninstall libraries except for mixed make and apt-get. i recompiled ffmpeg, opencv openexr, openimage and other more library under my machine with cuda. but my desktop still does not work because library version for (atlas and openblas installed together).

Regards