View previous topic :: View next topic |
Author |
Message |
Yczo Apprentice
Joined: 09 Jul 2011 Posts: 225
|
Posted: Thu Aug 30, 2012 1:14 pm Post subject: How can use codeblocks like a normal user? (Can't compile) |
|
|
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 |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5909
|
Posted: Thu Aug 30, 2012 1:46 pm Post subject: Re: How can use codeblocks like a normal user? (Can't compil |
|
|
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 |
|
Back to top |
|
|
Yczo Apprentice
Joined: 09 Jul 2011 Posts: 225
|
Posted: Thu Aug 30, 2012 2:15 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5909
|
Posted: Thu Aug 30, 2012 3:45 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
Yczo Apprentice
Joined: 09 Jul 2011 Posts: 225
|
Posted: Thu Aug 30, 2012 4:44 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
wjb l33t
Joined: 10 Jul 2005 Posts: 608 Location: Fife, Scotland
|
Posted: Thu Aug 30, 2012 6:11 pm Post subject: |
|
|
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) |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8708 Location: ~Brussels - Belgique
|
Posted: Thu Aug 30, 2012 6:26 pm Post subject: |
|
|
Hello,
As user, you also need to call eselect wxwidgets to select a wxwidgets implementation. _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5909
|
Posted: Thu Aug 30, 2012 6:27 pm Post subject: |
|
|
what is the output of:
Code: |
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 |
|
Back to top |
|
|
Yczo Apprentice
Joined: 09 Jul 2011 Posts: 225
|
Posted: Thu Aug 30, 2012 9:43 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5909
|
Posted: Fri Aug 31, 2012 8:21 am Post subject: |
|
|
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 |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8708 Location: ~Brussels - Belgique
|
Posted: Fri Aug 31, 2012 8:32 am Post subject: |
|
|
Hello,
You don't have a user profile for wxwidgets.
Please select the profile 1 as user: Code: | eselect wxwidgets set 1 |
_________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
wjb l33t
Joined: 10 Jul 2005 Posts: 608 Location: Fife, Scotland
|
Posted: Sat Sep 01, 2012 8:53 am Post subject: |
|
|
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??) |
|
Back to top |
|
|
Yczo Apprentice
Joined: 09 Jul 2011 Posts: 225
|
Posted: Sun Sep 02, 2012 6:44 pm Post subject: |
|
|
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=https://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. |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5909
|
Posted: Sun Sep 02, 2012 7:14 pm Post subject: |
|
|
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=https://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 |
|
Back to top |
|
|
Yczo Apprentice
Joined: 09 Jul 2011 Posts: 225
|
Posted: Tue Sep 04, 2012 5:31 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5909
|
Posted: Tue Sep 04, 2012 5:45 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
Yczo Apprentice
Joined: 09 Jul 2011 Posts: 225
|
Posted: Tue Sep 04, 2012 6:13 pm Post subject: |
|
|
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=https://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. |
|
Back to top |
|
|
wjb l33t
Joined: 10 Jul 2005 Posts: 608 Location: Fife, Scotland
|
Posted: Tue Sep 04, 2012 6:13 pm Post subject: |
|
|
its worth checking the actual permissions
Code: |
$ ls -l /usr/bin/gcc
|
|
|
Back to top |
|
|
Yczo Apprentice
Joined: 09 Jul 2011 Posts: 225
|
Posted: Tue Sep 04, 2012 6:39 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5909
|
Posted: Tue Sep 04, 2012 6:45 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
Yczo Apprentice
Joined: 09 Jul 2011 Posts: 225
|
Posted: Tue Sep 04, 2012 6:49 pm Post subject: |
|
|
enigma@minienigma ~ $ groups
tty lp wheel uucp audio cdrom video games cdrw usb android enigma |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5909
|
Posted: Tue Sep 04, 2012 7:04 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
Yczo Apprentice
Joined: 09 Jul 2011 Posts: 225
|
Posted: Tue Sep 04, 2012 7:35 pm Post subject: |
|
|
Added, but no luck
$ groups
tty lp wheel uucp audio cdrom video games cdrw usb portage android enigma |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5909
|
Posted: Tue Sep 04, 2012 8:31 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21633
|
Posted: Wed Sep 05, 2012 12:49 am Post subject: |
|
|
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? |
|
Back to top |
|
|
|