Re: Fwd: Packaging a cmake C++ header only library requiring C++17
Hi Josh, Josh Marshall writes: > Hello, > > nckd and I have gone back and forth over a few days in IRC trying to > help me out here. I am trying to package magic-enum ( > https://github.com/Neargye/magic_enum ) which is a C++ header only > library requiring at least C++ 17, and uses the cmake build system. > The problem which we can't figure out is why the compiler being used > is the default for `gcc` at 7.4 while there is explicit use and > dependency on `gcc` 9.2 via `gcc-9`. We're stumped. > > Attached are the latest package definitions, build log, and cli > invocation and output. If you change 'inputs' to 'native-inputs', then CMake will pick up the correct GCC, and you can remove the (arguments ...) block. (you probably wanted -std=gnu++17 instead of -std=gnu17 too, but no need when using GCC 9) Pro tip: use 'guix build -f magic-enum.scm' to get the build output right in your terminal. :-) HTH, Marius signature.asc Description: PGP signature
Re: Fwd: Packaging a cmake C++ header only library requiring C++17
Josh, Welcome! Josh Marshall 写道: The problem which we can't figure out is why the compiler being used is 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
Re: Fwd: Packaging a cmake C++ header only library requiring C++17
On Fri, 29 Nov 2019 08:22:38 -0500 Josh Marshall wrote > Hello, > > Resending because I didn't get a post acknowledgement. I see it. The previous one was posted too, though: https://lists.gnu.org/archive/html/help-guix/2019-11/msg00199.html
Fwd: Packaging a cmake C++ header only library requiring C++17
Hello, Resending because I didn't get a post acknowledgement. nckd and I have gone back and forth over a few days in IRC trying to help me out here. I am trying to package magic-enum ( https://github.com/Neargye/magic_enum ) which is a C++ header only library requiring at least C++ 17, and uses the cmake build system. The problem which we can't figure out is why the compiler being used is the default for `gcc` at 7.4 while there is explicit use and dependency on `gcc` 9.2 via `gcc-9`. We're stumped. Attached are the latest package definitions, build log, and cli invocation and output. 0545hcvyz4p07jc5xz4crak2cvpxpv-magic-enum-0.6.3.drv.bz2 Description: application/bzip2 magic-enum.scm Description: Binary data stdout Description: Binary data
Fwd: Packaging a cmake C++ header only library requiring C++17
Hello, nckd and I have gone back and forth over a few days in IRC trying to help me out here. I am trying to package magic-enum ( https://github.com/Neargye/magic_enum ) which is a C++ header only library requiring at least C++ 17, and uses the cmake build system. The problem which we can't figure out is why the compiler being used is the default for `gcc` at 7.4 while there is explicit use and dependency on `gcc` 9.2 via `gcc-9`. We're stumped. Attached are the latest package definitions, build log, and cli invocation and output. 0545hcvyz4p07jc5xz4crak2cvpxpv-magic-enum-0.6.3.drv.bz2 Description: application/bzip2 magic-enum.scm Description: Binary data stdout Description: Binary data