linux环境配置错误记录

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

猜你喜欢

转载自www.cnblogs.com/phillee/p/10635267.html