clab / clab/dynet

compilation error

Open
#1,317 5 comments 0 reactions 0 assignees View on GitHub
fix needs confirmation
Dominant language
C++
Stars
3.4k
Forks
701
PR merge metrics
No merged PRs in 30d

Description

I got a compilation error when building with gcc 5.5 and cuda 8. Please find the config info and build error below.

```
configuring
building
/tmp/nix-build-python3.6-dyNET-2.0.3.drv-0/dyNET-2.0.3/build /tmp/nix-build-python3.6-dyNET-2.0.3.drv-0/dyNET-2.0.3
-- The C compiler identification is GNU 5.5.0
-- The CXX compiler identification is GNU 5.5.0
-- Check for working C compiler: /nix/store/qcjlk0hnb6lysz8qshn1pc5xg51pi8p0-gcc-wrapper-5.5.0/bin/gcc
-- Check for working C compiler: /nix/store/qcjlk0hnb6lysz8qshn1pc5xg51pi8p0-gcc-wrapper-5.5.0/bin/gcc -- 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: /nix/store/qcjlk0hnb6lysz8qshn1pc5xg51pi8p0-gcc-wrapper-5.5.0/bin/g++
-- Check for working CXX compiler: /nix/store/qcjlk0hnb6lysz8qshn1pc5xg51pi8p0-gcc-wrapper-5.5.0/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- BACKEND: cuda
/nix/store/fcxliihmhm2ak9z4890gk0qw63zsbrcx-bash-4.4-p12/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
-- 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
-- Found CUDA: /nix/store/rfagrp9i62gsisfcy1w5575byv9n4hb9-cudatoolkit-8.0.61-unsplit (found version "8.0")
CUDA_LIBRARIES: /nix/store/rfagrp9i62gsisfcy1w5575byv9n4hb9-cudatoolkit-8.0.61-unsplit/lib64/libcudart_static.a;-lpthread;dl;/nix/store/27b2hylj1sv682iqijq3g7mbcfiy1rfw-glibc-2.26-131/lib/librt.so;/nix/store/rfagrp9i62gsisfcy1w5575byv9n4hb9-cudatoolkit-8.0.61-unsplit/lib64/libcurand.so
-- Found CUDNN (include: /nix/store/vcym3d9d04w4qiq81myk4hqfydzyq454-cudatoolkit-8.0-cudnn-6.0/include, library: /nix/store/vcym3d9d04w4qiq81myk4hqfydzyq454-cudatoolkit-8.0-cudnn-6.0/lib/libcudnn.so)
-- Successfully include CUDNN flags
-- Eigen dir is /tmp/nix-build-python3.6-dyNET-2.0.3.drv-0/eigen-eigen-2355b229ea4c
-- Found Cython version 0.27.3

--- CUDA: CUBLAS: /nix/store/rfagrp9i62gsisfcy1w5575byv9n4hb9-cudatoolkit-8.0.61-unsplit/lib64/libcublas.so;/nix/store/rfagrp9i62gsisfcy1w5575byv9n4hb9-cudatoolkit-8.0.61-unsplit/lib64/libcublas_device.a RT: /nix/store/rfagrp9i62gsisfcy1w5575byv9n4hb9-cudatoolkit-8.0.61-unsplit/lib64/libcudart_static.a;dl;/nix/store/27b2hylj1sv682iqijq3g7mbcfiy1rfw-glibc-2.26-131/lib/librt.so;/nix/store/rfagrp9i62gsisfcy1w5575byv9n4hb9-cudatoolkit-8.0.61-unsplit/lib64/libcurand.so;/nix/store/vcym3d9d04w4qiq81myk4hqfydzyq454-cudatoolkit-8.0-cudnn-6.0/lib/libcudnn.so
CMAKE_INSTALL_PREFIX="/var/empty/local"
PROJECT_SOURCE_DIR="/tmp/nix-build-python3.6-dyNET-2.0.3.drv-0/dyNET-2.0.3"
PROJECT_BINARY_DIR="/tmp/nix-build-python3.6-dyNET-2.0.3.drv-0/dyNET-2.0.3/build"
LIBS="/nix/store/rfagrp9i62gsisfcy1w5575byv9n4hb9-cudatoolkit-8.0.61-unsplit/lib64/libcudart_static.a\;dl\;/nix/store/27b2hylj1sv682iqijq3g7mbcfiy1rfw-glibc-2.26-131/lib/librt.so\;/nix/store/rfagrp9i62gsisfcy1w5575byv9n4hb9-cudatoolkit-8.0.61-unsplit/lib64/libcurand.so\;-lpthread"
EIGEN3_INCLUDE_DIR="/tmp/nix-build-python3.6-dyNET-2.0.3.drv-0/eigen-eigen-2355b229ea4c"
MKL_LINK_DIRS=""
WITH_CUDA_BACKEND="1"
CUDA_RT_FILES="libcudart_static.a\;dl\;librt.so\;libcurand.so\;libcudnn.so"
CUDA_RT_DIRS="/nix/store/rfagrp9i62gsisfcy1w5575byv9n4hb9-cudatoolkit-8.0.61-unsplit/lib64\;/nix/store/27b2hylj1sv682iqijq3g7mbcfiy1rfw-glibc-2.26-131/lib\;/nix/store/vcym3d9d04w4qiq81myk4hqfydzyq454-cudatoolkit-8.0-cudnn-6.0/lib"
CUDA_CUBLAS_FILES="libcublas.so\;libcublas_device.a"
CUDA_CUBLAS_DIRS="/nix/store/rfagrp9i62gsisfcy1w5575byv9n4hb9-cudatoolkit-8.0.61-unsplit/lib64"
MSVC=""
```

Compilation fails with the following:

```
92 errors detected in the compilation of "/tmp/nix-build-python3.6-dyNET-2.0.3.drv-0/tmpxft_000006b1_00000000-15_gpu-merge3.compute_52.cpp1.ii".
CMake Error at dynet_generated_gpu-merge3.cu.o.Release.cmake:275 (message):
Error generating file
/tmp/nix-build-python3.6-dyNET-2.0.3.drv-0/dyNET-2.0.3/build/dynet/CMakeFiles/dynet.dir//./dynet_generated_gpu-merge3.cu.o

make[2]: *** [dynet/CMakeFiles/dynet.dir/build.make:100: dynet/CMakeFiles/dynet.dir/dynet_generated_gpu-merge3.cu.o] Error 1
92 errors detected in the compilation of "/tmp/nix-build-python3.6-dyNET-2.0.3.drv-0/tmpxft_00000672_00000000-15_gpu-merge1.compute_52.cpp1.ii".
CMake Error at dynet_generated_gpu-merge1.cu.o.Release.cmake:275 (message):
Error generating file
/tmp/nix-build-python3.6-dyNET-2.0.3.drv-0/dyNET-2.0.3/build/dynet/CMakeFiles/dynet.dir//./dynet_generated_gpu-merge1.cu.o

make[2]: *** [dynet/CMakeFiles/dynet.dir/build.make:86: dynet/CMakeFiles/dynet.dir/dynet_generated_gpu-merge1.cu.o] Error 1
92 errors detected in the compilation of "/tmp/nix-build-python3.6-dyNET-2.0.3.drv-0/tmpxft_0000069f_00000000-15_gpu-merge0.compute_52.cpp1.ii".
CMake Error at dynet_generated_gpu-merge0.cu.o.Release.cmake:275 (message):
Error generating file
/tmp/nix-build-python3.6-dyNET-2.0.3.drv-0/dyNET-2.0.3/build/dynet/CMakeFiles/dynet.dir//./dynet_generated_gpu-merge0.cu.o

make[2]: *** [dynet/CMakeFiles/dynet.dir/build.make:79: dynet/CMakeFiles/dynet.dir/dynet_generated_gpu-merge0.cu.o] Error 1
92 errors detected in the compilation of "/tmp/nix-build-python3.6-dyNET-2.0.3.drv-0/tmpxft_0000068e_00000000-15_gpu-merge2.compute_52.cpp1.ii".
CMake Error at dynet_generated_gpu-merge2.cu.o.Release.cmake:275 (message):
Error generating file
/tmp/nix-build-python3.6-dyNET-2.0.3.drv-0/dyNET-2.0.3/build/dynet/CMakeFiles/dynet.dir//./dynet_generated_gpu-merge2.cu.o

make[2]: *** [dynet/CMakeFiles/dynet.dir/build.make:93: dynet/CMakeFiles/dynet.dir/dynet_generated_gpu-merge2.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:85: dynet/CMakeFiles/dynet.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
builder for ‘/nix/store/415575yc9bi5kr4irlkjvv9s99qw44al-python3.6-dyNET-2.0.3.drv’ failed with exit code 2
cannot build derivation ‘/nix/store/vji4wa006m407pbjpdxwfjkvvsxchb8p-python3-3.6.4-env.drv’: 1 dependencies couldn't be built
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the CUDA build with the reported GCC 5.5 and CUDA 8 configuration, then inspect the generated dynet_generated_gpu-merge*.cu.o build targets and the full compiler diagnostics preceding the 92-error summaries. Done means identifying a reproducible compatibility cause and confirming that the CUDA backend builds successfully with an appropriate configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.