cc: error: unrecognized command line option ‘-msse2’ - nvidia

In Nvidia jetson Xavier, when cmake CudaSift
nvidia#tegra-ubuntu:/usr/local/CudaSift-Maxwell/build$ make
[ 14%] Building NVCC (Device) object CMakeFiles/cudasift.dir/cudasift_generated_matching.cu.o
cc: error: unrecognized command line option ‘-msse2’
CMake Error at cudasift_generated_matching.cu.o.cmake:207 (message):
Error generating
/usr/local/CudaSift-Maxwell/build/CMakeFiles/cudasift.dir//./cudasift_generated_matching.cu.o

Related

unable to compile opencv 3.4.4 from source

Running ubuntu with 5.3 kernel.
/usr/bin/ld: /usr/local/lib/libavcodec.a(vc1dsp_mmx.o): relocation R_X86_64_PC32 against symbol `ff_pw_9' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:307: recipe for target 'lib/libopencv_videoio.so.3.4.0' failed
make[2]: *** [lib/libopencv_videoio.so.3.4.0] Error 1
CMakeFiles/Makefile2:8259: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
Also:
ldd --version
ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27
gcc --version
gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
Any ideas ?

OpenCV-3.4.0 installation:"make -j8" failed

I tried to install opencv-3.4.0 according to the tutorials https://github.com/TadasBaltrusaitis/OpenFace/wiki/Unix-Installation,
but when I finished cmake,then try make -j8, it failed at 30%. Does anyone know the solution and can help me? Thank you very much.
All demanding dependencies for OpenCV was installed.
[ 29%] Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o
[ 29%] Built target pch_Generate_opencv_test_videostab
[ 30%] Built target pch_Generate_opencv_videostab
[ 30%] Built target pch_Generate_opencv_perf_superres
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
In file included from /home/zq/opencv-3.4.0/modules/cudev/include/opencv2/cudev/util/tuple.hpp:50:0,
from /home/zq/opencv-3.4.0/modules/cudev/include/opencv2/cudev.hpp:55,
from /home/zq/opencv-3.4.0/modules/core/src/cuda/gpu_mat.cu:52:
/home/zq/opencv-3.4.0/modules/cudev/include/opencv2/cudev/util/detail/tuple.hpp:49:26: fatal error: thrust/tuple.h: No such file or directory
compilation terminated.
CMake Error at cuda_compile_generated_gpu_mat.cu.o.cmake:208 (message):
Error generating
/home/zq/opencv-3.4.0/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o
modules/core/CMakeFiles/opencv_core.dir/build.make:63: recipe for target 'modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o' failed
make[2]: *** [modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o] Error 1
CMakeFiles/Makefile2:1730: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

ld: archive has no table of contents file error with homebrew

I'm trying to compile weechat,
%> brew upgrade weechat --debug
...
[ 86%] Built target weechat_gui_curses_normal
[ 87%] Building C object src/gui/curses/normal/CMakeFiles/weechat.dir/main.o
[ 87%] Linking C executable weechat
ld: archive has no table of contents file '../../../plugins/libweechat_plugins.a' for architecture x86_64
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
make[2]: *** [src/gui/curses/normal/weechat] Error 254
make[1]: *** [src/gui/curses/normal/CMakeFiles/weechat.dir/all] Error 2
make: *** [all] Error 2
bash-3.2$ exit
It fails with archive has no table of contents file for architecture x86_64, it seem to be a generic error, as it happens with mysql#5.5 and many other packages.
I also see ranlib errors
/usr/local/homebrew/bin/ranlib: libweechat_gui_curses_normal.a(gui-curses-term.o): unknown load command 0x32
Any ideas?
Resolved.
Simple do brew unlink binutils or specify RANLIB=/usr/bin/ranlib.

OpenCV Ubuntu installation Error

I'm Trying to install OpenCV on Ubuntu 14.10 but i'm facing this error again and again :(
/usr/bin/ld: /usr/local/lib/libavcodec.a(avpacket.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavcodec.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
modules/highgui/CMakeFiles/opencv_highgui.dir/build.make:654: recipe for target 'lib/libopencv_highgui.so.2.4.9' failed
make[2]: *** [lib/libopencv_highgui.so.2.4.9] Error 1
CMakeFiles/Makefile2:1767: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui.dir/all' failed
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
Makefile:133: recipe for target 'all' failed
make: *** [all] Error 2
Please provide the command history before you have encountered the error.
If calling make was the last thing before the error occured, you can try to call make CFLAGS="-fPIC" instead.
Late to the party, but the issue is that FFMPEG is not compiled with position-independent code. Go to your FFMPEG directory and do
./configure --enable-nonfree --enable-pic --enable-shared
then redo the make, make install steps, and re-do the build of opencv.

Error in opencv_video when compiling ROS Hydro from source in Odroid-U3

I'm having a problem when trying to compile ROS Hydro from the source on Odroid-U3. This is the related error:
Built target pch_Generate_opencv_superres
[ 31%] Built target opencv_core
[ 32%] Built target opencv_flann
[ 35%] Built target opencv_ml
[ 42%] Built target opencv_imgproc
[ 42%] Built target opencv_photo
[ 45%] Built target opencv_video
Linking CXX shared library ../../lib/libopencv_highgui.so
/usr/local/lib/libavcodec.a(videodsp_armv5te.o): In function `ff_prefetch_arm':
/home/odroid/odroid-sources/sources/ffmpeg/libavcodec/arm/videodsp_armv5te.S:29:(.text+0x8): relocation truncated to fit: R_ARM_THM_JUMP19 against symbol `ff_prefetch_arm' defined in .text section in /usr/local/lib/libavcodec.a(videodsp_armv5te.o)
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libopencv_highgui.so.2.4.6] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2
<== Failed to process package 'opencv2':
Command '/home/odroid/ros_catkin_ws/install_isolated/env.sh make -j4 -l4' returned non-zero exit status 2
Reproduce this error by running:
==> cd /home/odroid/ros_catkin_ws/build_isolated/opencv2 && /home/odroid/ros_catkin_ws/install_isolated/env.sh make -j4 -l4
Command failed, exiting.
Already tried to install those libraries by sudo apt-get install but no difference. Any help would be awesome. Thanks!

Resources