unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Tobias Geerinckx-Rice <me@tobias.gr>
To: help-guix@gnu.org
Subject: Re: Fwd: Packaging a cmake C++ header only library requiring C++17
Date: Fri, 29 Nov 2019 15:16:27 +0100	[thread overview]
Message-ID: <87lfry939g.fsf@nckx> (raw)
In-Reply-To: <CAFkJGRcBn_k-7J1Q-oerrHfd8VoBsxU7KKe5n2ysJEg8St5q8A@mail.gmail.com>

[-- 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 --]

      parent reply	other threads:[~2019-11-29 14:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lfry939g.fsf@nckx \
    --to=me@tobias.gr \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).