Installing OpenFace via Jenkins

Hi everyone,

I want to install OpenFace using Jenkins.
When I was installing on my laptop I used the following commands:

sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install g++-8

sudo apt-get install cmake

sudo apt-get install git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev

sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev

# start building OpenCV
wget https://github.com/opencv/opencv/archive/4.1.0.zip

sudo unzip 4.1.0.zip
cd opencv-4.1.0
sudo mkdir build
cd build

sudo cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_TIFF=ON -D WITH_TBB=ON ..
sudo make -j2
sudo make install
# if you don't see errors, it successes to install the OpenCV

# install dlib
sudo wget http://dlib.net/files/dlib-19.13.tar.bz2
tar xf dlib-19.13.tar.bz2
cd dlib-19.13
mkdir build
cd build
cmake ..
cmake --build . --config Release
sudo make install
sudo ldconfig
cd ../..
# finish for dlib

sudo apt-get install libboost-all-dev

# install the OpenBLAS here 
git clone https://github.com/xianyi/OpenBLAS.git
cd OpenBLAS
make -j4   
sudo apt install g++-10
sudo apt install gcc-10
make CC=gcc-10 CPP=g++-10 CXX=g++-10 LD=g++-10
make install 
# if you see no errors on the screen, it finishes the install of the OpenBLAS

# starts to install the OpenFace
git clone https://github.com/TadasBaltrusaitis/OpenFace.git

cd OpenFace
mkdir build
cd build

cmake -D CMAKE_CXX_COMPILER=g++-8 -D CMAKE_C_COMPILER=gcc-8 -D CMAKE_BUILD_TYPE=RELEASE ..
make

But now that I have my project
and listed these commands and want to build my project in Jenkins I face the following errors:

After cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_TIFF=ON -D WITH_TBB=ON … for opencv I get the dollowing errors:

Looking for ccache - not found
Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Failed
Performing Test HAVE_CXX_WSTRICT_PROTOTYPES - Failed
Performing Test HAVE_C_WSIGN_PROMO - Failed
Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR - Failed
14:07:43 -- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS

14:07:43 -- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
14:07:43 -- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
14:07:43 -- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN - Failed

Check size of INT8 - failed
14:07:51 -- Check size of INT16
14:07:51 -- Check size of INT16 - failed
14:07:51 -- Check size of INT32
14:07:51 -- Check size of INT32 - faile

Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES - Failed

Performing Test HAVE_C_WNO_ABSOLUTE_VALUE - Failed
CMake Warning at cmake/OpenCVFindLAPACK.cmake:29 (message):
14:07:56   LAPACK(OpenBLAS): CBLAS/LAPACK headers are not found in
14:07:56   '/opt/OpenBLAS/include'

Could NOT find Atlas (missing: Atlas_CLAPACK_INCLUDE_DIR Atlas_CBLAS_LIBRARY Atlas_BLAS_LIBRARY) 
Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE - Failed
Performing Test HAVE_CXX_WNO_SHORTEN_64_TO_32 - Failed
Performing Test HAVE_CXX_WNO_ENUM_COMPARE_SWITCH - Failed
Performing Test HAVE_CXX_WNO_INCONSISTENT_MISSING_OVERRIDE - Failed
Performing Test HAVE_CXX_WNO_UNUSED_PRIVATE_FIELD - Failed
Configuring done

14:08:03 -- Generating done
14:08:03 -- Build files have been written to: /home/maryam/RDTK/jenkins/jobs/newMaryamOpenFace-master-toolkit-floka-minimal-nightly/workspace/opencv-4.1.0/build

after cmake .. for dlib:

CUDA_TOOLKIT_ROOT_DIR not found or specified
Looking for pthread_create - not found
14:27:39 -- Looking for pthread_create in pthreads
14:27:39 -- Looking for pthread_create in pthreads - not found
+ make DESTDIR=/vol/folka-minimal/floka-minimal-nightly install


after cd OpenBLAS
14:30:28 + make DESTDIR=/vol/folka-minimal/floka-minimal-nightly -j4

 /bin/sh: 1: gfortran: not found
14:30:28 expr: syntax error
14:30:28 /bin/sh: 1: gfortran: not found
14:30:28 expr: syntax error
14:30:28 /bin/sh: 1: gfortran: not found
14:30:28 expr: syntax error
14:30:28 OpenBLAS: Detecting fortran compiler failed. Cannot compile LAPACK. Only compile BLAS.
14:30:28 make[1]: warning: -jN forced in submake: disabling jobserver mode.
14:30:28 make[1]: Entering directory '/home/maryam/RDTK/jenkins/jobs/newMaryamOpenFace-master-toolkit-floka-minimal-nightly/workspace/opencv-4.1.0/build/OpenBLAS/interface'
14:30:28 /bin/sh: 1: gfortran: not found
14:30:28 expr: syntax error
14:30:28 /bin/sh: 1: gfortran: not found
14:30:28 expr: syntax error
14:30:28 /bin/sh: 1: gfortran: not found
14:30:28 expr: syntax error


make[1]: Entering directory '/home/maryam/RDTK/jenkins/jobs/newMaryamOpenFace-master-toolkit-floka-minimal-nightly/workspace/opencv-4.1.0/build/OpenBLAS/driver/level2'

14:30:36 /bin/sh: 1: gfortran: not found
14:30:36 expr: syntax error
14:30:36 /bin/sh: 1: gfortran: not found
14:30:36 expr: syntax error
14:30:36 /bin/sh: 1: gfortran: not found
14:30:36 expr: syntax error
ar: `u' modifier ignored since `D' is the default (see `U')

14:30:50 make[1]: Leaving directory '/home/maryam/RDTK/jenkins/jobs/newMaryamOpenFace-master-toolkit-floka-minimal-nightly/workspace/opencv-4.1.0/build/OpenBLAS/driver/level2'
14:30:50 make[1]: warning: -jN forced in submake: disabling jobserver mode.
14:30:50 make[1]: Entering directory '/home/maryam/RDTK/jenkins/jobs/newMaryamOpenFace-master-toolkit-floka-minimal-nightly/workspace/opencv-4.1.0/build/OpenBLAS/driver/level3'
14:30:50 /bin/sh: 1: gfortran: not found
14:30:50 expr: syntax error
14:30:50 /bin/sh: 1: gfortran: not found
14:30:50 expr: syntax error
14:30:50 /bin/sh: 1: gfortran: not found
14:30:50 expr: syntax error



ar: `u' modifier ignored since `D' is the default (see `U')
14:31:05 make[1]: Leaving directory '/home/maryam/RDTK/jenkins/jobs/newMaryamOpenFace-master-toolkit-floka-minimal-nightly/workspace/opencv-4.1.0/build/OpenBLAS/driver/level3'
14:31:05 make[1]: warning: -jN forced in submake: disabling jobserver mode.
14:31:05 make[1]: Entering directory '/home/maryam/RDTK/jenkins/jobs/newMaryamOpenFace-master-toolkit-floka-minimal-nightly/workspace/opencv-4.1.0/build/OpenBLAS/driver/others'

14:31:05 /bin/sh: 1: gfortran: not found
14:31:05 expr: syntax error
14:31:05 /bin/sh: 1: gfortran: not found
14:31:05 expr: syntax error
14:31:05 /bin/sh: 1: gfortran: not found
14:31:05 expr: syntax error



14:31:06 ar: `u' modifier ignored since `D' is the default (see `U')
14:31:06 make[1]: Leaving directory '/home/maryam/RDTK/jenkins/jobs/newMaryamOpenFace-master-toolkit-floka-minimal-nightly/workspace/opencv-4.1.0/build/OpenBLAS/driver/others'
14:31:06 make[1]: warning: -jN forced in submake: disabling jobserver mode.
14:31:06 make[1]: Entering directory '/home/maryam/RDTK/jenkins/jobs/newMaryamOpenFace-master-toolkit-floka-minimal-nightly/workspace/opencv-4.1.0/build/OpenBLAS/kernel'
14:31:06 /bin/sh: 1: gfortran: not found
14:31:06 expr: syntax error
14:31:06 /bin/sh: 1: gfortran: not found
14:31:06 expr: syntax error
14:31:06 /bin/sh: 1: gfortran: not found
14:31:06 expr: syntax error


14:31:19 ar: `u' modifier ignored since `D' is the default (see `U')
14:31:19 make[1]: Leaving directory '/home/maryam/RDTK/jenkins/jobs/newMaryamOpenFace-master-toolkit-floka-minimal-nightly/workspace/opencv-4.1.0/build/OpenBLAS/kernel'
14:31:19 make[1]: warning: -jN forced in submake: disabling jobserver mode.
14:31:19 make[1]: Entering directory '/home/maryam/RDTK/jenkins/jobs/newMaryamOpenFace-master-toolkit-floka-minimal-nightly/workspace/opencv-4.1.0/build/OpenBLAS/exports'
14:31:19 /bin/sh: 1: gfortran: not found
14:31:19 expr: syntax error
14:31:19 /bin/sh: 1: gfortran: not found
14:31:19 expr: syntax error
14:31:19 /bin/sh: 1: gfortran: not found
14:31:19 expr: syntax error



 OpenBLAS build complete. (BLAS CBLAS)
14:31:20 
14:31:20   OS               ... Linux             
14:31:20   Architecture     ... x86_64               
14:31:20   BINARY           ... 64bit                 
14:31:20   C compiler       ... GCC  (cmd & version : cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0)
14:31:20   Library Name     ... libopenblas_haswellp-r0.3.20.a (Multi-threading; Max num-threads is 8)
14:31:20 
14:31:20 To install the library, you can run "make PREFIX=/path/to/your/installation install".


make CC=gcc-10 CPP=g++-10 CXX=g++-10 LD=g++-10 DESTDIR=/vol/folka-minimal/floka-minimal-nightly install
14:31:20 make: gcc-10: Command not found
14:31:20 make: *** [getarch] Error 127
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found

14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gfortran: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gfortran: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gfortran: not found
14:31:20 expr: syntax error


 make -j 8 -f Makefile.install install
14:31:20 make[1]: Entering directory '/home/maryam/RDTK/jenkins/jobs/newMaryamOpenFace-master-toolkit-floka-minimal-nightly/workspace/opencv-4.1.0/build/OpenBLAS'
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gcc-10: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gfortran: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gfortran: not found
14:31:20 expr: syntax error
14:31:20 /bin/sh: 1: gfortran: not found
14:31:20 expr: syntax error
14:31:20 Generating openblas_config.h in /vol/folka-minimal/floka-minimal-nightly/opt/OpenBLAS/include
14:31:20 Generating f77blas.h in /vol/folka-minimal/floka-minimal-nightly/opt/OpenBLAS/include
14:31:20 Generating cblas.h in /vol/folka-minimal/floka-minimal-nightly/opt/OpenBLAS/include
14:31:20 Copying the static library to /vol/folka-minimal/floka-minimal-nightly/opt/OpenBLAS/lib
14:31:20 Copying the shared library to /vol/folka-minimal/floka-minimal-nightly/opt/OpenBLAS/lib
14:31:20 Generating openblas.pc in /vol/folka-minimal/floka-minimal-nightly/opt/OpenBLAS/lib/pkgconfig
14:31:20 Generating OpenBLASConfig.cmake in /vol/folka-minimal/floka-minimal-nightly/opt/OpenBLAS/lib/cmake/openblas
14:31:20 Generating OpenBLASConfigVersion.cmake in /vol/folka-minimal/floka-minimal-nightly/opt/OpenBLAS/lib/cmake/openblas
14:31:20 Install OK!

git clone https://github.com/TadasBaltrusaitis/OpenFace.git

+ cd OpenFace
15:32:22 + mkdir build
15:32:22 + cd build
15:32:22 + cmake -D CMAKE_CXX_COMPILER=g++-8 -D CMAKE_C_COMPILER=gcc-8 -D CMAKE_BUILD_TYPE=RELEASE .
15:32:22 CMake Error: The source directory "/home/maryam/RDTK/jenkins/jobs/newMaryamOpenFace-master-toolkit-floka-minimal-nightly/workspace/opencv-4.1.0/build/OpenBLAS/OpenFace/build" does not appear to contain CMakeLists.txt.

Can anybody help me?

Looks like gfortran isn’t installed

Same with gcc-10

1 Like