Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How can use codeblocks like a normal user? (Can't compile)
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Wed Sep 05, 2012 6:02 am    Post subject: Reply with quote

Hu wrote:
My user is not in the portage group and I have never had problems invoking gcc from my user account. What does strace say about the failure?


well for some reason he cannot compile as normal user which is strange it self although he has permissions to the file, as he can update his system (I think so), I've started to think out of the box what can cause it, portage groups was a long shot which didn't worked.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9532
Location: beyond the rim

PostPosted: Wed Sep 05, 2012 7:23 am    Post subject: Reply with quote

For reference, /usr/bin/gcc is a wrapper program to invoke the currently configured gcc implementation which appears to be /usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4/gcc in your case. Try to execute that one directly with your user account, hopefully it will yield a more useful error message.
Back to top
View user's profile Send private message
Yczo
Apprentice
Apprentice


Joined: 09 Jul 2011
Posts: 225

PostPosted: Fri Sep 07, 2012 8:27 pm    Post subject: Reply with quote

Hello.

Ok DaggyStyle avr-gcc is a compiler from the atmel microcontrollers. I use it with another specific gui that only serves for itself

You're right Hu, is not a problem from codeblocks.

Recently i discovered that:

$ gcc -o counter.c
gcc-config: error: could not run/locate 'gcc'


$ ls -l //I'm enigma, I'm allowed
-rwxr-xr-x 1 enigma enigma 733 dic 22 2011 counter.c

And on father directory

drwxr-xr-x 5 enigma enigma 4096 sep 7 22:11 example

and following the advice from Genone
$ /usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4/gcc
bash: /usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4/gcc: Permission denied


regards
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Fri Sep 07, 2012 10:39 pm    Post subject: Reply with quote

Yczo wrote:
Hello.

Ok DaggyStyle avr-gcc is a compiler from the atmel microcontrollers. I use it with another specific gui that only serves for itself

You're right Hu, is not a problem from codeblocks.

Recently i discovered that:

$ gcc -o counter.c
gcc-config: error: could not run/locate 'gcc'


$ ls -l //I'm enigma, I'm allowed
-rwxr-xr-x 1 enigma enigma 733 dic 22 2011 counter.c

And on father directory

drwxr-xr-x 5 enigma enigma 4096 sep 7 22:11 example

and following the advice from Genone
$ /usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4/gcc
bash: /usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4/gcc: Permission denied


regards


what is the output of ls -l /usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4/gcc ?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
wjb
l33t
l33t


Joined: 10 Jul 2005
Posts: 609
Location: Fife, Scotland

PostPosted: Sat Sep 08, 2012 8:27 am    Post subject: Reply with quote

Can't selinux stop things running like this? (not that I know anything about selinux)
Back to top
View user's profile Send private message
Yczo
Apprentice
Apprentice


Joined: 09 Jul 2011
Posts: 225

PostPosted: Sat Sep 08, 2012 8:58 pm    Post subject: Reply with quote

Hello guys. I hope that all of this will respond the questions.

$ eix-installed all |grep selinux
$ //no response

# ls -l /usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4/gcc
lrwxrwxrwx 1 root root 23 ago 22 21:54 /usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4/gcc -> x86_64-pc-linux-gnu-gcc

$ gcc-config -c
x86_64-pc-linux-gnu-4.5.4 //could came because i have x86_64-pc-linux-gnu-gcc
//and not x86_64-linux-gnu-4.5.4?

$ gcc-config -l
[1] avr-4.4.5 * //Asterisk in blue

[2] x86_64-pc-linux-gnu-4.5.4 * //Asterisk in green


regards.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Sun Sep 09, 2012 5:11 am    Post subject: Reply with quote

Yczo wrote:
Hello guys. I hope that all of this will respond the questions.

$ eix-installed all |grep selinux
$ //no response

# ls -l /usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4/gcc
lrwxrwxrwx 1 root root 23 ago 22 21:54 /usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4/gcc -> x86_64-pc-linux-gnu-gcc

$ gcc-config -c
x86_64-pc-linux-gnu-4.5.4 //could came because i have x86_64-pc-linux-gnu-gcc
//and not x86_64-linux-gnu-4.5.4?

$ gcc-config -l
[1] avr-4.4.5 * //Asterisk in blue

[2] x86_64-pc-linux-gnu-4.5.4 * //Asterisk in green


regards.


yes but as x86_64-pc-linux-gnu/gcc-bin/4.5.4/gcc is a link, it would have been better if you've added the ls -l output of the target, e.g. /usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4/x86_64-pc-linux-gnu-gcc
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Yczo
Apprentice
Apprentice


Joined: 09 Jul 2011
Posts: 225

PostPosted: Tue Sep 11, 2012 6:17 pm    Post subject: Reply with quote

# ls -l /usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4/x86_64-pc-linux-gnu-gcc

-rwxr-xr-x 1 root root 263544 sep 9 17:29 /usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4/x86_64-pc-linux-gnu-gcc


out of ideas. Regards!
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9532
Location: beyond the rim

PostPosted: Tue Sep 25, 2012 9:02 am    Post subject: Reply with quote

Yczo wrote:
# ls -l /usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4/x86_64-pc-linux-gnu-gcc

-rwxr-xr-x 1 root root 263544 sep 9 17:29 /usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4/x86_64-pc-linux-gnu-gcc

Tried running that one directly yet?
Back to top
View user's profile Send private message
wjb
l33t
l33t


Joined: 10 Jul 2005
Posts: 609
Location: Fife, Scotland

PostPosted: Tue Sep 25, 2012 7:46 pm    Post subject: Reply with quote

If it works in root but not your normal account, how about creating a new user account - just a normal user - and see if gcc works there.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum