Usr include string h error

/usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope #13

Comments

Failed at compile time with the following error:

nvcc -g -O2 -I . -Xptxas «-abi=no -v» -gencode=arch=compute_20,code=»sm_20,compute_20″ -gencode=arch=compute_30,code=»sm_30,compute_30″ -gencode=arch=compute_35,code=»sm_35,compute_35″ —maxrregcount=80 —ptxas-options=-v -I./compat/jansson -o cryptonight/cryptonight.o -c cryptonight/cryptonight.cu
ptxas warning : ‘option -abi=no’ might get deprecated in future
ptxas warning : Too big maxrregcount value specified 80, will be ignored
ptxas info : 0 bytes gmem
ptxas info : Compiling entry function ‘cuda_dummy_entry‘ for ‘sm_20’
ptxas info : Used 0 registers
ptxas warning : ‘option -abi=no’ might get deprecated in future
ptxas warning : Too big maxrregcount value specified 80, will be ignored
ptxas info : 0 bytes gmem
ptxas info : Compiling entry function ‘cuda_dummy_entry‘ for ‘sm_30’
ptxas info : Used 0 registers
ptxas warning : ‘option -abi=no’ might get deprecated in future
ptxas info : 0 bytes gmem
ptxas info : Compiling entry function ‘cuda_dummy_entry‘ for ‘sm_35’
ptxas info : Used 0 registers
/usr/include/string.h: In function ‘void* mempcpy_inline(void, const void, size_t)’:
/usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope
return (char ) memcpy (__dest, __src, __n) + __n;
^
Makefile:1155: recipe for target ‘cryptonight/cryptonight.o’ failed
make[2]: *
* [cryptonight/cryptonight.o] Error 1

The text was updated successfully, but these errors were encountered:

Источник

Compiling with CUDA on Ubuntu 16.04 + Solution #4046

Comments

Compiling on a clean install of Ubuntu 16.04 with cmake and using CUDA from the repo.

I get the following error:

/usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’: /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope return (char *) memcpy (__dest, __src, __n) + __n; ^ /usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’: /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope return (char *) memcpy (__dest, __src, __n) + __n; ^ /usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’: /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope return (char *) memcpy (__dest, __src, __n) + __n; ^ /usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’: /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope return (char *) memcpy (__dest, __src, __n) + __n; ^ /usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’: /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope return (char *) memcpy (__dest, __src, __n) + __n; ^ /usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’: /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope return (char *) memcpy (__dest, __src, __n) + __n; ^ /usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’: /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope return (char *) memcpy (__dest, __src, __n) + __n; ^ CMake Error at cuda_compile_generated_sgd_solver.cu.o.cmake:266 (message): Error generating file /opt/caffe/build/src/caffe/CMakeFiles/cuda_compile.dir/solvers/./cuda_compile_generated_sgd_solver.cu.o
Seems TensorFlow has similar issues: https://github.com/fayeshine/tensorflow/commit/6c8c572c12521d706eda692fa7793f90b45dde20

Читайте также:  Bulk load data conversion error type mismatch or invalid character

By adding that flag to my CMakeLists.txt it fixed the problem and compiles fine. ie. Add this near the front:
set($ «-D_FORCE_INLINES $«)

Someone might be able to add this to the cmake file.

The text was updated successfully, but these errors were encountered:

Источник

fatal error: ‘string.h’ file not found #25669

Comments

1 error generated. CMake Error at torch_generated_THCBlas.cu.o.Release.cmake:220 (message): Error generating /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/./torch_generated_THCBlas.cu.o [58/1762] Building NVCC (Device) object caffe2/CMakeFiles/torch.dir/__/aten/src/THC/torch_generated_THCSortUtils.cu.o FAILED: caffe2/CMakeFiles/torch.dir/__/aten/src/THC/torch_generated_THCSortUtils.cu.o cd /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC && /Users/vincentqb/anaconda3/envs/pytorch-built/bin/cmake -E make_directory /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/. && /Users/vincentqb/anaconda3/envs/pytorch-built/bin/cmake -D verbose:BOOL=OFF -D build_configuration:STRING=Release -D generated_file:STRING=/Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/./torch_generated_THCSortUtils.cu.o -D generated_cubin_file:STRING=/Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/./torch_generated_THCSortUtils.cu.o.cubin.txt -P /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/torch_generated_THCSortUtils.cu.o.Release.cmake In file included from :1: In file included from /usr/local/cuda/include/cuda_runtime.h:115: In file included from /usr/local/cuda/include/crt/common_functions.h:77: /Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:61:15: fatal error: ‘string.h’ file not found #include_next ^

1 error generated. CMake Error at torch_generated_THCSortUtils.cu.o.Release.cmake:220 (message): Error generating /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/./torch_generated_THCSortUtils.cu.o [59/1762] Building NVCC (Device) object caffe2/CMakeFiles/torch.dir/__/aten/src/THC/generated/torch_generated_THCTensorMathCompareByte.cu.o FAILED: caffe2/CMakeFiles/torch.dir/__/aten/src/THC/generated/torch_generated_THCTensorMathCompareByte.cu.o cd /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/generated && /Users/vincentqb/anaconda3/envs/pytorch-built/bin/cmake -E make_directory /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/generated/. && /Users/vincentqb/anaconda3/envs/pytorch-built/bin/cmake -D verbose:BOOL=OFF -D build_configuration:STRING=Release -D generated_file:STRING=/Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/generated/./torch_generated_THCTensorMathCompareByte.cu.o -D generated_cubin_file:STRING=/Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/generated/./torch_generated_THCTensorMathCompareByte.cu.o.cubin.txt -P /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/generated/torch_generated_THCTensorMathCompareByte.cu.o.Release.cmake In file included from :1: In file included from /usr/local/cuda/include/cuda_runtime.h:115: In file included from /usr/local/cuda/include/crt/common_functions.h:77: /Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:61:15: fatal error: ‘string.h’ file not found #include_next ^

1 error generated. CMake Error at torch_generated_THCTensorMathCompareByte.cu.o.Release.cmake:220 (message): Error generating /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/generated/./torch_generated_THCTensorMathCompareByte.cu.o [60/1762] Building NVCC (Device) object caffe2/CMakeFiles/torch.dir/__/aten/src/THC/torch_generated_THCTensorMathBlas.cu.o FAILED: caffe2/CMakeFiles/torch.dir/__/aten/src/THC/torch_generated_THCTensorMathBlas.cu.o cd /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC && /Users/vincentqb/anaconda3/envs/pytorch-built/bin/cmake -E make_directory /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/. && /Users/vincentqb/anaconda3/envs/pytorch-built/bin/cmake -D verbose:BOOL=OFF -D build_configuration:STRING=Release -D generated_file:STRING=/Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/./torch_generated_THCTensorMathBlas.cu.o -D generated_cubin_file:STRING=/Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/./torch_generated_THCTensorMathBlas.cu.o.cubin.txt -P /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/torch_generated_THCTensorMathBlas.cu.o.Release.cmake In file included from :1: In file included from /usr/local/cuda/include/cuda_runtime.h:115: In file included from /usr/local/cuda/include/crt/common_functions.h:77: /Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:61:15: fatal error: ‘string.h’ file not found #include_next ^

1 error generated. CMake Error at torch_generated_THCTensorMathBlas.cu.o.Release.cmake:220 (message): Error generating /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/./torch_generated_THCTensorMathBlas.cu.o [61/1762] Building NVCC (Device) object caffe2/CMakeFiles/torch.dir/__/aten/src/THC/torch_generated_THCStorage.cu.o FAILED: caffe2/CMakeFiles/torch.dir/__/aten/src/THC/torch_generated_THCStorage.cu.o cd /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC && /Users/vincentqb/anaconda3/envs/pytorch-built/bin/cmake -E make_directory /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/. && /Users/vincentqb/anaconda3/envs/pytorch-built/bin/cmake -D verbose:BOOL=OFF -D build_configuration:STRING=Release -D generated_file:STRING=/Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/./torch_generated_THCStorage.cu.o -D generated_cubin_file:STRING=/Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/./torch_generated_THCStorage.cu.o.cubin.txt -P /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/torch_generated_THCStorage.cu.o.Release.cmake In file included from :1: In file included from /usr/local/cuda/include/cuda_runtime.h:115: In file included from /usr/local/cuda/include/crt/common_functions.h:77: /Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:61:15: fatal error: ‘string.h’ file not found #include_next ^

Читайте также:  Ubuntu nvidia driver error

1 error generated. CMake Error at torch_generated_THCStorage.cu.o.Release.cmake:220 (message): Error generating /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/./torch_generated_THCStorage.cu.o [62/1762] Building NVCC (Device) object caffe2/CMakeFiles/torch.dir/__/aten/src/THC/torch_generated_THCTensorMathReduce.cu.o FAILED: caffe2/CMakeFiles/torch.dir/__/aten/src/THC/torch_generated_THCTensorMathReduce.cu.o cd /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC && /Users/vincentqb/anaconda3/envs/pytorch-built/bin/cmake -E make_directory /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/. && /Users/vincentqb/anaconda3/envs/pytorch-built/bin/cmake -D verbose:BOOL=OFF -D build_configuration:STRING=Release -D generated_file:STRING=/Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/./torch_generated_THCTensorMathReduce.cu.o -D generated_cubin_file:STRING=/Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/./torch_generated_THCTensorMathReduce.cu.o.cubin.txt -P /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/torch_generated_THCTensorMathReduce.cu.o.Release.cmake In file included from :1: In file included from /usr/local/cuda/include/cuda_runtime.h:115: In file included from /usr/local/cuda/include/crt/common_functions.h:77: /Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:61:15: fatal error: ‘string.h’ file not found #include_next ^

1 error generated. CMake Error at torch_generated_THCTensorMathReduce.cu.o.Release.cmake:220 (message): Error generating /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/./torch_generated_THCTensorMathReduce.cu.o [63/1762] Building NVCC (Device) object caffe2/CMakeFiles/torch.dir/__/aten/src/THC/generated/torch_generated_THCTensorSortByte.cu.o FAILED: caffe2/CMakeFiles/torch.dir/__/aten/src/THC/generated/torch_generated_THCTensorSortByte.cu.o cd /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/generated && /Users/vincentqb/anaconda3/envs/pytorch-built/bin/cmake -E make_directory /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/generated/. && /Users/vincentqb/anaconda3/envs/pytorch-built/bin/cmake -D verbose:BOOL=OFF -D build_configuration:STRING=Release -D generated_file:STRING=/Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/generated/./torch_generated_THCTensorSortByte.cu.o -D generated_cubin_file:STRING=/Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/generated/./torch_generated_THCTensorSortByte.cu.o.cubin.txt -P /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/generated/torch_generated_THCTensorSortByte.cu.o.Release.cmake In file included from :1: In file included from /usr/local/cuda/include/cuda_runtime.h:115: In file included from /usr/local/cuda/include/crt/common_functions.h:77: /Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:61:15: fatal error: ‘string.h’ file not found #include_next ^

1 error generated. CMake Error at torch_generated_THCTensorSortByte.cu.o.Release.cmake:220 (message): Error generating /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/generated/./torch_generated_THCTensorSortByte.cu.o [64/1762] Building NVCC (Device) object caffe2/CMakeFiles/torch.dir/__/aten/src/THC/torch_generated_THCTensorMode.cu.o FAILED: caffe2/CMakeFiles/torch.dir/__/aten/src/THC/torch_generated_THCTensorMode.cu.o cd /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC && /Users/vincentqb/anaconda3/envs/pytorch-built/bin/cmake -E make_directory /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/. && /Users/vincentqb/anaconda3/envs/pytorch-built/bin/cmake -D verbose:BOOL=OFF -D build_configuration:STRING=Release -D generated_file:STRING=/Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/./torch_generated_THCTensorMode.cu.o -D generated_cubin_file:STRING=/Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/./torch_generated_THCTensorMode.cu.o.cubin.txt -P /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/torch_generated_THCTensorMode.cu.o.Release.cmake In file included from :1: In file included from /usr/local/cuda/include/cuda_runtime.h:115: In file included from /usr/local/cuda/include/crt/common_functions.h:77: /Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:61:15: fatal error: ‘string.h’ file not found #include_next ^

1 error generated. CMake Error at torch_generated_THCTensorMode.cu.o.Release.cmake:220 (message): Error generating /Users/vincentqb/pytorch/build/caffe2/CMakeFiles/torch.dir/__/aten/src/THC/./torch_generated_THCTensorMode.cu.o ninja: build stopped: subcommand failed. Traceback (most recent call last): File «setup.py», line 756, in build_deps() File «setup.py», line 321, in build_deps cmake=cmake) File «/Users/vincentqb/pytorch/tools/build_pytorch_libs.py», line 63, in build_caffe2 cmake.build(my_env) File «/Users/vincentqb/pytorch/tools/setup_helpers/cmake.py», line 330, in build self.run(build_args, my_env) File «/Users/vincentqb/pytorch/tools/setup_helpers/cmake.py», line 143, in run check_call(command, cwd=self.build_dir, env=env) File «/Users/vincentqb/anaconda3/envs/pytorch-built/lib/python3.7/subprocess.py», line 347, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command ‘[‘cmake’, ‘—build’, ‘.’, ‘—target’, ‘install’, ‘—config’, ‘Release’, ‘—‘, ‘-j’, ‘8’]’ returned non-zero exit status 1.»>

Читайте также:  Researchdownload прошивка с форматированием

To Reproduce

Steps to reproduce the behavior:

Environment

PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A

OS: Mac OSX 10.14.5
GCC version: Could not collect
CMake version: version 3.14.0

Python version: 3.7
Is CUDA available: N/A
CUDA runtime version: Could not collect
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect

Versions of relevant libraries:
[pip3] numpy==1.16.4
[pip3] torch==1.1.0.post2
[pip3] torchvision==0.3.0
[conda] blas 1.0 mkl
[conda] mkl 2019.4 233
[conda] mkl-include 2019.4 233
[conda] mkl-service 2.0.2 py37h1de35cc_0
[conda] mkl_fft 1.0.14 py37h5e564d8_0
[conda] mkl_random 1.0.2 py37h27c97d8_0

Additional context

Error while installing pytorch #16602 ?

  • Tried conda install -c conda-forge cmake suggested here
  • Tried to remove -Werror as mentioned here
  • Tried python 3.
  • Tried from a fresh git clone —recursive https://github.com/pytorch/pytorch
  • The text was updated successfully, but these errors were encountered:

    Источник

    Smartadm.ru
    Adblock
    detector