Jump to content

g++ compiling issue [SOLVED]


Guest nomenklatura
 Share

Recommended Posts

Guest nomenklatura

Dear all,

 

I have not been able to find anything on this anywhare, so I assume it's trivial....

 

I am running MDK 10.1 community, and I have what appears to be a permissions problem when attempting to compile c++ code. Note that FORTRAN 77 code compiles fine. When I attempt to compile any cpp code I get:

 

cc1plus: /usr/lib/gcc/i586-mandrake-linux-gnu/4.4.1/../../../../include/c++/3.4.1: Permission denied

cc1plus: /usr/lib/gcc/i586-mandrake-linux-gnu/4.4.1/../../../../include/c++/3.4.1/i586-mandrake-linux-gnu: Permission denied

cc1plus: /usr/lib/gcc/i586-mandrake-linux-gnu/4.4.1/../../../../include/c++/3.4.1/backward: Permission denied

 

I am using gcc 3.4.1-3, but it does exactly the same with 3.4.1-4. Has anyone experienced this? I imagine it is a bug fixed in the official release. In particular, what do the /../../../../ mean? Do I just need to change permissions to 755?

 

Any help appreciated!

Link to comment
Share on other sites

The ../../../../ means 'up four directories from

/usr/lib/gcc/i586-mandrake-linux-gnu/4.4.1

 

which I'm assuming is a typo, since the latest stable gcc I have is 3.4.1

Up 4 directories from there happens to be /usr, so:

> cd /usr/include/c++
root@laptop.home /usr/include/c++ 2252 20-Nov-04
> ls -l
total 8
drwxr-xr-x  6 root root 4096 Nov 14 02:45 3.3.4/
drwxr-xr-x  7 root root 4096 Oct  4 22:25 3.4.1/

 

Are those the kind of permissions you see?

Link to comment
Share on other sites

Guest nomenklatura

Actually, the problem was in the c++ directory above. The permissinons are wrong in that one:

 

> cd /usr/include/
>ls -l
total 1544
[...]
drwx------   3 root root   4096 Oct 12 16:38 c++/
[...]

 

By changing the permissions to 755, everything worked fine. Sorry to have wasted your time for such a trivial thing, but thanks for answering!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...