[Discuss] really odd GCC bug? under Ubuntu

Bill Bogstad bogstad at pobox.com
Sat May 11 13:40:18 EDT 2013


I was trying to compile a package under Ubuntu and the compilation
system seemed to be picking up stuff that I had
installed in /usr/local rather then the system wide files. Rather then
figure out how to get the build system to stop
 doing that, I decided to make /usr/local "go away" using:

# chmod 0 /usr/local

Still didn't work.   In fact, gcc broke:

$ gcc main.c
cc1: error: /usr/local/include/i486-linux-gnu: Permission denied
cc1: error: /usr/local/include: Permission denied

where main.c is:

int
main ()
{
  return 0;
}

If instead, I made /usr/local "go away" using:

# mv /usr/local /usr/local.old

it works fine.  It seems that if /usr/local doesn't exist gcc is
happy, but if it does exist it must be able to read stuff
from it.   I tried this on both an Ubuntu 10.04 and 12.04 system with
the same results.  Can people try this out on
other systems and let me know if they see the same thing?  I'm curious
if this is a local config, Ubuntu, or generic GCC
issue.

Thanks,
Bill Bogstad



More information about the Discuss mailing list