NextGenMap icon indicating copy to clipboard operation
NextGenMap copied to clipboard

Compiling NextGenMap from source throws error about not finding opencl on a non-gpu system

Open samfux84 opened this issue 6 years ago • 1 comments

Hi,

I tried to install NextGenMap 0.5.0 on a pure CPU cluster. I was following the installation instructions provided at:

https://github.com/Cibiv/NextGenMap/wiki/Installation

The installation instructions explicitly state:

In order to build NextGenMap only cMake (>=2.8) and g++ are required.

But when following the instructions, the make step crashes with an error message that libOpenCL could not be found:

cd /scratch/54486642.tmpdir/NextGenMap-0.5.0/build/src && /cluster/apps/cmake/2.8.12/x86_64/bin/cmake -E cmake_link_script CMakeFiles/ngm-core.dir/link.txt --verbose=1
/cluster/apps/gcc/4.8.2/bin/g++   -O2 -g -DNDEBUG -ftree-vectorize -march=corei7-avx -mavx    CMakeFiles/ngm-core.dir/parser/BamParser.cpp.o CMakeFiles/ngm-core.dir/writer/BAMWriter.cpp.o CMakeFiles/ngm-core.dir/parser/VcfParser.cpp.o CMakeFiles/ngm-core.dir/config/Config.cpp.o CMakeFiles/ngm-core.dir/CS.cpp.o CMakeFiles/ngm-core.dir/CSstatic.cpp.o CMakeFiles/ngm-core.dir/misc/Debug.cpp.o CMakeFiles/ngm-core.dir/log/Logging.cpp.o CMakeFiles/ngm-core.dir/MappedRead.cpp.o CMakeFiles/ngm-core.dir/NGM_main.cpp.o CMakeFiles/ngm-core.dir/NGM.cpp.o CMakeFiles/ngm-core.dir/UpdateCheck.cpp.o CMakeFiles/ngm-core.dir/core/NGMTask.cpp.o CMakeFiles/ngm-core.dir/AlignmentBuffer.cpp.o CMakeFiles/ngm-core.dir/PrefixTable.cpp.o CMakeFiles/ngm-core.dir/ReadProvider.cpp.o CMakeFiles/ngm-core.dir/parser/SamParser.cpp.o CMakeFiles/ngm-core.dir/writer/SAMWriter.cpp.o CMakeFiles/ngm-core.dir/writer/ScoreWriter.cpp.o CMakeFiles/ngm-core.dir/seqan/EndToEndAffine.cpp.o CMakeFiles/ngm-core.dir/SequenceProvider.cpp.o CMakeFiles/ngm-core.dir/OutputReadBuffer.cpp.o CMakeFiles/ngm-core.dir/ScoreBuffer.cpp.o CMakeFiles/ngm-core.dir/core/unix.cpp.o CMakeFiles/ngm-core.dir/core/unix_threads.cpp.o CMakeFiles/ngm-core.dir/core/windows_threads.cpp.o CMakeFiles/ngm-core.dir/core/windows.cpp.o  -o ../../bin/ngm-0.5.0/ngm-core -rdynamic -lpthread ../lib/mason/opencl/libMASonOpenCl.a ../lib/bamtools-2.3.0/src/api/libbamtools.a ../lib/zlib-1.2.7/libz.a -Wl,-Bdynamic -lOpenCL 
/usr/bin/ld: cannot find -lOpenCL
collect2: error: ld returned 1 exit status
make[2]: *** [../bin/ngm-0.5.0/ngm-core] Error 1
make[2]: Leaving directory `/scratch/54486642.tmpdir/NextGenMap-0.5.0/build'
make[1]: *** [src/CMakeFiles/ngm-core.dir/all] Error 2
make[1]: Leaving directory `/scratch/54486642.tmpdir/NextGenMap-0.5.0/build'
make: *** [all] Error 2
[sfux@eu-c7-001-01 build]$ 

If only cmake and g++ are required, why is the compiler trying to link against opencl, that is not mentioned as dependency to build NextGenMap ?

samfux84 avatar Dec 13 '17 12:12 samfux84

Hi,

OpenCL is not listed as dependency as NextGenMap comes with the OpenCL libraries included. Without more information I can't comment on why it is not working on your system. What operating system is the cluster running on? And could you please provide the exact commands you used for compiling and a full log?

In general, if possible, I would recommend using (bio)conda for installing NextGenMap. But I realise that's not always an option.

Thanks, Philipp

On Wed, 13 Dec 2017, 12:52 samfux84, [email protected] wrote:

Hi,

I tried to install NextGenMap 0.5.0 on a pure CPU cluster. I was following the installation instructions provided at:

https://github.com/Cibiv/NextGenMap/wiki/Installation

The installation instructions explicitly state:

In order to build NextGenMap only cMake (>=2.8) and g++ are required.

But when following the instructions, the make step crashes with an error message that libOpenCL could not be found:

cd /scratch/54486642.tmpdir/NextGenMap-0.5.0/build/src && /cluster/apps/cmake/2.8.12/x86_64/bin/cmake -E cmake_link_script CMakeFiles/ngm-core.dir/link.txt --verbose=1 /cluster/apps/gcc/4.8.2/bin/g++ -O2 -g -DNDEBUG -ftree-vectorize -march=corei7-avx -mavx CMakeFiles/ngm-core.dir/parser/BamParser.cpp.o CMakeFiles/ngm-core.dir/writer/BAMWriter.cpp.o CMakeFiles/ngm-core.dir/parser/VcfParser.cpp.o CMakeFiles/ngm-core.dir/config/Config.cpp.o CMakeFiles/ngm-core.dir/CS.cpp.o CMakeFiles/ngm-core.dir/CSstatic.cpp.o CMakeFiles/ngm-core.dir/misc/Debug.cpp.o CMakeFiles/ngm-core.dir/log/Logging.cpp.o CMakeFiles/ngm-core.dir/MappedRead.cpp.o CMakeFiles/ngm-core.dir/NGM_main.cpp.o CMakeFiles/ngm-core.dir/NGM.cpp.o CMakeFiles/ngm-core.dir/UpdateCheck.cpp.o CMakeFiles/ngm-core.dir/core/NGMTask.cpp.o CMakeFiles/ngm-core.dir/AlignmentBuffer.cpp.o CMakeFiles/ngm-core.dir/PrefixTable.cpp.o CMakeFiles/ngm-core.dir/ReadProvider.cpp.o CMakeFiles/ngm-core.dir/parser/SamParser.cpp.o CMakeFiles/ngm-core.dir/writer/SAMWriter.cpp.o CMakeFiles/ngm-core.dir/writer/ScoreWriter.cpp.o CMakeFiles/ngm-core.dir/seqan/EndToEndAffine.cpp.o CMakeFiles/ngm-core.dir/SequenceProvider.cpp.o CMakeFiles/ngm-core.dir/OutputReadBuffer.cpp.o CMakeFiles/ngm-core.dir/ScoreBuffer.cpp.o CMakeFiles/ngm-core.dir/core/unix.cpp.o CMakeFiles/ngm-core.dir/core/unix_threads.cpp.o CMakeFiles/ngm-core.dir/core/windows_threads.cpp.o CMakeFiles/ngm-core.dir/core/windows.cpp.o -o ../../bin/ngm-0.5.0/ngm-core -rdynamic -lpthread ../lib/mason/opencl/libMASonOpenCl.a ../lib/bamtools-2.3.0/src/api/libbamtools.a ../lib/zlib-1.2.7/libz.a -Wl,-Bdynamic -lOpenCL /usr/bin/ld: cannot find -lOpenCL collect2: error: ld returned 1 exit status make[2]: *** [../bin/ngm-0.5.0/ngm-core] Error 1 make[2]: Leaving directory /scratch/54486642.tmpdir/NextGenMap-0.5.0/build' make[1]: *** [src/CMakeFiles/ngm-core.dir/all] Error 2 make[1]: Leaving directory /scratch/54486642.tmpdir/NextGenMap-0.5.0/build' make: *** [all] Error 2 [sfux@eu-c7-001-01 build]$

If only cmake and g++ are required, why is the compiler trying to link against opencl, that is not mentioned as dependency to build NextGenMap ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Cibiv/NextGenMap/issues/30, or mute the thread https://github.com/notifications/unsubscribe-auth/ACN2HAzgrz2Bc0viJX2oEXz2HC7gtQ58ks5s_8hpgaJpZM4RAf97 .

philres avatar Feb 23 '18 17:02 philres