isovic / racon

Ultrafast consensus module for raw de novo genome assembly of long uncorrected reads. http://genome.cshlp.org/content/early/2017/01/18/gr.214270.116 Note: This was the original repository which will no longer be officially maintained. Please use the new official repository here:
https://github.com/lbcb-sci/racon
MIT License
272 stars 49 forks source link

Compiling RACON for CUDA 11.4 & <$ make package> FAILS on Ubuntu 18.04 - SOLVED #220

Closed cement-head closed 1 year ago

cement-head commented 2 years ago

RACON fails to compile with CUDA options on Ubuntu 18.04.

(1) The first problem (Error) is an issue with the CMakeLists.txt file.

SOLUTION:

Edit the file in the main </racon/> directory.

Make the lines 7-11 look like this:

# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -pthread")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

Save the file.

Install all the pthreads packages in synaptic.

image

Run the compile command:

$ cmake -DCMAKE_BUILD_TYPE=Release -Dracon_enable_cuda=ON -Dracon_build_tests=ON -Dracon_build_wrapper=ON ..

Make sure there are no errors; if there are any, they are usually as a result of missing packages. If a package is missing, you most likely need the dev version of it. Google is your friend.

(2) The second problem (Error) is an error in the GENEWORKS-SRC code for the build $ make package of the packages for the DEB.

Error will look similar to this (below):

$ make package
[  0%] Building CXX object _deps/genomeworks-build/common/base/CMakeFiles/gwbase.dir/src/cudautils.cpp.o
In file included from /home/cbfgws6/Programs/racon/build/_deps/genomeworks-src/3rdparty/spdlog/include/spdlog/fmt/fmt.h:21,
                 from /home/cbfgws6/Programs/racon/build/_deps/genomeworks-src/3rdparty/spdlog/include/spdlog/common.h:28,
                 from /home/cbfgws6/Programs/racon/build/_deps/genomeworks-src/3rdparty/spdlog/include/spdlog/spdlog.h:12,
                 from /home/cbfgws6/Programs/racon/build/_deps/genomeworks-src/common/base/include/claraparabricks/genomeworks/logging/logging.hpp:99,
                 from /home/cbfgws6/Programs/racon/build/_deps/genomeworks-src/common/base/include/claraparabricks/genomeworks/utils/cudautils.hpp:22,
                 from /home/cbfgws6/Programs/racon/build/_deps/genomeworks-src/common/base/src/cudautils.cpp:17:
/home/cbfgws6/Programs/racon/build/_deps/genomeworks-src/3rdparty/spdlog/include/spdlog/fmt/bundled/format.h:3475:55: warning: ISO C++ did not adopt string literal operator templates taking an argument pack of characters [-Wpedantic]
 3475 | FMT_CONSTEXPR internal::udl_formatter<Char, CHARS...> operator""_format() {

SOLUTION:

It is a bad/misplaced set of quotes in </racon/build/_deps/genomeworks-src/3rdparty/spdlog/include/spdlog/fmt/bundled/format.h>

Pulled solution from here: https://www.gitmemory.com/issue/yuzu-emu/yuzu/2597/507715224

Changed Line 3475 from: FMT_CONSTEXPR internal::udl_formatter<Char, CHARS...> operator""_format() {

To (remove quotes): FMT_CONSTEXPR internal::udl_formatter<Char, CHARS...> operator_format() {

Save the file, now at the prompt:

$ make package

You should now see the full build and a final DEB package built. Either install the package using gDEBI or CLI.