Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Stage 1 bootstrap fails in step 6: ncurses c++ error
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
pacosage
n00b
n00b


Joined: 23 Feb 2005
Posts: 4

PostPosted: Wed Feb 23, 2005 7:14 am    Post subject: [SOLVED]Stage 1 bootstrap fails in step 6: ncurses c++ error Reply with quote

I'm having trouble bootstrapping from a stage 1 image. The first five steps of "bootstrap.sh" work fine, but the last stage fails when trying to build ncurses. The main error is:

Code:

cd c++ && make DESTDIR="" all
make[1]: Entering directory `/var/tmp/portage/ncurses-5.4-r5/work/ncurses-5.4/c++'
cd ../obj_s;   -I../c++ -I../include -I. -DHAVE_CONFIG_H -I. -I../include  -D_GNU_SOURCE -DNDEBUG -O2 -mcpu=i686 -fomit-frame-pointer -fPIC -fPIC -c ../c++/cursesf.cc
cd ../obj_s;   -I../c++ -I../include -I. -DHAVE_CONFIG_H -I. -I../include  -D_GNU_SOURCE -DNDEBUG -O2 -mcpu=i686 -fomit-frame-pointer -fPIC -fPIC -c ../c++/cursesm.cc
/bin/sh: line 1: -I../c++: No such file or directory
make[1]: *** [../obj_s/cursesf.o] Error 127
make[1]: *** Waiting for unfinished jobs....
/bin/sh: line 1: -I../c++: No such file or directory
make[1]: *** [../obj_s/cursesm.o] Error 127
make[1]: Leaving directory `/var/tmp/portage/ncurses-5.4-r5/work/ncurses-5.4/c++'
make: *** [all] Error 2
 
!!! ERROR: sys-libs/ncurses-5.4-r5 failed.
!!! Function src_compile, Line 78, Exitcode 2


Looks to me like the problem is that the last couple compile attempts do not specify a compiler, so it's trying to use "-I../c++" as the compiler. I have no clue how to fix this though.

It looks like the problem is the makefile in "/var/tmp/portage/ncurses-5.4-r5/work/ncurses-5.4/c++" is setting the "CXX" option to null, and the broken compile lines use $(CXX) as the compiler. So I tried setting the "CXX" environment variable to "c++" and doing a "bootstrap.sh --resume", but then it pukes really quick with an error that the cpp preprocessor is not valid. Same thing if I set it to "gcc".

Lastly, I've tried to manually edit the "Makefile" in "/var/tmp/portage/ncurses-5.4-r5/work/ncurses-5.4/c++" and then do a make by hand to test it out, but if I set "CXX" to either "c++" or "gcc", it complains the C++ compiler is not installed. And it's right...there is no c++ installed. Shouldn't the earlier steps of bootstrap have done this? gcc is there, but apparently C only, no C++.

Anyway, I'm totally out of ideas... Anyone who can help?

Thanks!

-pacosage


Last edited by pacosage on Sat Feb 26, 2005 1:45 am; edited 1 time in total
Back to top
View user's profile Send private message
kimchi_sg
Advocate
Advocate


Joined: 26 Nov 2004
Posts: 2968

PostPosted: Wed Feb 23, 2005 7:39 am    Post subject: Reply with quote

Code:
export CXX="g++"
Back to top
View user's profile Send private message
pacosage
n00b
n00b


Joined: 23 Feb 2005
Posts: 4

PostPosted: Wed Feb 23, 2005 5:54 pm    Post subject: Reply with quote

Thanks, but I already tried that... It gives me an error that cpp (/lib/cpp) is invalid (or failed check). I took a look, and unless I just can't find it in the normal locations, there's no g++ on my system (yet)...
Back to top
View user's profile Send private message
kimchi_sg
Advocate
Advocate


Joined: 26 Nov 2004
Posts: 2968

PostPosted: Wed Feb 23, 2005 6:19 pm    Post subject: Reply with quote

Can you try (re-)emerging gcc?
Code:
USE="build bootstrap" emerge gcc

Then retry the bootstrap.
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Wed Feb 23, 2005 6:29 pm    Post subject: Reply with quote

kimchi_sg wrote:
Can you try (re-)emerging gcc?
Code:
USE="build bootstrap" emerge gcc

Then retry the bootstrap.

You shouldn't need to do all that... just an emerge --oneshot gcc should fix it. :wink:
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
pacosage
n00b
n00b


Joined: 23 Feb 2005
Posts: 4

PostPosted: Thu Feb 24, 2005 3:13 am    Post subject: Reply with quote

Nope...still same problem. The gcc emerge completes successfully with no errors, but it still is NOT building c++/g++...

This is my first Gentoo install...did I miss some really simple step earlier in the install procedure or something? I did not set the "nocxx" USE flag... I swear - so I'm not sure why it keeps skipping c++.
Back to top
View user's profile Send private message
exosyst
n00b
n00b


Joined: 24 Feb 2005
Posts: 2
Location: Loughborough UK

PostPosted: Thu Feb 24, 2005 7:46 am    Post subject: Reply with quote

I am having the exact same problem:

Quote:

/bin/sh: line 1: -I../c++: No such file or directory
/bin/sh: line 1: -I../c++: No such file or directory
make[1]: *** [../obj_s/cursesf.o] Error 127
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [../obj_s/cursesm.o] Error 127
make[1]: Leaving directory `/var/tmp/portage/ncurses-5.4-r5/work/ncurses-5.4/c++'
make: *** [all] Error 2


Is this a problem thats developed as we both seem to have started our install recently! On a side note, i can't compile GCC as it requires ncurses to be installed! Catch 22 huh?
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Thu Feb 24, 2005 9:07 am    Post subject: Reply with quote

I'm finding quite a few people who are getting this error if they forgot their bootstrap.sh phase - they only did bootstrap.sh -f... I don't know if this applies to you (it doesn't entirely sound like it), but maybe running bootstrap.sh again might fix it?
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
exosyst
n00b
n00b


Joined: 24 Feb 2005
Posts: 2
Location: Loughborough UK

PostPosted: Thu Feb 24, 2005 9:13 am    Post subject: Reply with quote

i 'fixed' it using USE="build bootstrap" emerge ncurses

as after reading through the ebuild it seems that it doesnt use the c++ bindings if you use those tags. Not sure about implications tho! :?
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Thu Feb 24, 2005 2:05 pm    Post subject: Reply with quote

Seems like it's a bug - reported here. From what I can tell, the bootstrap script isn't switching to a compiler with g++ support, so running this should fix it:
Code:
gcc-config 2
source /etc/profile
emerge ncurses

_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
pacosage
n00b
n00b


Joined: 23 Feb 2005
Posts: 4

PostPosted: Fri Feb 25, 2005 4:26 pm    Post subject: Reply with quote

Thanks for all the tips. Here's what I finally found out...

First, I tried doing gcc-config as suggested by Maedhros, but no matter which gcc I select, there is still not c++ compiled for some reason. So I followed the steps listed in the bug report (using the test branch of gcc and libstdc++) and rebootstrapped, but this caused libart_lgpl to fail saying the C preprocessor (cpp) was broken. I managed to get libart_lgpl to build, but then the next package failed too.

So then I went back to the stable branch for gcc/libstdc++ and restrapped, which of course failed on ncurses again. I used exosyst's idea of setting USE to "build bootstrap", and it built ok. However, since c++ was still not built, the "emerge system" blew up in not too long. It complained about one package (I forget which) since groff was not yet built, so I did an "emerge groff"...well, that failed with some other thing missing, so I tried emerging that, then that died with missing Perl. So at that point I gave up.

I eventually went back and commented out my USE option in /etc/make.conf so it would just use all the default flags. I then rebootstrapped and it built with no problem, including the c++ compiler (g++). I then emerged system again, and aside from a few FTP MD5 checksum errors, it worked fine.

So my guess is that one of the USE options I had set is what killed it. My guess is that it's the flag that uses "hardened" mode (don't have the list of flags in front of me at the moment), although I only say that because when I did a "gcc-config -l", the only options listed were a couple of hardened modes. But that may not be related.

Anyway, it's up now, so now that I'm bootstrapped and got the system up I'll probably adjust my USE flags later. But that's after I go configure/compile the kernel, which is always fun, as I recall (although granted I haven't done it since about Slackware 97...).

Anyway, thanks for the help!
Back to top
View user's profile Send private message
kimchi_sg
Advocate
Advocate


Joined: 26 Nov 2004
Posts: 2968

PostPosted: Sat Feb 26, 2005 12:07 am    Post subject: Reply with quote

Please insert [SOLVED] into the title of your first post in this topic.
Back to top
View user's profile Send private message
tlianza
n00b
n00b


Joined: 17 May 2003
Posts: 32
Location: Seattle, WA

PostPosted: Sat Mar 05, 2005 11:29 am    Post subject: Brief summary Reply with quote

This solved a problem for me too. Just to summarize the solution for people in 3 short steps:

1) Change your USE flag to say USE="build bootstrap"
2) emerge ncurses
3) Change your USE flags back

Then continue on emerging...

Thanks,
Tom
Back to top
View user's profile Send private message
Robelix
l33t
l33t


Joined: 21 Jul 2002
Posts: 760
Location: in a World created by a Flying Spaghetti Monster

PostPosted: Wed Mar 16, 2005 5:28 pm    Post subject: Stage 1 bootstrap fails in step 6: ncurses c++ error Reply with quote

None of the above helped me really :x

with the USE="build bootstrap" I'm able to build ncurses - but later, while emerge system it fails on sys-libs/db.

It seems that no c++ compiler was built!?
How do I get it? - How is it possible that gcc is build without?
_________________
mysql> SELECT question FROM life, universe, everything WHERE answer=42;
Empty set (2079460347 sec)
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Wed Mar 16, 2005 5:32 pm    Post subject: Reply with quote

That seems to be a different problem, described here: https://forums.gentoo.org/viewtopic-t-309452.html.

It seems that the toolchain eclass has recently been changed so that it only builds gcc with c, and not with c++ as well.
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
Robelix
l33t
l33t


Joined: 21 Jul 2002
Posts: 760
Location: in a World created by a Flying Spaghetti Monster

PostPosted: Wed Mar 16, 2005 5:52 pm    Post subject: Reply with quote

Thanx for your quick reply - That fixed it!

Robelix
_________________
mysql> SELECT question FROM life, universe, everything WHERE answer=42;
Empty set (2079460347 sec)
Back to top
View user's profile Send private message
abacker
n00b
n00b


Joined: 28 Sep 2004
Posts: 74

PostPosted: Sat Mar 19, 2005 12:53 am    Post subject: Reply with quote

Thanks for all the help in here. Found my way here from another post that referenced this problem.
USE="build bootstrap" emerge ncurses
fixed it for me.

Every time I have a problem I find help here, usually already answered, written by some all-knowing person. Always friendly responses, well written.

As I post this from links2 while attempting my first stage 1, this just makes me smile :)

- Andrew
_________________
under the line
Back to top
View user's profile Send private message
Bob P
Advocate
Advocate


Joined: 20 Oct 2004
Posts: 3355
Location: Jackass! Development Labs

PostPosted: Sat Mar 19, 2005 2:47 am    Post subject: Reply with quote

this thread gives me flashbacks about the "ncurses deathgrip." :evil:
_________________
.
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks
Back to top
View user's profile Send private message
r3i
n00b
n00b


Joined: 26 Dec 2004
Posts: 14
Location: Sorrento

PostPosted: Sun Mar 27, 2005 11:55 pm    Post subject: Reply with quote

I've found another way functional:

I've made a search in the italian forum of "ncurses" I've have found how to solve the problem.
/* link : https://forums.gentoo.org/viewtopic-t-278722-highlight-ncurses.html */

They tells that the problem is the 1stage doesn't have g++.
So you must make this steps after emerge sync:
1) tweek your make.conf as you want
2) emerge --nodeps linux26-headers
3) USE="static"
4) emerge --nodeps gcc
5) run scripts/bootstrap.sh

It runs for a x86 subarchitecture : some problems for amd64 as said in this topic:
https://bugs.gentoo.org/show_bug.cgi?id=77718

I've tried: It works fine :D
_________________
"Anche se ci sforziamo non possiamo mai realizzare la perfezione che c'è nella nostra mente e che noi, a torto, crediamo di 'vedere'"
M.C. Escher
---
"perso non più contatto più niente se tutto cambia in un istante"
Back to top
View user's profile Send private message
fuzzybee
Apprentice
Apprentice


Joined: 09 May 2005
Posts: 159

PostPosted: Mon May 09, 2005 6:37 pm    Post subject: Reply with quote

Maedhros wrote:
That seems to be a different problem, described here: https://forums.gentoo.org/viewtopic-t-309452.html.

It seems that the toolchain eclass has recently been changed so that it only builds gcc with c, and not with c++ as well.


This is continued from here:https://forums.gentoo.org/viewtopic-t-335007.html

I attempted to apply to listed patch, bt it failed:
Quote:
livecd portage # patch -p0 --dry-run < toolchain.diff
patching file eclass/toolchain.eclass
Hunk #1 FAILED at 1942.
1 out of 1 hunk FAILED -- saving rejects to file eclass/toolchain.eclass.rej
livecd portage #


I looked at my toolchain.eclass, and it has the following already:
Quote:
is_cxx() {
gcc-lang-supported 'c++' || return 1
use build && return 1
! use nocxx
}


This is located at lines 1910 - 1914.

What is it that I'm missing here?
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Mon May 09, 2005 7:18 pm    Post subject: Reply with quote

The toolchain problem was a temporary mistake, and was fixed quite a while ago. Have you tried the other solutions in this thread? This seems to have worked for quite a few people:
Code:
USE="build bootstrap" emerge -av --oneshot ncurses

_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
fuzzybee
Apprentice
Apprentice


Joined: 09 May 2005
Posts: 159

PostPosted: Mon May 09, 2005 8:03 pm    Post subject: Reply with quote

Maedhros wrote:
The toolchain problem was a temporary mistake, and was fixed quite a while ago. Have you tried the other solutions in this thread? This seems to have worked for quite a few people:
Code:
USE="build bootstrap" emerge -av --oneshot ncurses


OK - that built that time. I'm trying to bootstrap right now. Thankfully, I have some other work to do in the meantime ;)
Back to top
View user's profile Send private message
CZaukyBoy117
n00b
n00b


Joined: 11 May 2005
Posts: 5
Location: Czech Republic

PostPosted: Thu May 12, 2005 6:43 pm    Post subject: Reply with quote

kimchi_sg wrote:
Can you try (re-)emerging gcc?
Code:
USE="build bootstrap" emerge gcc

Then retry the bootstrap.


I had the same problem. I´ve solved it when i try:
Code:
emerge gcc

It write some next errors, than i type:
Code:
rm /var/tmp/portage -rf

and it was OK. I dont´t know why, but...
_________________
Every time I have a problem I find help here, usually already answered, written by some all-knowing person. Always friendly responses, well written :-) .
Back to top
View user's profile Send private message
CZaukyBoy117
n00b
n00b


Joined: 11 May 2005
Posts: 5
Location: Czech Republic

PostPosted: Thu May 12, 2005 7:56 pm    Post subject: Reply with quote

Maedhros wrote:
I'm finding quite a few people who are getting this error if they forgot their bootstrap.sh phase - they only did bootstrap.sh -f... I don't know if this applies to you (it doesn't entirely sound like it), but maybe running bootstrap.sh again might fix it?


I type bootstrap.sh -f. Becouse I have slow and unstable connection, i musted resume bootstrap and I tryed bootstrap.sh sometimes. Bootstrap is very confused and it thinks, that bootstraping is ended. It can solve
Code:
bootstrap.sh --resume

_________________
Every time I have a problem I find help here, usually already answered, written by some all-knowing person. Always friendly responses, well written :-) .
Back to top
View user's profile Send private message
BVer
n00b
n00b


Joined: 11 Aug 2005
Posts: 7

PostPosted: Fri Aug 12, 2005 10:42 am    Post subject: Reply with quote

Thanks to Maedhros!

Maedhros wrote:
I'm finding quite a few people who are getting this error if they forgot their bootstrap.sh phase - they only did bootstrap.sh -f... I don't know if this applies to you (it doesn't entirely sound like it), but maybe running bootstrap.sh again might fix it?


I can confim that doing only bootstrap.sh -f on 2005.1 leads to "bootstrapped" system where c++ compiler is missing. It is the common cause of compilation problems later when emerging ncurses or python (certainly in https://forums.gentoo.org/viewtopic-p-2641060.html case or perhaps in https://forums.gentoo.org/viewtopic-t-368848.html or maybe in https://forums.gentoo.org/viewtopic-t-369347-highlight-python.html, etc...)

The Gentoo Handbook is somehow ambiguous about the -f flag ... its optional wording in chapter 6.c. can be easily misinterpreted (I have asked myself -- is it correct to run bootstrap.sh twice? So I have run only "-f" variant and finished with the incomplete gcc).

-Pavel
_________________
Laughter and tears are both responses to frustration and exhaustion. I myself prefer to laugh, since there is less cleaning up to do afterward. - K. Vonnegut
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 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