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.guent...@gmail.com> wrote: > > On Tue, Dec 5, 2023 at 5:26 AM Eli Schwartz <eschwart...@gmail.com> wrote: > > > > On 12/4/23 9:01 PM, Vincenzo Palazzo wrote: > > > On Tue, Dec 5, 2023 at 2:54 AM Jeff Law <jeffreya...@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 > >