Skip to content

make[1]: *** [CMakeFiles/test_cpu.dir/all] Error 2 #1360

@ahmedmazari

Description

@ahmedmazari

Hello ,
l tried to install the fast CTC parallel library from this link https://github.com/SeanNaren/warp-ctc as follow :

git clone https://github.com/baidu-research/warp-ctc.git
cd warp-ctc
mkdir build 
cd build 
cmake ../

-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /root/anaconda3/bin/cc
-- Check for working C compiler: /root/anaconda3/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /root/anaconda3/bin/c++
-- Check for working CXX compiler: /root/anaconda3/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
**CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA.cmake:771 (message):
  Expecting to find librt for libcudart_static, but didn't find it.
Call Stack (most recent call first):
  CMakeLists.txt:20 (FIND_PACKAGE)**


-- Found CUDA: /usr/local/cuda (found suitable version "8.0", minimum required is "6.5") 
-- cuda found TRUE
-- Found Torch7 in /home/ahmed/torch/install
-- Torch found /home/ahmed/torch/install/share/cmake/torch
-- Building shared library with GPU support
-- Building Torch Bindings with GPU support
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ahmed/warp-ctc/build

After running

make

l got the following error :

make
[ 10%] Building NVCC (Device) object CMakeFiles/warpctc.dir/src/warpctc_generated_reduce.cu.o
[ 20%] Building NVCC (Device) object CMakeFiles/warpctc.dir/src/warpctc_generated_ctc_entrypoint.cu.o
Scanning dependencies of target warpctc
[ 30%] Linking CXX shared library libwarpctc.so
[ 30%] Built target warpctc
Scanning dependencies of target test_cpu
[ 40%] Building CXX object CMakeFiles/test_cpu.dir/tests/test_cpu.cpp.o
[ 50%] Linking CXX executable test_cpu
/home/ahmed/torch/install/lib/libTHC.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()@GLIBCXX_3.4.21'
/home/ahmed/torch/install/lib/libTHC.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)@GLIBCXX_3.4.21'
/home/ahmed/torch/install/lib/libTH.so.0: undefined reference to `GOMP_parallel@GOMP_4.0'
/home/ahmed/torch/install/lib/libTHC.so: undefined reference to `std::random_device::_M_init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21'
/home/ahmed/torch/install/lib/libTHC.so: undefined reference to `std::runtime_error::runtime_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21'
/home/ahmed/torch/install/lib/libTHC.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)@GLIBCXX_3.4.21'
/home/ahmed/torch/install/lib/libTHC.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21'
collect2: error: ld returned 1 exit status
CMakeFiles/test_cpu.dir/build.make:99: recipe for target 'test_cpu' failed
make[2]: *** [test_cpu] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/test_cpu.dir/all' failed
make[1]: *** [CMakeFiles/test_cpu.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

what's wrong l don't understand the error ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions