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 does not work with absolute compiler path in CC, CXX, and FC variables #34

Open
naromero77 opened this issue Nov 15, 2019 · 2 comments
Assignees
Labels
V&V bug Something in the V&V isn't working

Comments

@naromero77
Copy link

Describe the bug
If CC, CXX, or FC include the absolute compiler path. The build system gets very confused. Here is the work around @josemonsalve2 came up with for my Linux desktop. I have GCC-9 with the NVidia backend installed via Spack.

PATH=/scratch/naromero/opt/spack/linux-ubuntu18.04-westmere/gcc-8.3.0/gcc-9.2.0-oavx2juw3k6od5vagdvtshcwrgclcmqv/bin/:$PATH make CC=gcc CXX=g++ FC=gfortran SOURCES=offloading_success.c VERBOSE=1 VERBOSE_TESTS=1 LOG=1 LOG_ALL=1 all

But without the $PATH, GCC is not properly detected.

Test that it applies to
All tests

To Reproduce
See above line.

Expected behavior
Test suite compiles and runs.

Compiler
GCC 9 with NVidia backend compiled via Spack

Accelerator hardware
NVidia GPU card.

@naromero77 naromero77 added the V&V bug Something in the V&V isn't working label Nov 15, 2019
@naromero77 naromero77 changed the title Makefile does not work with full compiler path in CC, CXX, FC Makefile does not work with absolute compiler path in CC, CXX, and FC variables Nov 15, 2019
@josemonsalve2
Copy link
Contributor

https://www.gnu.org/software/make/manual/html_node/File-Name-Functions.html

Using notdir in the comparison will be the solution.

@josemonsalve2
Copy link
Contributor

And for postfix probably use this:
https://www.gnu.org/software/make/manual/html_node/Text-Functions.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V&V bug Something in the V&V isn't working
Projects
None yet
Development

No branches or pull requests

3 participants