Hello,

gcc from relocatable pack does not work.  Can be reproduced as follows:

1. Make a relocatable pack:

    $ guix time-machine -q --commit=59e6eae6e579b7edcac20390eb321b92f3405f61 -- 
pack -RS/xxetc=etc gcc-toolchain
    
/gnu/store/gdwhzaa5fyrcky6nlbdmczj1p7y1y88k-gcc-toolchain-tarball-pack.tar.gz

2. Switch to a directory and copy it there:

    $ mkdir /tmp/fff
    $ cd /tmp/fff
    $ cp 
/gnu/store/gdwhzaa5fyrcky6nlbdmczj1p7y1y88k-gcc-toolchain-tarball-pack.tar.gz 
pack.tar.gz

3. Start a container with the directory mounted:

    $ guix shell podman -- podman run --rm -it --mount type=bind,src=.,dst=/x 
docker.io/library/alpine:3.24
    Trying to pull docker.io/library/alpine:3.24...
    Getting image source signatures
    Copying blob 55afa1ecc21d done   | 
    Copying config d529dd0c6e done   | 
    Writing manifest to image destination
    / # 

4. In the container unpack the archive and source the profile:

    # tar -xvf /x/pack.tar.gz
    # . xxetc/profile

5. Verify gcc starts:

    # gcc --version
    gcc (GCC) 16.1.0
    Copyright (C) 2026 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

6. Create file and try to compile it:

    # echo 'int main(){}' >a.c
    # gcc a.c
    gcc: fatal error: cannot execute 'cc1': posix_spawnp: No such file or 
directory
    compilation terminated.

As you can see, the compilation fails.  If you do the same steps with pack
created without the -R, the compilation works.

Have a nice day,
Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.



Reply via email to