Build Failing on Jetson AGX Xavier - Ubuntu 18.04 - error

Dear Sirs

I had some difficulties… :sweat:

If someone of good soul can help me `^-^´

Terminal :no_mouth:

--Directory named /home/diyanderson/blender-git/blender/../lib/tests/modeling/geometry_nodes/attributes/ Not Found, disabling test.
    -- Directory named /home/diyanderson/blender-git/blender/../lib/tests/modeling/geometry_nodes/curve_primitives/ Not Found, disabling test.
    -- Directory named /home/diyanderson/blender-git/blender/../lib/tests/modeling/geometry_nodes/curves/ Not Found, disabling test.
    -- Directory Damed /home/diyanderson/blender-git/blender/../lib/tests/modeling/geometry_nodes/geometry/ Not Found, disabling test.
    -- Directory named /home/diyanderson/blender-git/blender/../lib/tests/modeling/geometry_nodes/mesh_primitives/ Not Found, disabling test.
    -- Directory named /home/diyanderson/blender-git/blender/../lib/tests/modeling/geometry_nodes/mesh/ Not Found, disabling test.
    -- Directory named /home/diyanderson/blender-git/blender/../lib/tests/modeling/geometry_nodes/mesh/extrude/ Not Found, disabling test.
    -- Directory named /home/diyanderson/blender-git/blender/../lib/tests/modeling/geometry_nodes/points/ Not Found, disabling test.
    -- Directory named /home/diyanderson/blender-git/blender/../lib/tests/modeling/geometry_nodes/utilities/ Not Found, disabling test.
    -- Directory named /home/diyanderson/blender-git/blender/../lib/tests/modeling/geometry_nodes/vector/ Not Found, disabling test.
    -- Directory named /home/diyanderson/blender-git/blender/../lib/tests/modeling/geometry_nodes/mesh/boolean/ Not Found, disabling test.
    -- Directory named /home/diyanderson/blender-git/blender/../lib/tests/modeling/geometry_nodes/volume/ Not Found, disabling test.
    -- Directory named /home/diyanderson/blender-git/blender/../lib/tests/modeling/geometry_nodes/mesh/subdivision_tests/ Not Found, disabling test.
    CMake Error at source/creator/CMakeLists.txt:517 (install):
      install TARGETS given target "blender-thumbnailer" which does not exist in
      this directory.


-- RPM Build Found: /usr/bin/rpmbuild
-- C Compiler:   "GNU"
-- C++ Compiler: "GNU"

Blender Configuration
=====================

  Build Options:
  - WITH_ALEMBIC                ON
  - WITH_BULLET                 ON
  - WITH_CLANG                  ON
  - WITH_CYCLES                 ON
  - WITH_FFTW3                  ON
  - WITH_FREESTYLE              ON
  - WITH_GMP                    ON
  - WITH_HARU                   ON
  - WITH_IK_ITASC               ON
  - WITH_IK_SOLVER              ON
  - WITH_INPUT_NDOF             ON
  - WITH_INPUT_IME              
  - WITH_INTERNATIONAL          ON
  - WITH_OPENCOLLADA            ON
  - WITH_OPENCOLORIO            ON
  - WITH_OPENIMAGEDENOISE       ON
  - WITH_OPENVDB                ON
  - WITH_POTRACE                ON
  - WITH_PUGIXML                ON
  - WITH_QUADRIFLOW             ON
  - WITH_TBB                    ON
  - WITH_USD                    ON
  - WITH_XR_OPENXR              ON

  Compiler Options:
  - WITH_BUILDINFO              ON
  - WITH_OPENMP                 ON

  System Options:
  - WITH_INSTALL_PORTABLE       ON
  - WITH_MEM_JEMALLOC           ON
  - WITH_MEM_VALGRIND           OFF
  - WITH_SYSTEM_GLEW            OFF
  - WITH_X11_ALPHA              ON
  - WITH_X11_XF86VMODE          ON
  - WITH_X11_XFIXES             ON
  - WITH_X11_XINPUT             ON

  Image Formats:
  - WITH_IMAGE_CINEON           ON
  - WITH_IMAGE_DDS              ON
  - WITH_IMAGE_HDR              ON
  - WITH_IMAGE_OPENEXR          ON
  - WITH_IMAGE_OPENJPEG         ON
  - WITH_IMAGE_TIFF             ON
  - WITH_OPENIMAGEIO            ON

  Audio:
  - WITH_CODEC_AVI              ON
  - WITH_CODEC_FFMPEG           ON
  - WITH_CODEC_SNDFILE          ON
  - WITH_COREAUDIO              OFF
  - WITH_JACK                   OFF
  - WITH_JACK_DYNLOAD           OFF
  - WITH_OPENAL                 ON
  - WITH_PULSEAUDIO             OFF
  - WITH_PULSEAUDIO_DYNLOAD     OFF
  - WITH_SDL                    ON
  - WITH_SDL_DYNLOAD            OFF
  - WITH_WASAPI                 OFF

  Compression:
  - WITH_LZMA                   ON
  - WITH_LZO                    ON

  Python:
  - WITH_PYTHON_INSTALL         ON
  - WITH_PYTHON_INSTALL_NUMPY   ON
  - WITH_PYTHON_INSTALL_ZSTANDARDON
  - WITH_PYTHON_MODULE          OFF
  - WITH_PYTHON_SAFETY          OFF

  Modifiers:
  - WITH_MOD_FLUID              ON
  - WITH_MOD_OCEANSIM           ON
  - WITH_MOD_REMESH             ON

  OpenGL:
  - WITH_GL_EGL                 OFF
  - WITH_GL_PROFILE_ES20        OFF
  - WITH_GLEW_ES                OFF

  
-- Configuring incomplete, errors occurred!
See also "/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeOutput.log".
See also "/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeError.log".
GNUmakefile:342: recipe for target 'all' failed
make: *** [all] Error 1

Attached log

Determining if the pthread_create exist failed with the following output:
Change Dir: /home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_c0966/fast"
make[1]: Entering directory '/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp'
/usr/bin/make -f CMakeFiles/cmTC_c0966.dir/build.make CMakeFiles/cmTC_c0966.dir/build
make[2]: Entering directory '/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_c0966.dir/CheckSymbolExists.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_c0966.dir/CheckSymbolExists.c.o   -c /home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_c0966
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c0966.dir/link.txt --verbose=1
/usr/bin/cc     -static-libstdc++  CMakeFiles/cmTC_c0966.dir/CheckSymbolExists.c.o  -o cmTC_c0966 
CMakeFiles/cmTC_c0966.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x14): undefined reference to `pthread_create'
CheckSymbolExists.c:(.text+0x18): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_c0966.dir/build.make:97: recipe for target 'cmTC_c0966' failed
make[2]: *** [cmTC_c0966] Error 1
make[2]: Leaving directory '/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_c0966/fast' failed
make[1]: *** [cmTC_c0966/fast] Error 2
make[1]: Leaving directory '/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp'

File /home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_9a81c/fast"
make[1]: Entering directory '/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp'
/usr/bin/make -f CMakeFiles/cmTC_9a81c.dir/build.make CMakeFiles/cmTC_9a81c.dir/build
make[2]: Entering directory '/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_9a81c.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_9a81c.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.10/Modules/CheckFunctionExists.c
Linking C executable cmTC_9a81c
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9a81c.dir/link.txt --verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=pthread_create   -static-libstdc++  CMakeFiles/cmTC_9a81c.dir/CheckFunctionExists.c.o  -o cmTC_9a81c -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_9a81c.dir/build.make:97: recipe for target 'cmTC_9a81c' failed
make[2]: *** [cmTC_9a81c] Error 1
make[2]: Leaving directory '/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_9a81c/fast' failed
make[1]: *** [cmTC_9a81c/fast] Error 2
make[1]: Leaving directory '/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp'


Performing C++ SOURCE FILE Test CXX_HAS_SSE failed with the following output:
Change Dir: /home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_704cb/fast"
make[1]: Entering directory '/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp'
/usr/bin/make -f CMakeFiles/cmTC_704cb.dir/build.make CMakeFiles/cmTC_704cb.dir/build
make[2]: Entering directory '/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_704cb.dir/src.cxx.o
/usr/bin/c++    -Wuninitialized -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wformat-signedness -Wrestrict -Wno-suggest-override -Wuninitialized -Wundef -Wmissing-declarations -Wimplicit-fallthrough=5  -pipe -fPIC -funsigned-char -fno-strict-aliasing -ffp-contract=off -D_GLIBCXX_USE_CXX11_ABI=0 -fmacro-prefix-map="/home/diyanderson/blender-git/blender/"="" -fmacro-prefix-map="/home/diyanderson/blender-git/build_linux/"="" -DCXX_HAS_SSE   -msse -std=c++1z -o CMakeFiles/cmTC_704cb.dir/src.cxx.o -c /home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp/src.cxx
c++: error: unrecognized command line option '-msse'
CMakeFiles/cmTC_704cb.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_704cb.dir/src.cxx.o' failed
make[2]: *** [CMakeFiles/cmTC_704cb.dir/src.cxx.o] Error 1
make[2]: Leaving directory '/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_704cb/fast' failed
make[1]: *** [cmTC_704cb/fast] Error 2
make[1]: Leaving directory '/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp'

Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test CXX_HAS_AVX failed with the following output:
Change Dir: /home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_9ab74/fast"
make[1]: Entering directory '/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp'
/usr/bin/make -f CMakeFiles/cmTC_9ab74.dir/build.make CMakeFiles/cmTC_9ab74.dir/build
make[2]: Entering directory '/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_9ab74.dir/src.cxx.o
/usr/bin/c++    -Wuninitialized -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wformat-signedness -Wrestrict -Wno-suggest-override -Wuninitialized -Wundef -Wmissing-declarations -Wimplicit-fallthrough=5  -pipe -fPIC -funsigned-char -fno-strict-aliasing -ffp-contract=off -D_GLIBCXX_USE_CXX11_ABI=0 -fmacro-prefix-map="/home/diyanderson/blender-git/blender/"="" -fmacro-prefix-map="/home/diyanderson/blender-git/build_linux/"="" -DCXX_HAS_AVX   -mavx -std=c++1z -o CMakeFiles/cmTC_9ab74.dir/src.cxx.o -c /home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp/src.cxx
c++: error: unrecognized command line option '-mavx'
CMakeFiles/cmTC_9ab74.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_9ab74.dir/src.cxx.o' failed
make[2]: *** [CMakeFiles/cmTC_9ab74.dir/src.cxx.o] Error 1
make[2]: Leaving directory '/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_9ab74/fast' failed
make[1]: *** [cmTC_9ab74/fast] Error 2
make[1]: Leaving directory '/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp'

Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test CXX_HAS_AVX2 failed with the following output:
Change Dir: /home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_84109/fast"
make[1]: Entering directory '/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp'
/usr/bin/make -f CMakeFiles/cmTC_84109.dir/build.make CMakeFiles/cmTC_84109.dir/build
make[2]: Entering directory '/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_84109.dir/src.cxx.o
/usr/bin/c++    -Wuninitialized -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wformat-signedness -Wrestrict -Wno-suggest-override -Wuninitialized -Wundef -Wmissing-declarations -Wimplicit-fallthrough=5  -pipe -fPIC -funsigned-char -fno-strict-aliasing -ffp-contract=off -D_GLIBCXX_USE_CXX11_ABI=0 -fmacro-prefix-map="/home/diyanderson/blender-git/blender/"="" -fmacro-prefix-map="/home/diyanderson/blender-git/build_linux/"="" -DCXX_HAS_AVX2   -mavx2 -std=c++1z -o CMakeFiles/cmTC_84109.dir/src.cxx.o -c /home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp/src.cxx
c++: error: unrecognized command line option '-mavx2'
CMakeFiles/cmTC_84109.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_84109.dir/src.cxx.o' failed
make[2]: *** [CMakeFiles/cmTC_84109.dir/src.cxx.o] Error 1
make[2]: Leaving directory '/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_84109/fast' failed
make[1]: *** [cmTC_84109/fast] Error 2
make[1]: Leaving directory '/home/diyanderson/blender-git/build_linux/CMakeFiles/CMakeTmp'

Source file was:
int main() { return 0; }

Best Regards :wink: