Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

How can use codeblocks like a normal user? (Can't compile)

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
35 posts
  • 1
  • 2
  • Next
Author
Message
Yczo
Apprentice
Apprentice
User avatar
Posts: 225
Joined: Sat Jul 09, 2011 9:42 pm

How can use codeblocks like a normal user? (Can't compile)

  • Quote

Post by Yczo » Thu Aug 30, 2012 1:14 pm

Hello.

I can't use codeblocks without being root (well realy I can't compile). I know that this is dangerous. Would be someone so kind to tell me what must I do to use it like a normal user to start to learn c/c++?

Thanks in advance
Top
DaggyStyle
Watchman
Watchman
User avatar
Posts: 5969
Joined: Wed Mar 22, 2006 6:57 am

Re: How can use codeblocks like a normal user? (Can't compil

  • Quote

Post by DaggyStyle » Thu Aug 30, 2012 1:46 pm

Yczo wrote:Hello.

I can't use codeblocks without being root (well realy I can't compile). I know that this is dangerous.
why and how on earth are you trying to run codeblocks as root?
Yczo wrote:Would be someone so kind to tell me what must I do to use it like a normal user to start to learn c/c++?
you do know C and C++ are languages and codeblocks is an IDE right? you absolutely don't need codeblocks to program in either C nor C++.
you can use nano, vi, anuja, kdevelop, codelite or whatever IDE you want to ease your programming experience but you don't need them to start.
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Top
Yczo
Apprentice
Apprentice
User avatar
Posts: 225
Joined: Sat Jul 09, 2011 9:42 pm

  • Quote

Post by Yczo » Thu Aug 30, 2012 2:15 pm

Yes, I know that, but is very comfortable compile and execute the programs directly from the Ide. I don't know if I can directly compile from the other GUIS. In the other hand, i found atractive codeblocks.

I only want debug and compile the code directly from IDE

Regards and thank you for answer.
Top
DaggyStyle
Watchman
Watchman
User avatar
Posts: 5969
Joined: Wed Mar 22, 2006 6:57 am

  • Quote

Post by DaggyStyle » Thu Aug 30, 2012 3:45 pm

Yczo wrote:Yes, I know that, but is very comfortable compile and execute the programs directly from the Ide. I don't know if I can directly compile from the other GUIS. In the other hand, i found atractive codeblocks.

I only want debug and compile the code directly from IDE

Regards and thank you for answer.
so your real question is why I cannot run codeblocks as normal user/
what is your error msg?
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Top
Yczo
Apprentice
Apprentice
User avatar
Posts: 225
Joined: Sat Jul 09, 2011 9:42 pm

  • Quote

Post by Yczo » Thu Aug 30, 2012 4:44 pm

Ok, the problem is that I'm not alowed to compile with gcc from codeblocks. How can give permissions to my user
for copile with codeblocks using gcc? ...permission to use gcc only with codeblocks.

This is the output:
Compiling: /home/enigma/... /general-delay.c
gcc-config: error: could not run/locate 'gcc'
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
Top
wjb
l33t
l33t
User avatar
Posts: 681
Joined: Sun Jul 10, 2005 9:40 am
Location: Fife, Scotland

  • Quote

Post by wjb » Thu Aug 30, 2012 6:11 pm

Is gcc configured in codeblocks?

Settings -> Compiler and Debugger

What is set up as the selected compiler? "GNU GCC Compiler"? And do the executables listed on the "Toolchain Executables" tab look ok (gcc, g++, etc)
Top
xaviermiller
Bodhisattva
Bodhisattva
User avatar
Posts: 8738
Joined: Fri Jul 23, 2004 6:49 pm
Location: ~Brussels - Belgique
Contact:
Contact xaviermiller
Website

  • Quote

Post by xaviermiller » Thu Aug 30, 2012 6:26 pm

Hello,

As user, you also need to call eselect wxwidgets to select a wxwidgets implementation.
Kind regards,
Xavier Miller
Top
DaggyStyle
Watchman
Watchman
User avatar
Posts: 5969
Joined: Wed Mar 22, 2006 6:57 am

  • Quote

Post by DaggyStyle » Thu Aug 30, 2012 6:27 pm

what is the output of:

Code: Select all

gcc -v
which gcc
gcc-config -l
?
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Top
Yczo
Apprentice
Apprentice
User avatar
Posts: 225
Joined: Sat Jul 09, 2011 9:42 pm

  • Quote

Post by Yczo » Thu Aug 30, 2012 9:43 pm

Hello. In first place, thanks for answer.

Yes, i have gcc selected on system settings from codeblocks

Loged like user I obtained the next results:

$ eselect wxwidgets list
Available wxWidgets profiles:
[1] gtk2-unicode-release-2.8

$ gcc -v
gcc-config: error: could not run/locate 'gcc' //I don't have permisions for use gcc on my user.

$ which gcc
/usr/bin/gcc

$ gcc-config -l
[1] avr-4.4.5 *

[2] x86_64-pc-linux-gnu-4.5.4 *

I don't know how to set permissions to allow at my user the use of gcc. The user does not must have permission for compile and install programs from portage

Regards.
Top
DaggyStyle
Watchman
Watchman
User avatar
Posts: 5969
Joined: Wed Mar 22, 2006 6:57 am

  • Quote

Post by DaggyStyle » Fri Aug 31, 2012 8:21 am

Yczo wrote:Hello. In first place, thanks for answer.

Yes, i have gcc selected on system settings from codeblocks

Loged like user I obtained the next results:

$ eselect wxwidgets list
Available wxWidgets profiles:
[1] gtk2-unicode-release-2.8

$ gcc -v
gcc-config: error: could not run/locate 'gcc' //I don't have permisions for use gcc on my user.

$ which gcc
/usr/bin/gcc

$ gcc-config -l
[1] avr-4.4.5 *

[2] x86_64-pc-linux-gnu-4.5.4 *

I don't know how to set permissions to allow at my user the use of gcc. The user does not must have permission for compile and install programs from portage

Regards.
this isn't codeblocks issue, there is a problem in your system.
run gcc-config 2 and see if the output of gcc -v has changed.
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Top
xaviermiller
Bodhisattva
Bodhisattva
User avatar
Posts: 8738
Joined: Fri Jul 23, 2004 6:49 pm
Location: ~Brussels - Belgique
Contact:
Contact xaviermiller
Website

  • Quote

Post by xaviermiller » Fri Aug 31, 2012 8:32 am

Hello,

You don't have a user profile for wxwidgets.

Please select the profile 1 as user:

Code: Select all

eselect wxwidgets set 1
Kind regards,
Xavier Miller
Top
wjb
l33t
l33t
User avatar
Posts: 681
Joined: Sun Jul 10, 2005 9:40 am
Location: Fife, Scotland

  • Quote

Post by wjb » Sat Sep 01, 2012 8:53 am

Yczo wrote: $ gcc -v
gcc-config: error: could not run/locate 'gcc' //I don't have permisions for use gcc on my user.
I think a question is: why don't you have permissions to use gcc? (despite you appearing to be able to log in as root??)
Top
Yczo
Apprentice
Apprentice
User avatar
Posts: 225
Joined: Sat Jul 09, 2011 9:42 pm

  • Quote

Post by Yczo » Sun Sep 02, 2012 6:44 pm

Ok, I did all your recommendations. I have the next results now

Usando especificaciones internas.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.4/lto-wrapper
Objetivo: x86_64-pc-linux-gnu
Configurado con: /var/tmp/portage/sys-devel/gcc-4.5.4/work/gcc-4.5.4/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.4 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.4/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.4/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --disable-lto --enable-nls --without-included-gettext --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.5.4/python --enable-checking=release --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.5.4 p1.0, pie-0.4.7'
Modelo de hilos: posix
gcc versión 4.5.4 (Gentoo 4.5.4 p1.0, pie-0.4.7)

$ eselect wxwidgets list
Available wxWidgets profiles:
[1] gtk2-unicode-release-2.8 *

but i continue without can buld my programs.

all this was run as root.

if I try to obtain the verbose info of gcc like my user, obtain this

$ gcc -v
gcc-config: error: could not run/locate 'gcc'

$ gcc-config 2
* gcc-config: need write access to /

Must my user be added to a special group? How can give permissions?

Greetings.
Top
DaggyStyle
Watchman
Watchman
User avatar
Posts: 5969
Joined: Wed Mar 22, 2006 6:57 am

  • Quote

Post by DaggyStyle » Sun Sep 02, 2012 7:14 pm

Yczo wrote:Ok, I did all your recommendations. I have the next results now

Usando especificaciones internas.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.4/lto-wrapper
Objetivo: x86_64-pc-linux-gnu
Configurado con: /var/tmp/portage/sys-devel/gcc-4.5.4/work/gcc-4.5.4/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.4 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.4/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.4/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --disable-lto --enable-nls --without-included-gettext --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.5.4/python --enable-checking=release --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.5.4 p1.0, pie-0.4.7'
Modelo de hilos: posix
gcc versión 4.5.4 (Gentoo 4.5.4 p1.0, pie-0.4.7)

$ eselect wxwidgets list
Available wxWidgets profiles:
[1] gtk2-unicode-release-2.8 *

but i continue without can buld my programs.

all this was run as root.

if I try to obtain the verbose info of gcc like my user, obtain this

$ gcc -v
gcc-config: error: could not run/locate 'gcc'

$ gcc-config 2
* gcc-config: need write access to /

Must my user be added to a special group? How can give permissions?

Greetings.
su -c "gcc-config 2"
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Top
Yczo
Apprentice
Apprentice
User avatar
Posts: 225
Joined: Sat Jul 09, 2011 9:42 pm

  • Quote

Post by Yczo » Tue Sep 04, 2012 5:31 pm

No way!

I did it, but continues without want compile like user :(
codeblocks say : gcc-config: error: could not run/locate 'gcc'

But thank you for all your help
Top
DaggyStyle
Watchman
Watchman
User avatar
Posts: 5969
Joined: Wed Mar 22, 2006 6:57 am

  • Quote

Post by DaggyStyle » Tue Sep 04, 2012 5:45 pm

Yczo wrote:No way!

I did it, but continues without want compile like user :(
codeblocks say : gcc-config: error: could not run/locate 'gcc'

But thank you for all your help
what is the output of gcc -v?
also avr-4.4.5 is a cross compiler
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Top
Yczo
Apprentice
Apprentice
User avatar
Posts: 225
Joined: Sat Jul 09, 2011 9:42 pm

  • Quote

Post by Yczo » Tue Sep 04, 2012 6:13 pm

like root, this:

# gcc -v
Usando especificaciones internas.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.4/lto-wrapper
Objetivo: x86_64-pc-linux-gnu
Configurado con: /var/tmp/portage/sys-devel/gcc-4.5.4/work/gcc-4.5.4/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.4 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.4/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.4/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --disable-lto --enable-nls --without-included-gettext --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.5.4/python --enable-checking=release --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.5.4 p1.0, pie-0.4.7'
Modelo de hilos: posix
gcc versión 4.5.4 (Gentoo 4.5.4 p1.0, pie-0.4.7)

like user:

$ gcc -v
gcc-config: error: could not run/locate 'gcc'

salutes.
Top
wjb
l33t
l33t
User avatar
Posts: 681
Joined: Sun Jul 10, 2005 9:40 am
Location: Fife, Scotland

  • Quote

Post by wjb » Tue Sep 04, 2012 6:13 pm

its worth checking the actual permissions

Code: Select all

$ ls -l /usr/bin/gcc
Top
Yczo
Apprentice
Apprentice
User avatar
Posts: 225
Joined: Sat Jul 09, 2011 9:42 pm

  • Quote

Post by Yczo » Tue Sep 04, 2012 6:39 pm

ls -l /usr/bin/gcc
-rwxr-xr-x 1 root root 10384 ago 22 21:54 /usr/bin/gcc

Seems like i have permisions for execute. Humm. when I use codeblocks, I select project, and gcc chosing a directory on my /home/user. Not idea.
Last edited by Yczo on Tue Sep 04, 2012 6:45 pm, edited 1 time in total.
Top
DaggyStyle
Watchman
Watchman
User avatar
Posts: 5969
Joined: Wed Mar 22, 2006 6:57 am

  • Quote

Post by DaggyStyle » Tue Sep 04, 2012 6:45 pm

Yczo wrote:ls -l /usr/bin/gcc
-rwxr-xr-x 1 root root 10384 ago 22 21:54 /usr/bin/gcc
what is the output of groups on your user?
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Top
Yczo
Apprentice
Apprentice
User avatar
Posts: 225
Joined: Sat Jul 09, 2011 9:42 pm

  • Quote

Post by Yczo » Tue Sep 04, 2012 6:49 pm

enigma@minienigma ~ $ groups
tty lp wheel uucp audio cdrom video games cdrw usb android enigma
Top
DaggyStyle
Watchman
Watchman
User avatar
Posts: 5969
Joined: Wed Mar 22, 2006 6:57 am

  • Quote

Post by DaggyStyle » Tue Sep 04, 2012 7:04 pm

add yourself to portage group and try again
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Top
Yczo
Apprentice
Apprentice
User avatar
Posts: 225
Joined: Sat Jul 09, 2011 9:42 pm

  • Quote

Post by Yczo » Tue Sep 04, 2012 7:35 pm

Added, but no luck :(

$ groups
tty lp wheel uucp audio cdrom video games cdrw usb portage android enigma
Top
DaggyStyle
Watchman
Watchman
User avatar
Posts: 5969
Joined: Wed Mar 22, 2006 6:57 am

  • Quote

Post by DaggyStyle » Tue Sep 04, 2012 8:31 pm

Yczo wrote:Added, but no luck :(

$ groups
tty lp wheel uucp audio cdrom video games cdrw usb portage android enigma
ok, what is avr-4.4.5?
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Top
Hu
Administrator
Administrator
Posts: 24392
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Wed Sep 05, 2012 12:49 am

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?
Top
Post Reply

35 posts
  • 1
  • 2
  • Next

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic