23.04.2023 21:24, Akihiko Odaki wrote:

The output ends with:
gcc: fatal error: cannot execute 'cc1': execvp: No such file or directory
compilation terminated.

$ cd /tmp; printf '#include <stdio.h>\nint main(){puts("Hello!");return 0;}' > hello.c; cp /usr/bin/gcc .; ./gcc hello.c; ./a.out ; ./gcc --version; ls -l gcc; cd /tmp
Hello!
gcc (Debian 12.2.0-14) 12.2.0
Copyright (C) 2022 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.

-rwxr-xr-x 1 mjt mjt 1301496 апр 23 21:30 gcc*

This is debian bookworm.  Ditto for debian bullseye (gcc-10 is in there).

It is interesting that it doesn't work, say, in a subdir of /tmp/, the
same way as in your case above.

Still, GCC is an exception. It is very rare.

/mjt

Reply via email to