Closed Jister closed 7 years ago
I remove it from CMakelist.txt, it still shows me the same error. Now the CMakelist is as the following shows: ... link_directories("/usr/lib/aarch64-linux-gnu/tegra") ## on Jetson TX1 64bits, the correct libGL.so is located here (the default one will lead to linking error (undef ref)) endif()
add_definitions(-Wno-write-strings)
SET(LINUX_LIBRARIES "pthread" "X11")
ENDIF(WIN32) ...
You should clean the cache and re-run cmake in that case, in the sample folder :
cd build
rm -rf *
cmake ..
make
I have clean it, and even remove the build file and re-create it, still the same error, it's really confusing.
ubuntu@tegra-ubuntu:~/src/zed-tracking-viewer/build$ rm -rf *
ubuntu@tegra-ubuntu:~/src/zed-tracking-viewer/build$ cmake ..
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- 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
build with AVX support... detected from cpuid
-- Found GLUT: /usr/lib/arm-linux-gnueabihf/libglut.so
-- Found GLEW: /usr/include
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda-6.5 (found suitable exact version "6.5")
-- Found CUDA: /usr/local/cuda-6.5 (found version "6.5")
-- Found OpenGL: /usr/lib/arm-linux-gnueabihf/libGL.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/src/zed-tracking-viewer/build
ubuntu@tegra-ubuntu:~/src/zed-tracking-viewer/build$ make
Scanning dependencies of target ZED_Tracking_Viewer
[ 14%] Building CXX object CMakeFiles/ZED_Tracking_Viewer.dir/src/CameraGL.o
c++: error: unrecognized command line option ‘-mavx’
make[2]: [CMakeFiles/ZED_Tracking_Viewer.dir/src/CameraGL.o] Error 1
make[1]: [CMakeFiles/ZED_Tracking_Viewer.dir/all] Error 2
make: *** [all] Error 2
ubuntu@tegra-ubuntu:~/src/zed-tracking-viewer/build$
Ok,
Could you open the file /usr/local/zed/zed-config.cmake
and check if you have an "AVX Check" that add the definition ? If so remove it and test again.
It seems that cpuid
believe that the CPU has AVX support somehow (from the log "build with AVX support... detected from cpuid
")
Yes, I remove it and it can compile now, thank you very much for your help.
Hi, when I compile the code on NAVIDIA Jetson TK1, it shows c++: error: unrecognized command line option '-mavx'
how can I solve it?