cquammen/Clarity — Issue #2: Duplicate declarations in Clarity when using CUDA in Ubuntu 11.10
Author: rcasero
Created: 2011-11-25 00:15:47+00:00
State: open

Hi,

I have tried to compile Clarity v1.0.0 in Ubuntu 11.10 using CUDA. The first problem was with CUDA requiring gcc v4.4 or older, while Ubuntu 11.10 ships gcc v4.6.1.

This problem can be solved by stating in the CMakeLists.txt that nvcc should look in another directory for the compilers

```cmake
IF(BUILD_WITH_CUDA)
# Load CUDA macros
FIND_PACKAGE(CUDA)
SET(CUDA_NVCC_FLAGS --compiler-bindir ${path/to/old/gcc/dir})
ENDIF(BUILD_WITH_CUDA)
```
and adding soft links in the directory, e.g.

```bash
$ cd path/to/old/gcc/dir
$ ln -s /usr/bin/gcc-4.4 gcc
$ ln -s /usr/bin/g++-4.4 g++
```

The build fails for me at linking time. I get errors of duplicated symbols. I think that the problem is e.g. with `WienerDeconvolveGPU.cu`, and `WienerDeconvolve.cxx`, that include `Complex.h` and `ComplexCUDA.h`, and these declare functions with the same identifier.

Best regards,

Ramon.