As the title says, on my machine spack fails when compiling gcc, when following the instructions.
error log (large file!)
system info
Thanks for the report.
Oddly, I can't see an error in the error log regarding the compile... Do I miss it? Wait, truncated in GitHub... looking at it now...
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
what does this config.log file say inside /tmp/berceanu/spack-stage/spack-stage-SomeHash/gcc-5.4.0/spack-build/? Looks like a broken system compiler to start with...
Anyway, are you aiming for the CUDA backend?
If you can install CUDA 9.2 (read as: if you can install the necessary drivers >= 396.26), you can also use the GCC 5.5 (package: g++-5) or the GCC 6.4 (package: g++-6) compilers that come with Ubuntu.
After installing them from the default package sources, just spack compiler add them and you can use %[email protected] instead of the 5.4 GCC (which is the most tested default we deploy).
Thanks for the quick reply!
Here is the config.log.
The system is a stock installation of the new Ubuntu LTS version, 18.04, which comes with gcc 7.3.0.
I realise I can bypass this error by installing an older system compiler and using that, but I still think it would be nice to fix it because at some point new users following the install instructions will run into it :) Let me know if I can be of further help!
Yep agree. I wonder if it's possible in general to build GCC 5.4 with GCC 7.3 or if only the other way around is supported. Did you try building a GCC 5.4 (with GCC 7.3) manually just to test?
According to the gcc mailing list, it should be possible to build 5.4 via 7.3. However, perhaps one important point is that 5.4 is no longer officially supported, the oldest officially supported release being 6.4 (https://gcc.gnu.org). Would it be possible to bump up to 6.4 on the spack build you reckon?
If we recommend using CUDA 9.2 (only) we could. Minor thing that holds me back is https://github.com/ComputationalRadiationPhysics/alpaka/issues/572
But that would make it less flexible since the whole stack needs to be rebuild if one has e.g. CUDA 8 only.
Can you report that GCC build issue upstream with spack?
Reported in https://github.com/spack/spack/issues/9159#issue-356203127
Hey, @hightower8083 perhaps this is connected to why the setup fails on your Macbook?
@n01r , hard to say for sure -- macos often has problems I'm too lazy to explore. The error is raised when i do spack install [email protected] and it looks like this
==> Installing gcc
==> Using cached archive: /Users/igor/src/spack/var/spack/cache/gcc/gcc-5.4.0.tar.bz2
==> Staging archive: /Users/igor/src/spack/var/spack/stage/gcc-5.4.0-hrisaxyfs27fmku7aaxha6vamdu6kuyz/gcc-5.4.0.tar.bz2
==> Created stage in /Users/igor/src/spack/var/spack/stage/gcc-5.4.0-hrisaxyfs27fmku7aaxha6vamdu6kuyz
==> Applied patch darwin/gcc-7.1.0-headerpad.patch
==> Applied patch darwin/gcc-6.1.0-jit.patch
==> Applied patch ucontext_t.patch
==> Applied patch stack_t.patch
==> Applied patch signal.patch
==> Ran patch() for gcc
==> Building gcc [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
'make' '-j8' 'bootstrap'
5 errors found in build log:
9884 /Users/igor/src/spack/var/spack/stage/gcc-5.4.0-hrisaxyfs27fmku7a
axha6vamdu6kuyz/gcc-5.4.0/gcc/wide-int.h:284:18: note: did you me
an class here?
9885 template <int N> struct fixed_wide_int_storage;
9886 ^~~~~~
9887 class
9888 In file included from /Users/igor/src/spack/var/spack/stage/gcc-5
.4.0-hrisaxyfs27fmku7aaxha6vamdu6kuyz/gcc-5.4.0/gcc/auto-profile.
c:25:
9889 In file included from /Applications/Xcode.app/Contents/Developer/
Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/map:446:
>> 9890 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefaul
t.xctoolchain/usr/include/c++/v1/functional:1408:2: error: no mem
ber named 'fancy_abort' in namespace 'std::__1'; did you mean sim
ply 'fancy_abort'?
9891 _VSTD::abort();
9892 ^~~~~~~
9893 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefaul
t.xctoolchain/usr/include/c++/v1/__config:441:15: note: expanded
from macro '_VSTD'
9894 #define _VSTD std::_LIBCPP_NAMESPACE
9895 ^
9896 /Users/igor/src/spack/var/spack/stage/gcc-5.4.0-hrisaxyfs27fmku7a
axha6vamdu6kuyz/gcc-5.4.0/gcc/system.h:700:13: note: 'fancy_abort
' declared here
...
10255 ^
10256 /Users/igor/src/spack/var/spack/stage/gcc-5.4.0-hrisaxyfs27fmku7a
axha6vamdu6kuyz/gcc-5.4.0/gcc/coretypes.h:55:8: note: previous us
e is here
10257 struct rtx_def;
10258 ^
10259 13 warnings and 1 error generated.
10260 clang: warning: treating 'c' input as 'c++' when in C++ mode, thi
s behavior is deprecated [-Wdeprecated]
>> 10261 make[3]: *** [auto-profile.o] Error 1
10262 make[3]: *** Waiting for unfinished jobs....
10263 In file included from /Users/igor/src/spack/var/spack/stage/gcc-5
.4.0-hrisaxyfs27fmku7aaxha6vamdu6kuyz/gcc-5.4.0/gcc/bb-reorder.c:
95:
10264 /Users/igor/src/spack/var/spack/stage/gcc-5.4.0-hrisaxyfs27fmku7a
axha6vamdu6kuyz/gcc-5.4.0/gcc/rtl.h:282:1: warning: 'rtx_def' def
ined as a struct here but previously declared as a class [-Wmisma
tched-tags]
10265 struct GTY((desc("0"), tag("0"),
10266 ^
10267 /Users/igor/src/spack/var/spack/stage/gcc-5.4.0-hrisaxyfs27fmku7a
axha6vamdu6kuyz/gcc-5.4.0/gcc/coretypes.h:62:1: note: did you mea
n struct here?
...
11252 echo timestamp > s-automata
11253 /bin/sh /Users/igor/src/spack/var/spack/stage/gcc-5.4.0-hrisaxyfs
27fmku7aaxha6vamdu6kuyz/gcc-5.4.0/gcc/../move-if-change tmp-attrt
ab.c insn-attrtab.c
11254 /bin/sh /Users/igor/src/spack/var/spack/stage/gcc-5.4.0-hrisaxyfs
27fmku7aaxha6vamdu6kuyz/gcc-5.4.0/gcc/../move-if-change tmp-dfata
b.c insn-dfatab.c
11255 /bin/sh /Users/igor/src/spack/var/spack/stage/gcc-5.4.0-hrisaxyfs
27fmku7aaxha6vamdu6kuyz/gcc-5.4.0/gcc/../move-if-change tmp-laten
cytab.c insn-latencytab.c
11256 echo timestamp > s-attrtab
11257 rm gcc.pod
>> 11258 make[2]: *** [all-stage1-gcc] Error 2
>> 11259 make[1]: *** [stage1-bubble] Error 2
>> 11260 make: *** [bootstrap] Error 2
See build log for details:
/Users/igor/src/spack/var/spack/stage/gcc-5.4.0-hrisaxyfs27fmku7aaxha6vamdu6kuyz/gcc-5.4.0/spack-build.out
@berceanu @hightower8083 both of you want to use the CUDA backend, right? Are you able to install CUDA 9.2 on those machines? If so, we can go for GCC 6 and 7 easily!
In case you only have CUDA 9.0 or CUDA 9.1, you can still use GCC 5.5!
spack compiler list | grep [email protected] | spack install [email protected] && spack load [email protected] && spack compiler add
Please check your spack compiler list output. If this already contains a matching GCC as mentioned above, you are good to go and can skip this step of bootstrapping an older GCC.
(Just for the curious: when transitioning to C++11, GCC libs changed several times and nvcc was not compatible with the std::tuple implementation in GCC 5.5 and 6+ for some time, which defines the version ranges above for compatible host-device compilers.
The only reason I put GCC 5.4 there is since we even support CUDA 8 with the 0.4.0 release.)
Hi @ax3l -- on my macbook i don't have CUDA-compatible GPU -- its amd r9 m370x, so only openCL. So I want to build an openMP backend. In my spack i have gcc 4.9.3 and 8.1.0 -- would one of those work or should I try get another one?
Oh, if you want to build for the CPU backend, just take the latest compiler on your notebook, both versions, preferably GCC 8.1 for better performance, should work! (spack ... %[email protected] if it shows up in your spack compiler list)
Please feel free to report issues on Mac (in a separate issue) since we have no OSX CI yet set up. Fixed some install issues on OSX recently.
I too tried with gcc-5.4.0 and gcc-7.1.0 and both of them gave exactly same error during a spack install. I reverted back to gcc-4.9.4 and it successfully installed. I am running it on openSuSe Leap 42.3 with gcc-4.8 as default compiler.
I proposed changes to the documentation in #2720, tests/comments are very welcome! :)
note on initial report: even following the FAQ gives me no further clue what was wrong in the initial issue: https://gcc.gnu.org/wiki/FAQ#Configuration_fails_with_.27.27configure:_error:_cannot_compute_suffix_of_object_files:_cannot_compile.27.27._What_is_the_problem.3F