I'm compiling a CUDA program, which seems confused (Or, perhaps I'm confused) about the namespaces used by cmath and math. When I run make
, I get the following output:
innovationcommons@IC-VR1:~/PackageDownloads/warp-ctc/build$ make VERBOSE=1
/usr/bin/cmake -H/home/innovationcommons/PackageDownloads/warp-ctc -B/home/innovationcommons/PackageDownloads/warp-ctc/build --check-build-system CMakeFiles/Makefile.cmake 0
Re-run cmake file: Makefile older than: CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.depend
-- cuda found TRUE
CMake Warning at CMakeLists.txt:48 (FIND_PACKAGE):
By not providing "FindTorch.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Torch", but
CMake did not find one.
Could not find a package configuration file provided by "Torch" with any of
the following names:
TorchConfig.cmake
torch-config.cmake
Add the installation prefix of "Torch" to CMAKE_PREFIX_PATH or set
"Torch_DIR" to a directory containing one of the above files. If "Torch"
provides a separate development package or SDK, be sure it has been
installed.
-- Torch found Torch_DIR-NOTFOUND
-- Building shared library with GPU support
-- Configuring done
-- Generating done
-- Build files have been written to: /home/innovationcommons/PackageDownloads/warp-ctc/build
/usr/bin/cmake -E cmake_progress_start /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
make -f CMakeFiles/warpctc.dir/build.make CMakeFiles/warpctc.dir/depend
make[2]: Entering directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
cd /home/innovationcommons/PackageDownloads/warp-ctc/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/innovationcommons/PackageDownloads/warp-ctc /home/innovationcommons/PackageDownloads/warp-ctc /home/innovationcommons/PackageDownloads/warp-ctc/build /home/innovationcommons/PackageDownloads/warp-ctc/build /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/warpctc.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
make -f CMakeFiles/warpctc.dir/build.make CMakeFiles/warpctc.dir/build
make[2]: Entering directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
make[2]: Nothing to be done for 'CMakeFiles/warpctc.dir/build'.
make[2]: Leaving directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
[ 42%] Built target warpctc
make -f CMakeFiles/test_cpu.dir/build.make CMakeFiles/test_cpu.dir/depend
make[2]: Entering directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
cd /home/innovationcommons/PackageDownloads/warp-ctc/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/innovationcommons/PackageDownloads/warp-ctc /home/innovationcommons/PackageDownloads/warp-ctc /home/innovationcommons/PackageDownloads/warp-ctc/build /home/innovationcommons/PackageDownloads/warp-ctc/build /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_cpu.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
make -f CMakeFiles/test_cpu.dir/build.make CMakeFiles/test_cpu.dir/build
make[2]: Entering directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
make[2]: Nothing to be done for 'CMakeFiles/test_cpu.dir/build'.
make[2]: Leaving directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
[ 71%] Built target test_cpu
make -f CMakeFiles/test_gpu.dir/build.make CMakeFiles/test_gpu.dir/depend
make[2]: Entering directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
[ 85%] Building NVCC (Device) object CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o
cd /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests && /usr/bin/cmake -E make_directory /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/.
cd /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests && /usr/bin/cmake -D verbose:BOOL=1 -D build_configuration:STRING= -D generated_file:STRING=/home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/./test_gpu_generated_test_gpu.cu.o -D generated_cubin_file:STRING=/home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/./test_gpu_generated_test_gpu.cu.o.cubin.txt -P /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.cmake
-- Removing /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/./test_gpu_generated_test_gpu.cu.o
/usr/bin/cmake -E remove /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/./test_gpu_generated_test_gpu.cu.o
-- Generating dependency file: /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.NVCC-depend
/usr/local/cuda-9.0/bin/nvcc -M -D__CUDACC__ /home/innovationcommons/PackageDownloads/warp-ctc/tests/test_gpu.cu -o /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.NVCC-depend -ccbin /usr/bin/cc -m64 -Xcompiler ,\"-fopenmp\",\"-O2\",\"-g\" -gencode arch=compute_30,code=sm_30 -O2 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_62,code=sm_62 --std=c++11 -Xcompiler -fopenmp -DNVCC -I/usr/local/cuda-9.0/include -I/home/innovationcommons/PackageDownloads/warp-ctc/include
-- Generating temporary cmake readable file: /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.depend.tmp
/usr/bin/cmake -D input_file:FILEPATH=/home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.NVCC-depend -D output_file:FILEPATH=/home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.depend.tmp -D verbose=1 -P /usr/share/cmake-3.9/Modules/FindCUDA/make2cmake.cmake
-- Copy if different /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.depend.tmp to /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.depend
/usr/bin/cmake -E copy_if_different /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.depend.tmp /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.depend
-- Removing /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.depend.tmp and /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.NVCC-depend
/usr/bin/cmake -E remove /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.depend.tmp /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o.NVCC-depend
-- Generating /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/./test_gpu_generated_test_gpu.cu.o
/usr/local/cuda-9.0/bin/nvcc /home/innovationcommons/PackageDownloads/warp-ctc/tests/test_gpu.cu -c -o /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/./test_gpu_generated_test_gpu.cu.o -ccbin /usr/bin/cc -m64 -Xcompiler ,\"-fopenmp\",\"-O2\",\"-g\" -gencode arch=compute_30,code=sm_30 -O2 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_62,code=sm_62 --std=c++11 -Xcompiler -fopenmp -DNVCC -I/usr/local/cuda-9.0/include -I/home/innovationcommons/PackageDownloads/warp-ctc/include
/home/innovationcommons/PackageDownloads/warp-ctc/tests/test_gpu.cu(301): error: namespace "std" has no member "isinf"
/home/innovationcommons/PackageDownloads/warp-ctc/tests/test_gpu.cu(311): error: namespace "std" has no member "isnan"
2 errors detected in the compilation of "/tmp/tmpxft_00000be9_00000000-12_test_gpu.compute_62.cpp1.ii".
-- Removing /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/./test_gpu_generated_test_gpu.cu.o
/usr/bin/cmake -E remove /home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/./test_gpu_generated_test_gpu.cu.o
CMake Error at test_gpu_generated_test_gpu.cu.o.cmake:282 (message):
Error generating file
/home/innovationcommons/PackageDownloads/warp-ctc/build/CMakeFiles/test_gpu.dir/tests/./test_gpu_generated_test_gpu.cu.o
CMakeFiles/test_gpu.dir/build.make:438: recipe for target 'CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o' failed
make[2]: *** [CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o] Error 1
make[2]: Leaving directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
CMakeFiles/Makefile2:141: recipe for target 'CMakeFiles/test_gpu.dir/all' failed
make[1]: *** [CMakeFiles/test_gpu.dir/all] Error 2
make[1]: Leaving directory '/home/innovationcommons/PackageDownloads/warp-ctc/build'
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
The errors I get are that isinf
and isnan
don't belong to the std
namespace. My understanding is that this is true if math.h
is being imported, but not if cmath.h
is being imported. However, I can see in the last compile line that std=c++11
, and when I check test_gpu.cu
, I see that cmath
is being imported:
#include <cmath>
#include <random>
#include <tuple>
#include <vector>
#include <iostream>
At this point, I don't really know how to proceed. Any thoughts or suggestions would really help....
ADDENDUM: For what it's worth, here is my compiler information:
innovationcommons@IC-VR1:~/PackageDownloads/warp-ctc/build$ gcc --version
gcc (Ubuntu 4.8.5-4ubuntu6) 4.8.5
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
innovationcommons@IC-VR1:~/PackageDownloads/warp-ctc/build$ g++ --version
g++ (Ubuntu 4.8.5-4ubuntu6) 4.8.5
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
ADDENDUM 2: More information about my setup and what I'm trying to install:
Ubuntu 17.10
gcc: 4.8.5
g++: 4.8.5
CUDA Version: 9.0
nvcc version: 9.0.176
glibc version: 2.26
I am attempting to install warp-ctc from https://github.com/baidu-research/warp-ctc