Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile.kokkos gets gcc-toolchain wrong if gcc is cached #1841

Closed
junghans opened this issue Oct 8, 2018 · 0 comments
Closed

Makefile.kokkos gets gcc-toolchain wrong if gcc is cached #1841

junghans opened this issue Oct 8, 2018 · 0 comments
Labels
Enhancement Improve existing capability; will potentially require voting

Comments

@junghans
Copy link
Contributor

junghans commented Oct 8, 2018

When ccache is installed, g++ and clang++ are a symlinks to ccache in /usr/lib/ccahe and hence KOKKOS_INTERNAL_GCC_PATH and later the --gcc-toolchain option are wrong leading to an error like:

/usr/local/clang-5.0.0/bin/clang++  -I./ -I/home/travis/build/junghans/kokkos/core/src -I/home/travis/build/junghans/kokkos/containers/src -I/home/travis/build/junghans/kokkos/algorithms/src -I/home/travis/build/junghans/kokkos/core/src/eti -Wall -Wshadow -pedantic -Wsign-compare -Wtype-limits -Wuninitialized --std=c++11 --gcc-toolchain=/usr/lib/ccache/g++ -O3 -c /home/travis/build/junghans/kokkos/core/src/impl/Kokkos_Core.cpp
In file included from /home/travis/build/junghans/kokkos/core/src/impl/Kokkos_Core.cpp:44:
In file included from /home/travis/build/junghans/kokkos/core/src/Kokkos_Core.hpp:50:
In file included from /home/travis/build/junghans/kokkos/core/src/Kokkos_Core_fwd.hpp:52:
/home/travis/build/junghans/kokkos/core/src/impl/Kokkos_Utilities.hpp:48:10: fatal error: 'cstdint' file not found
#include <cstdint>
         ^~~~~~~~~
1 error generated.

when compiling with clang.

The is no option to overwrite KOKKOS_INTERNAL_GCC_PATH with generate_makefile.bash, but as a workaround one can do:

make KOKKOS_INTERNAL_GCC_TOOLCHAIN=/usr
make install KOKKOS_INTERNAL_GCC_TOOLCHAIN=/usr

which is what we had to do for Cabana in ECP-copa/Cabana@e6029bb.

An easy way to reproduce this issue is to enable ccache in travis, i.e.
junghans@5f65b86
which leads to a build failure:
https://travis-ci.org/junghans/kokkos/builds/438615932 for clang.

An option to overwrite the gcc-toolchain option at the generate_makefile.bash level would be nice.

junghans added a commit to junghans/kokkos that referenced this issue Oct 8, 2018
junghans added a commit to junghans/kokkos that referenced this issue Oct 8, 2018
@crtrott crtrott added the Enhancement Improve existing capability; will potentially require voting label Oct 12, 2018
@crtrott crtrott closed this as completed Nov 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improve existing capability; will potentially require voting
Projects
None yet
Development

No branches or pull requests

2 participants