unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Fredrik Salomonsson <plattfot@posteo.net>
To: Ekaitz Zarraga <ekaitz@elenq.tech>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: setup c/c++ development environment
Date: Thu, 11 Mar 2021 12:03:49 -0800	[thread overview]
Message-ID: <87lfatlaoq.fsf@posteo.net> (raw)
In-Reply-To: <GZyuhieLJ3BWP4kae37ZbozD8mpuvUi1Wc2M9bXr9QDDgL6nUQDmi0Nye0j4fSxLn1nGjc3Ply6KPTgSq1aEiop43LAGebaTf7XJQyuekeg=@elenq.tech>


Hi Ekaitz,

CC:ing the rest of the help-guix mailing list, I hope you don't mind.

Ekaitz Zarraga <ekaitz@elenq.tech> writes:

> I have a question with all this you shared.
>
> Is this compiling only the needed parts or it recompiles the whole directory from scratch every time you run `guix build`?

To my knowledge it will recompile everything every time you run
`guix build`.

So this method might be better suited for CI (continuous integration).

But benefit with the `guix.scm` file is that you can also use the same
file to setup the environment you need to build your package.

`guix environment -l guix.scm`
or
`guix environment -l build-aux/guix.scm`

Depending how you have layed out the guix.scm file.

That will use guix to setup the environment needed to build the your
package. And in that shell you can use:

meson build
meson compile -C build
meson test -C build

Or equivalent for other build systems. Which will support partial
builds.

Note that guix might have issues with build generated files for some
build systems when mixing guix environment and guix build. E.g. run
`guix environment`, generate the build files and then run `guix build`.
It seems fine with meson, even when not filtering out the build files.
But I have had issues with GNU autotools and permissions,
`make distclean` before calling `guix build` is a quick workaround. A
better option is probably to filter out those files when collecting the
source.

I hope that answers your question.

-- 
s/Fred[re]+i[ck]+/Fredrik/g


       reply	other threads:[~2021-03-11 20:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <GZyuhieLJ3BWP4kae37ZbozD8mpuvUi1Wc2M9bXr9QDDgL6nUQDmi0Nye0j4fSxLn1nGjc3Ply6KPTgSq1aEiop43LAGebaTf7XJQyuekeg=@elenq.tech>
2021-03-11 20:03 ` Fredrik Salomonsson [this message]
2021-03-13 19:29   ` setup c/c++ development environment Ekaitz Zarraga
2021-03-15  2:25     ` Fredrik Salomonsson
2021-03-04 16:22 Roy Lemmon
2021-03-04 19:02 ` Fredrik Salomonsson

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=87lfatlaoq.fsf@posteo.net \
    --to=plattfot@posteo.net \
    --cc=ekaitz@elenq.tech \
    --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).