1. 程式人生 > >linux環境配置錯誤記錄

linux環境配置錯誤記錄

make address reference inux 兼容 table nes -- csdn

1. pip install --special_version


pip10.0.1 以上的版本安裝包報一堆錯誤,所以降級為9.0.3 版本。

使用命令:

python -m pip install pip==9.0.3

其中, -m 參數的意思是將庫中的python模塊用作腳本去運行[1]

run library module as a script (terminates option list)

2. fusibile make error


在編譯 fusibile 是出現錯誤

最開始是 cmake .. 都沒有通過,因為沒找到 OpenCV 鏈接庫,在裝好 OpenCV

之後問題解決,順利通過

然後 make 又出錯,錯誤提示如下

 1 ~/mvsnet/fusibile/build$ make
 2 [ 33%] Building NVCC (Device) object CMakeFiles/fusibile.dir/fusibile_generated_fusibile.cu.o
 3 ptxas info    : 77824 bytes gmem, 72 bytes cmem[3]
 4 ptxas info    : Compiling entry function _Z8fusibileR11GlobalStatei for sm_30
5 ptxas info : Function properties for _Z8fusibileR11GlobalStatei 6 8192 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads 7 ptxas info : Used 47 registers, 332 bytes cmem[0], 20 bytes cmem[2] 8 ptxas info : 77824 bytes gmem, 72 bytes cmem[3] 9 ptxas info : Compiling entry function
_Z8fusibileR11GlobalStatei for sm_52 10 ptxas info : Function properties for _Z8fusibileR11GlobalStatei 11 8192 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads 12 ptxas info : Used 48 registers, 332 bytes cmem[0], 20 bytes cmem[2] 13 /usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’: 14 /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope 15 return (char *) memcpy (__dest, __src, __n) + __n; 16 ^ 17 CMake Error at fusibile_generated_fusibile.cu.o.cmake:266 (message): 18 Error generating file 19 /home/cvlab/mvsnet/fusibile/build/CMakeFiles/fusibile.dir//./fusibile_generated_fusibile.cu.o 20 21 22 CMakeFiles/fusibile.dir/build.make:63: recipe for target CMakeFiles/fusibile.dir/fusibile_generated_fusibile.cu.o failed 23 make[2]: *** [CMakeFiles/fusibile.dir/fusibile_generated_fusibile.cu.o] Error 1 24 CMakeFiles/Makefile2:67: recipe for target CMakeFiles/fusibile.dir/all failed 25 make[1]: *** [CMakeFiles/fusibile.dir/all] Error 2 26 Makefile:83: recipe for target all failed 27 make: *** [all] Error 2

參考網友【@cheney康】編譯opencv2.4.13error 的解決方案,對 g++ 版本進行兼容設置,在 CMakeLists.txt 中添加

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORCE_INLINES")

再運行make出現下面的信息,應該算是已經通過了?

 1 [ 33%] Building NVCC (Device) object CMakeFiles/fusibile.dir/fusibile_generated_fusibile.cu.o
 2 ptxas info    : 77824 bytes gmem, 72 bytes cmem[3]
 3 ptxas info    : Compiling entry function _Z8fusibileR11GlobalStatei for sm_30
 4 ptxas info    : Function properties for _Z8fusibileR11GlobalStatei
 5     8192 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
 6 ptxas info    : Used 47 registers, 332 bytes cmem[0], 20 bytes cmem[2]
 7 ptxas info    : 77824 bytes gmem, 72 bytes cmem[3]
 8 ptxas info    : Compiling entry function _Z8fusibileR11GlobalStatei for sm_52
 9 ptxas info    : Function properties for _Z8fusibileR11GlobalStatei
10     8192 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
11 ptxas info    : Used 48 registers, 332 bytes cmem[0], 20 bytes cmem[2]
12 Scanning dependencies of target fusibile
13 [ 66%] Building CXX object CMakeFiles/fusibile.dir/main.cpp.o
14 In file included from /home/cvlab/mvsnet/fusibile/main.cpp:32:0:
15 /home/cvlab/mvsnet/fusibile/helper_cuda.h: In function ‘const char* _cudaGetErrorEnum(CUresult)’:
16 /home/cvlab/mvsnet/fusibile/helper_cuda.h:293:12: warning: enumeration value ‘CUDA_ERROR_PEER_ACCESS_UNSUPPORTED’ not handled in switch [-Wswitch]
17      switch (error)
18             ^
19 /home/cvlab/mvsnet/fusibile/helper_cuda.h:293:12: warning: enumeration value ‘CUDA_ERROR_INVALID_PTX’ not handled in switch [-Wswitch]
20 /home/cvlab/mvsnet/fusibile/helper_cuda.h:293:12: warning: enumeration value ‘CUDA_ERROR_INVALID_GRAPHICS_CONTEXT’ not handled in switch [-Wswitch]
21 /home/cvlab/mvsnet/fusibile/helper_cuda.h:293:12: warning: enumeration value ‘CUDA_ERROR_ILLEGAL_ADDRESS’ not handled in switch [-Wswitch]
22 /home/cvlab/mvsnet/fusibile/helper_cuda.h:293:12: warning: enumeration value ‘CUDA_ERROR_HARDWARE_STACK_ERROR’ not handled in switch [-Wswitch]
23 /home/cvlab/mvsnet/fusibile/helper_cuda.h:293:12: warning: enumeration value ‘CUDA_ERROR_ILLEGAL_INSTRUCTION’ not handled in switch [-Wswitch]
24 /home/cvlab/mvsnet/fusibile/helper_cuda.h:293:12: warning: enumeration value ‘CUDA_ERROR_MISALIGNED_ADDRESS’ not handled in switch [-Wswitch]
25 /home/cvlab/mvsnet/fusibile/helper_cuda.h:293:12: warning: enumeration value ‘CUDA_ERROR_INVALID_ADDRESS_SPACE’ not handled in switch [-Wswitch]
26 /home/cvlab/mvsnet/fusibile/helper_cuda.h:293:12: warning: enumeration value ‘CUDA_ERROR_INVALID_PC’ not handled in switch [-Wswitch]
27 /home/cvlab/mvsnet/fusibile/helper_cuda.h:293:12: warning: enumeration value ‘CUDA_ERROR_NOT_PERMITTED’ not handled in switch [-Wswitch]
28 /home/cvlab/mvsnet/fusibile/helper_cuda.h:293:12: warning: enumeration value ‘CUDA_ERROR_NOT_SUPPORTED’ not handled in switch [-Wswitch]
29 [100%] Linking CXX executable fusibile
30 [100%] Built target fusibile

reference


[1] pip版本降級

[2] 編譯opencv 2.4.13error:1 /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope

linux環境配置錯誤記錄