Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gcc setup [SOLVED]
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6  Next  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 9172
Location: Somewhere over Atlanta, Georgia

PostPosted: Mon Jan 09, 2017 12:34 am    Post subject: Reply with quote

And the 3rd one (which I added later)?

Edit: And one more:
Code:
/usr/bin/emerge
- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
pakk
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2016
Posts: 143

PostPosted: Mon Jan 09, 2017 12:27 pm    Post subject: Reply with quote

HELLO

Code:
# echo $USER $UID
root 0


Code:
# /usr/bin/emerge
bash: /usr/bin/emerge: Aucun fichier ou dossier de ce type
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 9172
Location: Somewhere over Atlanta, Georgia

PostPosted: Mon Jan 09, 2017 10:13 pm    Post subject: Reply with quote

Did you happen to --unmerge Portage, too? Or try to do something manual with Portage?

Another forensic command to try to see what works:
Code:
ls -l {/usr,}/bin/nano
We'll start fixing thing soon. Promise.

pakk wrote:
if it's too complicated, I will reinstall gentoo from scratch with live cd
That's up to you, but we've only really been troubleshooting for like 10 minutes. It just seems longer because it's not in real time.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
pakk
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2016
Posts: 143

PostPosted: Mon Jan 09, 2017 11:11 pm    Post subject: Reply with quote

John R. Graham wrote:
Did you happen to --unmerge Portage, too? Or try to do something manual with Portage?

Another forensic command to try to see what works:
Code:
ls -l {/usr,}/bin/nano
We'll start fixing thing soon. Promise.

pakk wrote:
if it's too complicated, I will reinstall gentoo from scratch with live cd
That's up to you, but we've only really been troubleshooting for like 10 minutes. It just seems longer because it's not in real time.

- John


Code:
# ls -l {/usr,}/bin/nano
ls: impossible d'accéder à '/usr/bin/nano': Aucun fichier ou dossier de ce type
ls: impossible d'accéder à '/bin/nano': Aucun fichier ou dossier de ce type


plus
Code:
# crda
COUNTRY environment variable not set.


i cant remember if I removed gcc dependencies or removed libraries after unmerged gcc

if I dont waste your time, we can keep on.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 9172
Location: Somewhere over Atlanta, Georgia

PostPosted: Tue Jan 10, 2017 6:48 pm    Post subject: Reply with quote

So here's what we determined:
  • gcc is broken because you un-merged it. gcc-config was also missing for an as yet undiagnosed reason.
  • Portage is broken for an as yet undiagnosed reason.
  • Some members of the @system set are missing (perhaps; we'll get to that later).

One last forensic command before we start fixing things. Let's see what version of Portage you have installed:
Code:
ls -d /var/db/pkg/sys-apps/portage*
- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
pakk
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2016
Posts: 143

PostPosted: Tue Jan 10, 2017 7:08 pm    Post subject: Reply with quote

John R. Graham wrote:
So here's what we determined:
  • gcc is broken because you un-merged it. gcc-config was also missing for an as yet undiagnosed reason.
  • Portage is broken for an as yet undiagnosed reason.
  • Some members of the @system set are missing (perhaps; we'll get to that later).

One last forensic command before we start fixing things. Let's see what version of Portage you have installed:
Code:
ls -d /var/db/pkg/sys-apps/portage*
- John


Code:
2.3.0
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 9172
Location: Somewhere over Atlanta, Georgia

PostPosted: Tue Jan 10, 2017 7:19 pm    Post subject: Reply with quote

Okay, let's fix Portage first. Get the portage binpackage from here: http://packages.gentooexperimental.org/packages/amd64-stable/sys-apps/portage-2.3.0.tbz2 and put it in your root directory. Extract it just like you did for gcc and gcc-config:
Code:
tar -xjpf portage-2.3.0.tbz2 -C /
and report the results of that. Then you might want to try:
Code:
emerge --version
just to see if it will at least launch.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
artbody
Guru
Guru


Joined: 15 Sep 2006
Posts: 361
Location: LB

PostPosted: Wed Jan 11, 2017 8:55 am    Post subject: Reply with quote

Hy John

I think this is such a good way to solve problems like distroyed gcc ..
that it should find a way in the wiki gcc troubleshooting

10 Years ago I had the same problem
since 1994 i was a Suse, RedHat, Mandrake user. I was not realy confirmed with Gentoo so some times earlier i learned
Blocking packages: emerge --unmerge this-blocking-package and reemerge (the wrong way) (sometimes this works )
at one Update gcc and some others are in the blocking List
i unmerged these blockers (gcc .. ) :oops: and wanted to install the update version- :roll: doesn't work any more ... :lol:
now a days i know how to fix such blocking packages.
search the reason :wink:


there was no one like you explaining me how to fix
so i started from stage3 again

my very big respect to you :D

today I learned a lot only by reading

special thx
_________________
Samsung 245B 1920x1200 GeForce GT710
4.4.26-gentoo #1 SMP Fri Dec 16 20:40:58 CET 2016 x86_64 AMD FX(tm)-8350 Eight-Core Processor AuthenticAMD GNU/Linux
achim
Back to top
View user's profile Send private message
pakk
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2016
Posts: 143

PostPosted: Wed Jan 11, 2017 2:56 pm    Post subject: Reply with quote

good, if that thread could help others

Code:
~ # tar -xjpf portage-2.3.0.tbz2 -C /

bzip2: (stdin): trailing garbage after EOF ignored


Code:
~ # emerge --version
bash: emerge : commande introuvable
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 9172
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Jan 11, 2017 3:20 pm    Post subject: Reply with quote

Oh, lord. python-exec is missing. I missed that: portage may not have been missing after all. In any case, same procedure. Run
Code:
ls -d /var/db/pkg/dev-lang/python-exec*
to find out which version of python-exec you have installed. It's probably 2.0.2. In any case, browse to http://packages.gentooexperimental.org/packages/amd64-stable/dev-lang/ and retrieve the correct version. Unpack it just like you did for the portage tarball. Report the commands you used, please.

After that, try
Code:
emerge --version
again.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
artbody
Guru
Guru


Joined: 15 Sep 2006
Posts: 361
Location: LB

PostPosted: Wed Jan 11, 2017 3:28 pm    Post subject: Reply with quote

can you give us the output of
Code:
ls -al /usr

_________________
Samsung 245B 1920x1200 GeForce GT710
4.4.26-gentoo #1 SMP Fri Dec 16 20:40:58 CET 2016 x86_64 AMD FX(tm)-8350 Eight-Core Processor AuthenticAMD GNU/Linux
achim
Back to top
View user's profile Send private message
pakk
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2016
Posts: 143

PostPosted: Wed Jan 11, 2017 4:35 pm    Post subject: Reply with quote

John:
looks better now

Code:
~ # emerge --version
!!! No gcc found. You probably need to 'source /etc/profile'
!!! to update the environment of this terminal and possibly
!!! other terminals also.
Portage 2.3.0 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop, [unavailable], glibc-2.22-r4, 4.4.26-gentoo x86_64)


in fact: gcc tarball is in / and python and portage are in /root. maybe i have to untar in root ?

artbody:
Code:
ls -al /usr
total 136
drwxr-xr-x  15 root    root     4096 28 oct 06:25 .
drwxr-xr-x  21 root    root     4096 28 oct 06:25 ..
drwxr-xr-x   2 root    root    36864 28 oct 06:26 bin
drwxr-xr-x   3 root    root     4096 24 nov 18:42 etc
drwxr-xr-x 113 root    root    12288 23 déc 10:54 include
drwxr-xr-x   5 root    root     4096 28 oct 06:25 lib
drwxr-xr-x   5 root    root     4096 17 nov 05:07 lib32
drwxr-xr-x  48 root    root    36864 28 oct 06:26 lib64
drwxr-xr-x   6 root    root     4096  6 avr  2014 libexec
drwxr-xr-x   6 root    root     4096 25 nov 17:57 local
drwxr-xr-x 172 portage portage  4096 23 déc 18:33 portage
drwxr-xr-x   2 root    root     4096 28 oct 06:26 sbin
drwxr-xr-x  90 root    root     4096 28 oct 06:25 share
drwxr-xr-x   3 root    root     4096 24 nov 16:49 src
lrwxrwxrwx   1 root    root        8 17 nov 02:30 tmp -> /var/tmp
drwxr-xr-x   6 root    root     4096  6 avr  2014 x86_64-pc-linux-gnu
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 9172
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Jan 11, 2017 4:46 pm    Post subject: Reply with quote

We'll deal with gcc next. This is very good news: Portage is working! Woot! :D

I'm tied up at work for the next couple of hours but expect a reply on the next step soon.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
pakk
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2016
Posts: 143

PostPosted: Wed Jan 11, 2017 4:48 pm    Post subject: Reply with quote

John R. Graham wrote:
We'll deal with gcc next. This is very good news: Portage is working! Woot! :D

I'm tied up at work for the next couple of hours but expect a reply on the next step soon.

- John


thanks a lot, relax, I got a big flu, so i have time for reading linux books you adviced
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 9172
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Jan 11, 2017 4:57 pm    Post subject: Reply with quote

pakk wrote:
in fact: gcc tarball is in / and python and portage are in /root. maybe i have to untar in root ?
No, that's not necessary. Homework: read the tar man page to see what -C does. ;)

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
pakk
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2016
Posts: 143

PostPosted: Wed Jan 11, 2017 5:05 pm    Post subject: Reply with quote

John R. Graham wrote:
pakk wrote:
in fact: gcc tarball is in / and python and portage are in /root. maybe i have to untar in root ?
No, that's not necessary. Homework: read the tar man page to see what -C does. ;)

- John


- C directory
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 37369
Location: 56N 3W

PostPosted: Wed Jan 11, 2017 5:09 pm    Post subject: Reply with quote

pakk,

Well done for sticking with it. I'm pleased you are still here.

What does
Code:
gcc-config -l
show?
If its lists one ore more gccs but says none are active, activate one with
Code:
gcc-config 1


Follow the on screen instructions to update your environment.
If all is well
Code:
gcc -v
will return a lot of information about gcc.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
pakk
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2016
Posts: 143

PostPosted: Wed Jan 11, 2017 5:23 pm    Post subject: Reply with quote

neddy:

Code:
 # gcc-config -l
 * gcc-config: Active gcc profile is invalid!

 [1] x86_64-pc-linux-gnu-4.7.3
 [2] x86_64-pc-linux-gnu-4.8.3


Code:
# gcc -v
 * gcc-config: Active gcc profile is invalid!
gcc-config: error: could not run/locate 'gcc'
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 37369
Location: 56N 3W

PostPosted: Wed Jan 11, 2017 6:11 pm    Post subject: Reply with quote

pakk,

Good. You have two different gccs installed but neither is selected.

Code:
gcc-config 2
will choose
Code:
[2] x86_64-pc-linux-gnu-4.8.3

It will also give some instructions about a command you must run.
Run that command.

Then
Code:
gcc -v
will work.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 9172
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Jan 11, 2017 8:53 pm    Post subject: Reply with quote

pakk wrote:
John R. Graham wrote:
pakk wrote:
in fact: gcc tarball is in / and python and portage are in /root. maybe i have to untar in root ?
No, that's not necessary. Homework: read the tar man page to see what -C does. ;)

- John

- C directory
Yes, that's the syntax of the option, but do you know what it does? That's the homework assignment: learning what it does.

Just in case you're waiting on advice from me, I wanted to let you know that NeddySeagoon's advice is (as usual) spot on. Go ahead & do what he advises & let us know what happens.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
pakk
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2016
Posts: 143

PostPosted: Wed Jan 11, 2017 10:28 pm    Post subject: Reply with quote

1.
Code:
# gcc -v
Utilisation des specs internes.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.3/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.3/lto-wrapper
Target: x86_64-pc-linux-gnu
Configuré avec: /var/tmp/portage/sys-devel/gcc-4.8.3/work/gcc-4.8.3/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.3 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.3/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/g++-v4 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.3/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.8.3 p1.1, pie-0.5.9' --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --enable-lto --without-cloog --enable-libsanitizer
Modèle de thread: posix
gcc version 4.8.3 (Gentoo 4.8.3 p1.1, pie-0.5.9)

2. i tried to launch glances but it failed
2.1
Code:
 # glances
/usr/bin/glances: no supported Python implementation variant found!
h4ck pak # emerge -avq glances

Code:
emerge -avq glances
[ebuild   R   ] sys-process/glances-2.6.1  USE="-doc" PYTHON_TARGETS="python2_7 python3_4 -python3_5"

3. so I reinstalled and it worked cos it uses python, not C compiler. I cant install nano due to lack of symlink, for minix I remember somethin like ln /usr/bin /usr/bin/gcc
Code:
checking whether the C compiler works... no
configure: error: in `/var/tmp/portage/app-editors/nano-2.5.3/work/nano-2.5.3':
configure: error: C compiler cannot create executables
See `config.log' for more details

Code:
ln -s /usr/bin/gcc /usr/bin/cc
ln: impossible de créer le lien symbolique '/usr/bin/cc': Le fichier existe

assignement: man says:
Code:
-C, --directory=DIR
              Change to DIR before  performing  any  operations.   This
              option  is  order-sensitive,  i.e. it affects all options
              that follow.


it means: go to DIR for instance /, then untar archive.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 9172
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Jan 11, 2017 10:37 pm    Post subject: Reply with quote

I think you probably do actually have a gcc that Portage would be happy with now, if you were running with an up-to-date environment. Let's check. What does
Code:
env-update
source /etc/profile
emerge --version
say now?

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
pakk
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2016
Posts: 143

PostPosted: Wed Jan 11, 2017 11:11 pm    Post subject: Reply with quote

John R. Graham wrote:
I think you probably do actually have a gcc that Portage would be happy with now, if you were running with an up-to-date environment. Let's check. What does
Code:
env-update
source /etc/profile
emerge --version
say now?

- John


Code:
#env-update
>>> Regenerating /etc/ld.so.cache...


Code:
# emerge --version
Portage 2.3.0 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop, gcc-4.8.3, glibc-2.22-r4, 4.4.26-gentoo x86_64)


Code:
# gcc-config -l
 [1] x86_64-pc-linux-gnu-4.7.3
 [2] x86_64-pc-linux-gnu-4.8.3 *
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 9172
Location: Somewhere over Atlanta, Georgia

PostPosted: Thu Jan 12, 2017 12:59 am    Post subject: Reply with quote

Try emerging nano again. Not sure what you were trying to accomplish with the -avq options before, though, as -v is "verbose" and -q is "quiet". Which did you want: verbose or quiet? As a new homework assignment, read up on the emerge --oneshot option, short form -1 (which is a numeral one, not the letter L). I'll explain further later. Try:
Code:
emerge -1v nano
If that works, then great. Otherwise, show me your CFLAGS:
Code:
grep CFLAGS /etc/portage/make.conf
That's just the first of a lot of different mostly subtle things that can cause this symptom.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
pakk
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2016
Posts: 143

PostPosted: Thu Jan 12, 2017 8:10 am    Post subject: Reply with quote

Code:
# grep CFLAGS /etc/portage/make.conf
CFLAGS="-O2 -pipe"
CXXFLAGS="${CFLAGS}


I followed tutorial on youtube, it always used emerge -avq

what I dont get, I used to install nano, symlink seems to be dead.
and i wanted to check emerge
also eix doesnt launch

Code:
# eix
eix: /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by eix)
eix: /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by eix)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 4 of 6

 
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