spack: Bug in Compiler Wrappers
I believe I’ve discovered a bug in the Spack compiler wrappers that is preventing me from using the NAG Fortran compilers. Compilation succeeds outside of Spack, but fails when using Spack with the error message:
checking for linker for Fortran main program... configure: error: Could not determine a way to link a Fortran test program!
The config.log files show major discrepancies:
# Without Spack
configure:19565: checking if nagfor static flag -Bstatic works
NAG Fortran Compiler Release 6.0(Hibiya) Build 1037
Obsolescent: conftest.f, line 1: Fixed source form
[NAG Fortran Compiler normal termination, 1 warning]
configure:19593: result: yes
# With Spack
configure:19565: checking if /blues/gpfs/home/software/spack/lib/spack/env/nag/nagfor static flag -Bstatic works
configure:19593: result: no
# Without Spack
configure:30125: checking whether Fortran 77 compiler accepts option -O2
configure:30170: nagfor -o conftest -mismatch conftest.f > pac_test1.log 2>&1
configure:30170: $? = 0
configure:30201: nagfor -o conftest -O2 -mismatch conftest.f > pac_test2.log 2>&1
configure:30201: $? = 0
configure:30209: diff -b pac_test1.log pac_test2.log > pac_test.log
configure:30212: $? = 0
configure:30312: result: yes
# With Spack
configure:30125: checking whether Fortran 77 compiler accepts option -O2
configure:30170: /blues/gpfs/home/software/spack/lib/spack/env/nag/nagfor -o conftest
configure:30170: $? = 1
configure: failed program was:
| program main
|
| end
configure:30312: result: no
These results came from trying to compile MPICH 3.2 with GCC 5.3.0 C/C++ compilers and NAG 6.0 Fortran compilers. Note that I had to add FFLAGS=-mismatch to get the compilation working outside of Spack. I’ll submit a PR for this once we get the compiler wrappers working.
@alalazo, @eschnett: Would you be willing to take a look? You’re more familiar with the wrapper than I am. I’ll do what I can on my end. Config.log files are attached below.
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 15 (15 by maintainers)
Commits related to this issue
- spykfunc: add 0.15.2 (#590) — committed to matz-e/spack by matz-e 7 years ago
Hello, this is NAG Compiler Support, could you try the following edit in nag.py please? It’s just a question of adding an extra comma after “-rpath,”.
Here are the notes https://github.com/dealii/dealii/wiki/deal.II-in-Spack (section on mixing compilers for macOS).
I think they are also somewhere in the Spack docu…