http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46673
Summary: Misleading error message when cc1 has no exec
permission
Product: gcc
Version: 4.5.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: driver
AssignedTo: [email protected]
ReportedBy: [email protected]
Hi,
if, for whatever reason, cc1 (and maybe other programs called by the driver),
doesn't have execute permissions, the resulting error message is misleading:
% gcc -o hello hello.c
gcc: error trying to exec 'cc1': execvp: No such file or directory
but:
% ll /opt/gcc/libexec/gcc/i686-pc-linux-gnu/4.5.1/cc1
-rw-r--r-- 1 dheinric etrsw 37286235 2010-11-26 10:56
/opt/gcc/libexec/gcc/i686-pc-linux-gnu/4.5.1/cc1
So I guess the better error message would be: "Permission denied".
% chmod +x /opt/gcc/libexec/gcc/i686-pc-linux-gnu/4.5.1/cc1
% gcc -o hello hello.c
% echo $?
0
% LANG="" gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/gcc/libexec/gcc/i686-pc-linux-gnu/4.5.1/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.5.1/configure --prefix=/opt/gcc
Thread model: posix
gcc version 4.5.1 (GCC)