NVlabs / nvbio

NVBIO is a library of reusable components designed to accelerate bioinformatics applications using CUDA.
BSD 3-Clause "New" or "Revised" License
206 stars 50 forks source link

Compiling on Ubuntu 16.04 #14

Open JeroenMerks opened 8 years ago

JeroenMerks commented 8 years ago

Dear developers,

On my Ubuntu Linux 16.04 workstation, I the following error when I'm trying to compile all the NVCC (Device) objects *.so files when I'm trying to compile nvbio:

/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;

I'm using gcc-4.8 and CUDA 6.5. Perhaps the CUDA version too new or too old? I can't find anything meaningfull on Google about memcpy errors.

Any help would be appreciated.

nsubtil commented 8 years ago

This sounds related to this other issue that was reported on Caffe: https://groups.google.com/forum/#!msg/caffe-users/Tm3OsZBwN9Q/XKGRKNdmBAAJ

It's not clear why, but compiling with -D_FORCE_INLINES apparently helps. Might be worth a try here as well.

JeroenMerks commented 8 years ago

Thank you very much, that seems to help a bit.

But even after starting with a fresh download and having the following packages ready: gcc (Ubuntu 4.8.5-4ubuntu2) 4.8.5 doxygen 1.8.11

sudo nano CMakeLists.txt

added this to the top and saved the file

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORCE_INLINES")

cmake a fresh build directory.

Amost everything compiles, but strand here: http://pastebin.com/raw/4jF3tQwJ

JeroenMerks commented 8 years ago

Compiling with the make -i flag makes the compilation continue and at least compile important files like nvBWT and nvBowtie.

r-barnes commented 4 years ago

master now includes fixes to permit building with newer versions of CUDA and GCC. Given that this bug results from using older compilers, I think it can be closed (@foertter ).