Open Shaunlipy opened 5 years ago
Compile openblas from source. The package of Ubuntu repos do not have lapacke.h
Small addition to @sziraqui's suggestion (by the way it works for me), to build OpenFace on ARM you will also need to comment section with x86 SIMD options in CMakeLists.txt:
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (GCC_VERSION VERSION_LESS 4.7)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -msse -msse2 -msse3")
else ()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -msse -msse2 -msse3")
endif ()
else ()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -msse -msse2 -msse3")
endif ()
An addition to the original question and @sziraqui ' comment
Ive been successful with installing based on Ubuntu repros
sudo apt-get install liblapack-dev liblapacke-dev libopenblas-dev # not sure this is necessary
And then in cmake/modules/FindOpenBLAS.cmake
add the two lines
/usr/include/aarch64-linux-gnu/
and
/usr/lib/aarch64-linux-gnu/
in the include and lib search paths.
As a side note. I got errors with dlib-19.13:
...
undefined reference to `pthread_create'
...
cannot find -lpthreads
...
undefined reference to `sgesv'
...
But I was successful with dlib-19.22. And got a working OpenFace installation after removing the arguments for SSE SIMD as suggested by pi-null-meazon
jetson@tegra-ubuntu:~/OpenFace/build$ make Scanning dependencies of target LandmarkDetector [ 2%] Building CXX object lib/local/LandmarkDetector/CMakeFiles/LandmarkDetector.dir/src/CCNF_patch_expert.cpp.o g++-8: error: unrecognized command line option ‘-msse’; did you mean ‘-fdse’? g++-8: error: unrecognized command line option ‘-msse2’ g++-8: error: unrecognized command line option ‘-msse3’ lib/local/LandmarkDetector/CMakeFiles/LandmarkDetector.dir/build.make:62: recipe for target 'lib/local/LandmarkDetector/CMakeFiles/LandmarkDetector.dir/src/CCNF_patch_expert.cpp.o' failed make[2]: [lib/local/LandmarkDetector/CMakeFiles/LandmarkDetector.dir/src/CCNF_patch_expert.cpp.o] Error 1 CMakeFiles/Makefile2:85: recipe for target 'lib/local/LandmarkDetector/CMakeFiles/LandmarkDetector.dir/all' failed make[1]: [lib/local/LandmarkDetector/CMakeFiles/LandmarkDetector.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2
I encountered the following problem when compiling the project, I would like to ask how to solve it ah
Have a look into "https://github.com/TadasBaltrusaitis/OpenFace/issues/479", same errors reported when compiling on a Jetson device (no SSE CPU instructions?)
I am compiling it on my Jetson Nano. I have openblas installed at:
libopenblas.so.0 (libc6,AArch64) => /usr/lib/aarch64-linux-gnu/libopenblas.so.0 libopenblas.so (libc6,AArch64) => /usr/lib/aarch64-linux-gnu/libopenblas.so
But when I execute the "Cmake -D ..."
I still got error:
-- Could not find OpenBLAS include, defaulting to using OpenFace vended ones -- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off CMake Error at cmake/modules/FindOpenBLAS.cmake:103 (MESSAGE): Could not find OpenBLAS Call Stack (most recent call first): CMakeLists.txt:14 (find_package)
Should I link the openblas somehow?