Hello, Laurent Gatto <laurent.ga...@gmail.com> writes:
> Hi, > > ``` > $ guix package -I gcc > gcc-toolchain 14.2.0 out > /gnu/store/x2kv3zw2k7ql211m5kvb6yw401gab0x9-gcc-toolchain-14.2.0 > ``` > > but nothing matches stdc++ > > ``` > $ guix package -I stdc\+\+ > ``` > > If I `guix search for stdc\+\+`, I get, libstdc++-doc 9.5.0 and 5.5.0, > texlive-stdclsdv, ocaml-stdcompat and rust-link-cplusplus. Is this > normal? Yeah, all that looks normal. I was thinking that maybe you had an old package of gcc or libstdc++ lying around. As things where split up awhile back before they added gcc-toolchain — I don't remember if libstdc++ was ever a separate package though. > > ``` > $ guix describe > Generation 63 Nov 13 2024 00:02:27 (current) > guix-science 7304e37 > repository URL: https://codeberg.org/guix-science/guix-science.git > branch: master > commit: 7304e37d4d664f27a18577e388c91413878d62fc > nonguix 99574ff > repository URL: https://gitlab.com/nonguix/nonguix > branch: master > commit: 99574ff94b6fb97794ba720b6fdadf470963dbdc > lguix-channel 4aa4417 > repository URL: https://codeberg.org/lgatto/lguix-channel.git > branch: main > commit: 4aa4417eec58db3d5a9f1c90250ef57641489717 > guix 4e028ec > repository URL: https://git.savannah.gnu.org/git/guix.git > branch: master > commit: 4e028ecc823bcdbb69c391ad7079085cd7749b15 > ``` > > The only non-standard channel is my own, that only provides a couple > of packages. I doubt this is the culprit, as there is no gcc related > package and I was already experiencing issues before setting it up. > I don't think there's any issue with gcc. I installed it to the normal profile and it worked fine for me: ``` $ guix package -i gcc-toolchain The following package will be installed: gcc-toolchain 14.2.0 The following derivation will be built: /gnu/store/msdr271hjls9icnhj20p4za06hpsbrqr-profile.drv building CA certificate bundle... listing Emacs sub-directories... building fonts directory... building directory of Info manuals... building profile with 3 packages... hint: Consider setting the necessary environment variables by running: GUIX_PROFILE="/home/plattfot/.guix-profile" . "$GUIX_PROFILE/etc/profile" Alternately, see `guix package --search-paths -p "/home/plattfot/.guix-profile"'. $ GUIX_PROFILE="/home/plattfot/.guix-profile" $ . "$GUIX_PROFILE/etc/profile" $ which g++ /home/plattfot/.guix-profile/bin/g++ ``` Checking the hash for the one it installed: ``` $ guix package -I gcc gcc-toolchain 14.2.0 out /gnu/store/x2kv3zw2k7ql211m5kvb6yw401gab0x9-gcc-toolchain-14.2.0 ``` And it is an exact match with yours: > ``` > $ guix package -I gcc > gcc-toolchain 14.2.0 out > /gnu/store/x2kv3zw2k7ql211m5kvb6yw401gab0x9-gcc-toolchain-14.2.0 > ``` So we should be using the exact same compiler and with mine, your tiny test works: ``` $ g++ /tmp/main.cpp -o /tmp/a.out && /tmp/a.out 201703 ``` So something else must be affecting yours. No idea about what that is though. Did you install guix as a package manager on top of an foreign distro or is this a Guix System machine? Also has this ever worked for you? If so you might trying doing a kind of git bisect on your packages using `guix package --switch-generation`. First find a working generation with `guix package --list-generations`, pick the generation that is in the middle of the latest broken generation and the older working one. Switch to that, do the test. If it works then the problem is most likely between that generation and the latest broken generation. If not, then the issue is between the current generation and the older working one. Pick the middle generation between the working and broken generation and repeat. Just keep iterating until you find the generation that introduced the issue. Then you can compare with the previous working generation to see if there are any differences in packages. -- s/Fred[re]+i[ck]+/Fredrik/g