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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...