Hi Pierre,
Are you sure it won't build with CUDA support? The logs you linked only say it does not use some of the variables you defined, not that it failed to configure
the project or build it. It could be due to CMake (since 3.8) supporting CUDA as a primary language and no longer needing to use `find_package(CUDA)`. The
includes and path to the libraries should be automatically added, so they no longer use those variables you were setting manually.
You are right, it still detects CUDA, but doesn't build libomptarget which was
built before.
loki introduction 109 clang -v
clang version 6.0.0 (trunk 310065)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/llvm-trunk/bin
Found candidate GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.8
Selected GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.8
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
Found CUDA installation: /usr/local/cuda, version 8.0
loki introduction 110 clang -fopenmp -fopenmp-targets=x86_64-unknown-linux-gnu
dot_prod_accelerator_OpenMP.c -lomptarget -lm
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld:
cannot find -lomptarget
clang-6.0: error: linker command failed with exit code 1 (use -v to see
invocation)
loki introduction 111
I checked out the following projects.
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm/tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
svn co http://llvm.org/svn/llvm-project/polly/trunk polly
cd clang/tools
svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk/ extra
cd ../../../projects
svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
svn co http://llvm.org/svn/llvm-project/openmp/trunk openmp
svn co https://github.com/clang-ykt/openmp libomptarget
cd ../..
Do you or any other person have an idea why libomptarget will not be
built? Thank you very much for any help in advance.
Kind regards
Siegmar
I don't have a computer at hand to check that this is indeed the issue, though.
See https://cmake.org/cmake/help/v3.8/release/3.8.html#cuda and https://cmake.org/cmake/help/v3.8/search.html?q=CUDA&check_keywords=yes&area=default for more
details about the new support.
Pierre
On 4 Aug 2017, at 13:11, Siegmar Gross via llvm-dev <llvm-...@lists.llvm.org
<mailto:llvm-...@lists.llvm.org>> wrote:
Hi,
I try to build the latest version of llvm-trunk with Cmake (gcc-5.3.0
is necessary for CUDA) on my "SUSE Linux Enterprise Server 12.2 (x86_64)".
Unfortunately, "libomptarget" for CUDA will not be built with that
version. I use the same configuration command as before.
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/${LLVM_VERSION} \
-DCMAKE_BUILD_TYPE:STRING="Release" \
-DLLVM_PARALLEL_COMPILE_JOBS:STRING="4" \
-DLLVM_PARALLEL_LINK_JOBS:STRING="4" \
-DCMAKE_C_COMPILER:STRING="${DIRPREFIX_PROG}/${GCCDIR}/bin/gcc" \
-DCMAKE_C_FLAGS:STRING="-m64 -I/usr/local/valgrind/include" \
-DCMAKE_CXX_COMPILER:STRING="${DIRPREFIX_PROG}/${GCCDIR}/bin/g++" \
-DCMAKE_CXX_FLAGS:STRING="-m64 -I/usr/local/valgrind/include" \
-DCMAKE_EXE_LINKER_FLAGS:STRING="-m64" \
-DLLVM_LIBDIR_SUFFIX:STRING="64" \
-DLLVM_POLLY_LINK_INTO_TOOLS:BOOL=ON \
-DLIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR:STRING="/usr/local/elfutils-0.169/include"
\
-DLIBOMPTARGET_DEP_LIBELF_LIBRARIES:STRING="/usr/local/elfutils-0.169/lib64/libelf.so"
\
-DLIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIR:STRING="/usr/include" \
-DLIBOMPTARGET_DEP_LIBFFI_LIBRARIES:STRING="/usr/lib64/libffi.so" \
-DCUDA_INCLUDE_DIRS:STRING="/usr/local/cuda/include" \
-DCUDA_LIBRARIES:STRING="/usr/local/cuda/lib64/libcudart.so" \
-DBUILD_SHARED_LIBS:BOOL=ON \
../llvm \
|& tee log.cmake
Now I get the following output.
loki build 613 tail -13 log.cmake
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CUDA_INCLUDE_DIRS
CUDA_LIBRARIES
LIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR
LIBOMPTARGET_DEP_LIBELF_LIBRARIES
LIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIR
LIBOMPTARGET_DEP_LIBFFI_LIBRARIES
-- Build files have been written to: /export2/src/llvm-trunk/build
loki build 614
Do you have any ideas why I cannot build CUDA support any longer? Is it
necessary to change my configuration command to build CUDA support?
Thank you very much for any help in advance.
Kind regards
Siegmar
_______________________________________________
LLVM Developers mailing list
llvm-...@lists.llvm.org <mailto:llvm-...@lists.llvm.org>
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs