public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Eli Schwartz <eschwartz93@gmail.com>, gcc-patches@gcc.gnu.org
Subject: Re: [RFC PATCH 1/1] nix: add a simple flake nix shell
Date: Tue, 5 Dec 2023 11:35:00 +0100	[thread overview]
Message-ID: <CAKy8djTcQ2TgG75h_pWgyTOH6Ec0bA-kVeWe94J4h1BUHQmJmA@mail.gmail.com> (raw)
In-Reply-To: <CAFiYyc1F2DBG6h2MrbvVeX4Ge-yDRzFz2KDGBPJ25jSrOcQT5w@mail.gmail.com>

Hi all,

>Generally we have various stuff in contrib/, one of it scripts like
gcc_build.  IMHO the flake.nix file (or a script to create it) could be
put there as well.

I was not sure about that, I will try to see what if I can put in there


>But you can do the same with various other distro build procedures too?
>e.g. Gentoo Prefix allows you to install a full-blown Gentoo anywhere
you like, "by using portage".

With a single difference on Gentoo you are allowed to put stuff in the
global path and use
it from a terminal like `$ pacman -Sy foo`. On nix os you do not,
because the development environment
is used for that.

So all the nice dependencies that gcc required to build can not be
installed in NixOS global pat (e.g libc)
so in NixOS you should define the development environment otherwise
you can do the build. Instead in all
the other systems that you mention you can do.

Please note that the flake.nix does not define how to build gcc, but
just what are the dependencies
that gcc is required in order to contribute to the compiler. In other
words, is you run the flake.nix
on NixOS or any other system you do not have gcc installed on your
system, this is the job of the
distro.

Cheers,

   Vincent.

On Tue, Dec 5, 2023 at 10:03 AM Richard Biener
<richard.guenther@gmail.com> wrote:
>
> On Tue, Dec 5, 2023 at 5:26 AM Eli Schwartz <eschwartz93@gmail.com> wrote:
> >
> > On 12/4/23 9:01 PM, Vincenzo Palazzo wrote:
> > > On Tue, Dec 5, 2023 at 2:54 AM Jeff Law <jeffreyalaw@gmail.com> wrote:
> > >> Distro build procedures are not something the GCC project generally gets
> > >> involved with.
> > >
> > > I see, but to me, this do not look like a distro build procedure,
> > > because you can use
> > > with any kind of system (OSX/UNIX) by using nix.
> >
> >
> > But you can do the same with various other distro build procedures too?
> >
> > e.g. Gentoo Prefix allows you to install a full-blown gentoo anywhere
> > you like, "by using portage".
> >
> > But also by the same token, I can just install pacman or rpm or dpkg on
> > any system, and use the recipe executor just without requiring a
> > database of installed packages.
> >
> >
> > > I disagree with you just because my patch is not building a package
> > > but is just giving
> > > an agnostic way to develop with GCC. OFC is most useful with NixOs because
> > > it does not have apt or pacman or any other kind of package manager.
> >
> >
> > I'm not entirely sure what this statement means (unless you are saying
> > that nix isn't a package manager and NixOS doesn't have any package
> > manager)?
> >
> > But I'd actually go one step further. It looks like this "flake.nix"
> > file is the NixOS specific equivalent of a README.md which says "to
> > install the software, you must first install XX, YY, and ZZ using your
> > system package manager. Often they will have names such as XX-devel and
> > suchlike".
> >
> > Which for GCC would be https://gcc.gnu.org/install/prerequisites.html --
> > this page actually lists a bunch of things I don't see mentioned in your
> > "flake.nix" file so I suspect that it won't, in fact, produce a good
> > development environment for developing GCC.
> >
> > I don't think it's the job of the GCC maintainers to maintain special
> > snowflake integrations with niche linux distros, whether those
> > integrations work or not. But, if it *was* the job of the GCC
> > maintainers, perhaps it would be better to make a script:
> >
> > `tools/setup-development-env.sh $distro`
> >
> > which could abstract away all of this for any distro, not just a niche one.
>
> Generally we have various stuff in contrib/, one of it scripts like
> gcc_build.  IMHO the flake.nix file (or a script to create it) could be
> put there as well.
>
> Richard.
>
> >
> > --
> > Eli Schwartz
> >

  reply	other threads:[~2023-12-05 10:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05  0:55 Vincenzo Palazzo
2023-12-05  1:02 ` Andrew Pinski
2023-12-05  1:07   ` Jeff Law
2023-12-05  1:38     ` Vincenzo Palazzo
2023-12-05  1:54       ` Jeff Law
2023-12-05  2:01         ` Vincenzo Palazzo
2023-12-05  2:02           ` Vincenzo Palazzo
2023-12-05  4:25           ` Eli Schwartz
2023-12-05  8:59             ` Richard Biener
2023-12-05 10:35               ` Vincenzo Palazzo [this message]
2023-12-05 12:43                 ` Eli Schwartz
2023-12-11 16:10                   ` Vincenzo Palazzo
2024-01-31 21:43 Vincenzo Palazzo
2024-01-31 22:19 ` Eli Schwartz
2024-02-01 21:04   ` Vincenzo Palazzo

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

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

  git send-email \
    --in-reply-to=CAKy8djTcQ2TgG75h_pWgyTOH6Ec0bA-kVeWe94J4h1BUHQmJmA@mail.gmail.com \
    --to=vincenzopalazzodev@gmail.com \
    --cc=eschwartz93@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    /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).