[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setup c/c++ development environment

From: Fredrik Salomonsson
Subject: Re: setup c/c++ development environment
Date: Thu, 11 Mar 2021 12:03:49 -0800

Hi Ekaitz,

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

Ekaitz Zarraga <> 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`
`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

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

I hope that answers your question.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]