Josh, Welcome!
Josh Marshall 写道:
The problem which we can't figure out is why the compiler being usedis the default for `gcc` at 7.4 while there is explicit use and dependency on `gcc` 9.2 via `gcc-9`. We're stumped.
Well… I'm easily stumped but that's actually not the case here.You've added gcc-9 to ‘inputs’. If you rename your ‘inputs’ field to ‘native-inputs’ you'll the see the magic kick in:
$ guix build -f magic_enum.scm […] g++ (GCC) 9.2.0 Copyright (C) 2019 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
:-) After removing the debugging ‘ --version’, it complains that:cc1plus: error: command line option ?-std=gnu17? is valid for C/ObjC but not for C++ [-Werror]
True dat. So I edit your code to read: #:configure-flags '("-DCMAKE_CXX_FLAGS=-std=c++17")Note that there's no need for 'quotes' here. Guix doesn't pass command lines to a shell like many other build systems.
Et pouf! $ guix build -f magic_enum.scm […] /gnu/store/h9npwdihnwr11xdbqjr20q5w2r6dbw1x-magic-enum-0.6.3$ tree /gnu/store/h9npwdihnwr11xdbqjr20q5w2r6dbw1x-magic-enum-0.6.3
/gnu/store/h9npwdihnwr11xdbqjr20q5w2r6dbw1x-magic-enum-0.6.3 ├── include │ └── magic_enum.hpp ├── lib │ └── cmake │ └── magic_enum │ ├── magic_enumConfig.cmake │ └── magic_enumConfigVersion.cmake └── share └── doc └── magic-enum-0.6.3 └── LICENSE Glorious.
Resending because I didn't get a post acknowledgement.
I don't think (first) posts are explicitly acknowledged. The mailing lists are sometimes delayed (seldom more than a few minutes). The Web archives have a similar but often longer delay.
nckd and I have gone back and forth over a few days in IRC
Close ;-) I know, weird nick, see my real name for an explanation.
Kind regards, T G-R
signature.asc
Description: PGP signature