Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Portage fails on C++ preprocessor
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
datrix
n00b
n00b


Joined: 08 Jun 2003
Posts: 26

PostPosted: Sun Oct 19, 2003 3:11 am    Post subject: Portage fails on C++ preprocessor Reply with quote

I'm installing portage (from stage 1) but its failing on ncurses-5.3-r1 with:

Quote:

***merging ncurses***
...
check whether we are using the GNU C++ compiler ...no
...
...
checking for builtin bool type ...no
checking how to run C++ preprocessor ....lib/cpp
configure: error: C++ preprocessor fails sanity check

!!! Error: sys-libs/ncurses-5.3-r1 failed
!!! Function econf, Line 273, Exitcode 1
!!! econf failed



So I tried to get to the bottom of the problem. I typed :
Code:
 
emerge info

Quote:

!!! no gcc found. You probably need to 'source /etc/profile' to update this environment of this terminal ...


I'm running gcc 3.2.2. (confirmed with gcc --version). Updating the environment doesn't help at all.

I also tried something unorthodox by skipping ncurses and emerging sys-libs/db ... but failed with
Quote:

!!! could not run/locate g++


Code:
c++
and
Code:
g++



Result in similar 'error' messege :

Quote:

could no run/locate g++ or c++



It seems that the compilers are giving me problems. Now I'm borKed down, I dont know how to procced and running out of ideas. How can I solve this one.

Thanks
_________________
If you want to learn something profoundly, try fixing it !!
... even if its not broken

-------
n00b
Back to top
View user's profile Send private message
tawtao
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2003
Posts: 116
Location: Baltimore

PostPosted: Sun Oct 19, 2003 3:24 am    Post subject: Reply with quote

Just a guess ... check file,
/etc/make.conf

You might have to emerge gcc again. :)
Back to top
View user's profile Send private message
datrix
n00b
n00b


Joined: 08 Jun 2003
Posts: 26

PostPosted: Sun Oct 19, 2003 4:04 am    Post subject: Reply with quote

Thanks for reply,

Quote:

Just a guess ... check file,
/etc/make.conf

what should I check exactly; I'm using the (default) values in make.globals coz i'm still merging portage - and according to the installation guide I haven't got to the stage of using make.conf.

I'm in a chicken-and-egg problem coz, I need to first install ncurse and textinfo before I can install gcc (But I cant go thru ncurses 8O )
Quote:


calculating dependences ... done!
[ebuild N ] sys-libs/ncurses-5.3-r1
[ebuild N ] sys-apps/textinfo-4.5
[ebuild U ] sys-devel/gcc-3.2.3-r2 [3.2.2]




... its getting tricky :wink:
_________________
If you want to learn something profoundly, try fixing it !!
... even if its not broken

-------
n00b
Back to top
View user's profile Send private message
tawtao
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2003
Posts: 116
Location: Baltimore

PostPosted: Sun Oct 19, 2003 4:34 am    Post subject: Reply with quote

Yap ... you right. :D

I did extract stage1 tar ball and chroot to that directory. After env-update, I type in g++ and get the same error message.

So ... just check, did you do the following command?

Code:

cd /usr/portage
scripts/bootstrap.sh


According to gentoo installation guid, "bootstrap.sh will build binutils, gcc, gettext, and glibc, rebuilding gettext after glibc."

You said, you are using values from make.globals? You did not means that you copy file make.globals over make.conf. The only adjustment I did on the default make.conf is change i486 to i686. Oh ... you can not use "~x86" in ACCEPT_KEYWORDS for the stage1.

Well ... after that, I have no idea. :P
Back to top
View user's profile Send private message
DrkPlague
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jun 2003
Posts: 107

PostPosted: Sun Oct 19, 2003 8:17 am    Post subject: Reply with quote

try
Code:
#env-update
#source /etc/profile

it might be as simple as you lost your enviroment variables. these would put them back.
_________________
DKP

There are 10 kinds of people in the world:
Those who understand binary and those who don't...
Back to top
View user's profile Send private message
datrix
n00b
n00b


Joined: 08 Jun 2003
Posts: 26

PostPosted: Sun Oct 19, 2003 6:05 pm    Post subject: Reply with quote

Thanks DrkPlague and twatao:

Apparently my problem was related to portage. A
Code:
scripts/bootstrap.sh

solved my problems. I downloaded the latest version of portage FIRST and then continued with the rest of package (ncurse, textinfo etc). But 'emerge portage' is the opposite of that. It first merges dependences before merging portage

I thought I understood this thing ... coz the guide says you are to install portage before 'bootstraping' - which is what I was doing without success

Thanks :wink:
_________________
If you want to learn something profoundly, try fixing it !!
... even if its not broken

-------
n00b
Back to top
View user's profile Send private message
Klavs
Guru
Guru


Joined: 22 May 2002
Posts: 536
Location: Denmark

PostPosted: Mon Nov 10, 2003 8:50 pm    Post subject: Reply with quote

I just had this same problem, but found a quicker solution - and the reason why it came to be.

I found that it complained about /lib/cpp - which is owned by gcc-config, so I tried to recompile that, but couldn't, as it complained about some include problems.

I had earlier had to move /usr/include/linux dir to /usr/include/linux.orig, and symlink to my /usr/src/linux/include/linux directory to get alsa-driver to compile (it needed modversions.h), and after doing this alsa-driver compiled.
When I undid this last change, and recompiled gcc-config it all worked fine again.

Hope this helps someone :)
_________________
Best regards,

Klavs Klavsen
Denmark

Working with Unix is like wrestling a worthy opponent.
Working with windows is like attacking a small whining child
who is carrying a .38.
Back to top
View user's profile Send private message
lcj
Tux's lil' helper
Tux's lil' helper


Joined: 25 Apr 2004
Posts: 82
Location: Opole, Poland

PostPosted: Thu Aug 12, 2004 8:51 am    Post subject: don't fiddle with linux-headers Reply with quote

I had exactly the same /bin/cpp problem after I did emerge linux-headers-2.6.99. Downgrading to 2.4.26 helped.
_________________
--
Lukasz C. Jokiel via web
Back to top
View user's profile Send private message
andrewski
Guru
Guru


Joined: 30 Apr 2004
Posts: 366
Location: Royersford, PA, USA

PostPosted: Tue Sep 07, 2004 12:45 pm    Post subject: Re: don't fiddle with linux-headers Reply with quote

lcj wrote:
I had exactly the same /bin/cpp problem after I did emerge linux-headers-2.6.99. Downgrading to 2.4.26 helped.
Same here, though for me, it was not downgrading; I didn't have any linux-headers on my system.

Edit: "it not" to "it was not"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
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