* Fwd: Packaging a cmake C++ header only library requiring C++17
[not found] <CAFkJGRfDz7iwLtVZxDoPOLgYOsPEUvpT+qarGpLTv-scJV30nw@mail.gmail.com>
@ 2019-11-28 18:11 ` Josh Marshall
2019-11-29 14:58 ` Marius Bakke
2019-11-29 13:22 ` Josh Marshall
1 sibling, 1 reply; 5+ messages in thread
From: Josh Marshall @ 2019-11-28 18:11 UTC (permalink / raw)
To: help-guix
[-- Attachment #1: Type: text/plain, Size: 541 bytes --]
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.
[-- Attachment #2: 0545hcvyz4p07jc5xz4crak2cvpxpv-magic-enum-0.6.3.drv.bz2 --]
[-- Type: application/bzip2, Size: 3779 bytes --]
[-- Attachment #3: magic-enum.scm --]
[-- Type: application/octet-stream, Size: 1205 bytes --]
(define-module (gnu packages magic-enum)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system cmake)
#:use-module (guix licenses)
#:use-module (gnu packages gcc))
(define-public magic-enum
(package
(name "magic-enum")
(version "0.6.3")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/Neargye/magic_enum/archive/v" version ".tar.gz" ))
(sha256
(base32
"0g22jiykx7dznskvkba6qmdasr7pbqp8a15sp0738kw9yjfgx6ak"))))
(build-system cmake-build-system)
(arguments
'(#:tests? #t ;
#:configure-flags '("-DCMAKE_CXX_FLAGS='-std=gnu17 --version'")))
; #:make-flags '("CMAKE_CXX_FLAGS=-std=gnu17")))
(inputs `(("gcc", gcc-9)))
(synopsis "Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code")
(description "Header-only C++17 library provides static reflection for enums, work with any enum type without any macro or boilerplate code.")
(home-page "https://github.com/Neargye/magic_enum")
(license expat)))
magic-enum
[-- Attachment #4: stdout --]
[-- Type: application/octet-stream, Size: 1226 bytes --]
anadon@goodadvicemallard:~/Documents/code/guix-packages$ guix package --install-from-file=magic-enum.scm
substitute: /gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
substitute: /gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
building /gnu/store/l90545hcvyz4p07jc5xz4crak2cvpxpv-magic-enum-0.6.3.drv...
- 'check' phasebuilder for `/gnu/store/l90545hcvyz4p07jc5xz4crak2cvpxpv-magic-enum-0.6.3.drv' failed with exit code 1
build of /gnu/store/l90545hcvyz4p07jc5xz4crak2cvpxpv-magic-enum-0.6.3.drv failed
View build log at '/var/log/guix/drvs/l9/0545hcvyz4p07jc5xz4crak2cvpxpv-magic-enum-0.6.3.drv.bz2'.
guix package: error: build of `/gnu/store/l90545hcvyz4p07jc5xz4crak2cvpxpv-magic-enum-0.6.3.drv' failed
^ permalink raw reply [flat|nested] 5+ messages in thread
* Fwd: Packaging a cmake C++ header only library requiring C++17
[not found] <CAFkJGRfDz7iwLtVZxDoPOLgYOsPEUvpT+qarGpLTv-scJV30nw@mail.gmail.com>
2019-11-28 18:11 ` Fwd: Packaging a cmake C++ header only library requiring C++17 Josh Marshall
@ 2019-11-29 13:22 ` Josh Marshall
2019-11-29 14:16 ` sirgazil
2019-11-29 14:16 ` Tobias Geerinckx-Rice
1 sibling, 2 replies; 5+ messages in thread
From: Josh Marshall @ 2019-11-29 13:22 UTC (permalink / raw)
To: help-guix
[-- Attachment #1: Type: text/plain, Size: 597 bytes --]
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.
[-- Attachment #2: 0545hcvyz4p07jc5xz4crak2cvpxpv-magic-enum-0.6.3.drv.bz2 --]
[-- Type: application/bzip2, Size: 3779 bytes --]
[-- Attachment #3: magic-enum.scm --]
[-- Type: application/octet-stream, Size: 1205 bytes --]
(define-module (gnu packages magic-enum)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system cmake)
#:use-module (guix licenses)
#:use-module (gnu packages gcc))
(define-public magic-enum
(package
(name "magic-enum")
(version "0.6.3")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/Neargye/magic_enum/archive/v" version ".tar.gz" ))
(sha256
(base32
"0g22jiykx7dznskvkba6qmdasr7pbqp8a15sp0738kw9yjfgx6ak"))))
(build-system cmake-build-system)
(arguments
'(#:tests? #t ;
#:configure-flags '("-DCMAKE_CXX_FLAGS='-std=gnu17 --version'")))
; #:make-flags '("CMAKE_CXX_FLAGS=-std=gnu17")))
(inputs `(("gcc", gcc-9)))
(synopsis "Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code")
(description "Header-only C++17 library provides static reflection for enums, work with any enum type without any macro or boilerplate code.")
(home-page "https://github.com/Neargye/magic_enum")
(license expat)))
magic-enum
[-- Attachment #4: stdout --]
[-- Type: application/octet-stream, Size: 1226 bytes --]
anadon@goodadvicemallard:~/Documents/code/guix-packages$ guix package --install-from-file=magic-enum.scm
substitute: /gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
substitute: /gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
building /gnu/store/l90545hcvyz4p07jc5xz4crak2cvpxpv-magic-enum-0.6.3.drv...
- 'check' phasebuilder for `/gnu/store/l90545hcvyz4p07jc5xz4crak2cvpxpv-magic-enum-0.6.3.drv' failed with exit code 1
build of /gnu/store/l90545hcvyz4p07jc5xz4crak2cvpxpv-magic-enum-0.6.3.drv failed
View build log at '/var/log/guix/drvs/l9/0545hcvyz4p07jc5xz4crak2cvpxpv-magic-enum-0.6.3.drv.bz2'.
guix package: error: build of `/gnu/store/l90545hcvyz4p07jc5xz4crak2cvpxpv-magic-enum-0.6.3.drv' failed
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fwd: Packaging a cmake C++ header only library requiring C++17
2019-11-29 13:22 ` Josh Marshall
@ 2019-11-29 14:16 ` sirgazil
2019-11-29 14:16 ` Tobias Geerinckx-Rice
1 sibling, 0 replies; 5+ messages in thread
From: sirgazil @ 2019-11-29 14:16 UTC (permalink / raw)
To: Josh Marshall; +Cc: help-guix
---- On Fri, 29 Nov 2019 08:22:38 -0500 Josh Marshall <joshua.r.marshall.1991@gmail.com> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fwd: Packaging a cmake C++ header only library requiring C++17
2019-11-29 13:22 ` Josh Marshall
2019-11-29 14:16 ` sirgazil
@ 2019-11-29 14:16 ` Tobias Geerinckx-Rice
1 sibling, 0 replies; 5+ messages in thread
From: Tobias Geerinckx-Rice @ 2019-11-29 14:16 UTC (permalink / raw)
To: help-guix
[-- Attachment #1: Type: text/plain, Size: 2191 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fwd: Packaging a cmake C++ header only library requiring C++17
2019-11-28 18:11 ` Fwd: Packaging a cmake C++ header only library requiring C++17 Josh Marshall
@ 2019-11-29 14:58 ` Marius Bakke
0 siblings, 0 replies; 5+ messages in thread
From: Marius Bakke @ 2019-11-29 14:58 UTC (permalink / raw)
To: Josh Marshall, help-guix
[-- Attachment #1: Type: text/plain, Size: 965 bytes --]
Hi Josh,
Josh Marshall <joshua.r.marshall.1991@gmail.com> 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-11-29 14:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAFkJGRfDz7iwLtVZxDoPOLgYOsPEUvpT+qarGpLTv-scJV30nw@mail.gmail.com>
2019-11-28 18:11 ` Fwd: Packaging a cmake C++ header only library requiring C++17 Josh Marshall
2019-11-29 14:58 ` Marius Bakke
2019-11-29 13:22 ` Josh Marshall
2019-11-29 14:16 ` sirgazil
2019-11-29 14:16 ` Tobias Geerinckx-Rice
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.