Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emerge system fails
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
salukibob
n00b
n00b


Joined: 24 Sep 2002
Posts: 9
Location: UK

PostPosted: Tue Sep 24, 2002 8:32 am    Post subject: emerge system fails Reply with quote

Hi,

I'm a first time installer, and had no problems until the stage2-stage3 'emerge system' part. It failed whilst compiling groff-1.17.2-r2 with the gcc errors -

device.cc:23:18 defs.h: No such file or directory
device.cc:25: 'DEVICE' was not declared in this scope

Make has Error 2

So, I tried 'emerge system' again, just to see if it would report on the situation, and I got this error message -

Traceback (most recent call list):
File "/usr/bin/emerge", line 5, in ?
if (not sys.stdout.isatty()) or (portage.settings["NOCOLOR"] in ["yes", "true"]):

AttributeError: 'module' object has no attribute 'settings'

So basically, does anyone know why I wouldn't have the defs.h header file, and how I might fix this problem?

Cheers
salukibob
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Tue Sep 24, 2002 9:21 am    Post subject: Reply with quote

Welcome to the forums.

Could you tell us what CPU you're using, and what CFLAGS you have chosen? Were there any other errors before, trying to make defs.h? defs.h is generated by the Makefile in the src/include subdirectory of the groff build, as it appears to me.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
salukibob
n00b
n00b


Joined: 24 Sep 2002
Posts: 9
Location: UK

PostPosted: Tue Sep 24, 2002 10:24 am    Post subject: Reply with quote

Well, the CPU i'm using is a Celeron 533A overclocked to 600Mhz, but has always been stable, so no probs there hopefully.
I am however being somewhat ambitious with my CFLAGS using:-
-09 -march=pentiumpro -mcpu=pentiumpro -funroll-loops -ffast-math -malign-doubles -fomit-frame-pointers -fno-exceptions

Is this likely to be my problem? I see in the FAQ's they suggest the maximum optimisation to use -03. If I change my CFLAGS to be more realistic, will I have to go through all of stage 1 again, to recompile all of GCC, Glibc, etc.

Thanks
salukibob
Back to top
View user's profile Send private message
salukibob
n00b
n00b


Joined: 24 Sep 2002
Posts: 9
Location: UK

PostPosted: Tue Sep 24, 2002 10:25 am    Post subject: Reply with quote

Ow, sorry, forgot to say - there has been no other erros with defs.h at all from any other compiles.
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Tue Sep 24, 2002 10:43 am    Post subject: Reply with quote

Just to make sure that I disclose my bias up front, especially because people sometimes make the mistake of assigning too much weight to the fact that it says "Moderator" over there above my avatar: I am probably one of the more conservative participants on the forums, when it comes to overclocking, aggressive compiler flag settings, and the like. I value stability over speed hands down. A computer that locks up 10% faster than before does not interest me.

OK, with that disclaimer out of the way, I don't recommend overclocking when running Gentoo. I really don't recommend overclocking when installing Gentoo, or emerging new software. Compiling software (especially large complex programs like GCC itself) is extremely hard work, and exposes hardware unreliability that might otherwise go unnoticed.

Your CFLAGS are definitely REDFLAGS to me, also. With a CPU of that speed, I can't in good faith really recommend that you re-bootstrap your toolchain, until you have some other serious compilation problems, because it would really cost you a lot of time. For the time being, could you please just back off to "-O3 -march=pentiumpro -pipe" for a bit, until we get your system into a functional state? BTW, specifying both -march and -mcpu is redundant.

defs.h is specific to groff - it would not necessarily be present in other software. I went through the groff source specifically to try to find how defs.h was being built to be able to answer your question - it wasn't a general comment.

With CFLAGS at "-O3 -march=pentiumpro -pipe" (and CPU clocked back down, if problems persist), can you try just emerging groff again and see if you get the same error?
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
salukibob
n00b
n00b


Joined: 24 Sep 2002
Posts: 9
Location: UK

PostPosted: Tue Sep 24, 2002 3:48 pm    Post subject: Reply with quote

Hi,

Unfortuanately, I can't even emerge groff again. I changed the CFLAGS as you suggested, and then tried to 'emerge groff-1.17.2-r2' with same result as last time I tried 'emerge system' giving this output: -

Trackback (most recent cal list):
File "/usr/bin/emerge", line 5, in ?
if (not sys.stdout.isatty()) or (portage.settings["NOCOLOR"] in ["yes", "true"]):
AttributeError: 'module' object has no attribute 'settings'

This doesn't really mean much to me. Any ideas how this might be fixed?

Thanks
salukibob
Back to top
View user's profile Send private message
progster
Apprentice
Apprentice


Joined: 16 Jul 2002
Posts: 271

PostPosted: Tue Sep 24, 2002 4:36 pm    Post subject: Reply with quote

I had the same problem some time ago, it's a problem with your make.conf file.
In my case I uncommented a comment.... so maybe it's best to check your make.conf file again on syntax errors.

~Progster

edit:typo


Last edited by progster on Tue Sep 24, 2002 7:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Tue Sep 24, 2002 7:18 pm    Post subject: Reply with quote

Thanks, Progster. One other thing if you're using nano is to make sure to edit make.conf with the "-w" option, to avoid it wrapping lines on you.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
salukibob
n00b
n00b


Joined: 24 Sep 2002
Posts: 9
Location: UK

PostPosted: Wed Sep 25, 2002 12:43 pm    Post subject: Reply with quote

Tha saga continues.....

Firstly, thanks for the advice so far. Its nice to know theres people out there who will help.

Anyway, i'm still stuck with the same problem. Heres what I did: -

Tried to just emerge groff again, and got the Trackback error message. So I checked the syntax of my make.conf file as progster suggested(making sure of using the -w switch) and still I get the same error message. This was after changing the optimisations to be '-march=pentiumpro -O3 -pipe'.
So I was stumped at this point, so as I have free time this week, I decided to start all over again, but this time using the '-march=pentiumpro -O3 -pipe' optimisations from the start. The install progressed without a problem, right up until (yes, you guessed it), the groff compilation. Make exited on exactly the same problem:

device.cc:23:18 defs.h: No such file or directory
device.cc:25: 'DEVICE' was not declared in this scope

Make has Error 2

So again, I tried 'emerge groff', and got the same Traceback error. Before this point, I had not had any problems with emerge, so conclude it can't be a syntax error in make.conf. Does this indicate that while make is running, it uses some files that emerge uses, and when make exits on an error, maybe it doesn't close these files properly? I don't know, but there seems to be some problem there.

Anyway, anymore ideas on what might be the def.h problem?

Thanks again
salukibob

p.s. If i manage to get emerge to work again, is there anyway I can skip the groff installation in 'emerge system', and come back to that later, once the whole system is setup?
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Wed Sep 25, 2002 4:14 pm    Post subject: Reply with quote

You should be able to use emerge's inject option to make the system think groff is installed.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
salukibob
n00b
n00b


Joined: 24 Sep 2002
Posts: 9
Location: UK

PostPosted: Wed Sep 25, 2002 5:43 pm    Post subject: Reply with quote

Thanks for that tip, but unfortuantly I still can't use it because emerge won't run properly.

So I thought i'd have a quick look at the source of emerge. The error message was: -

Traceback (most recent call list):
File "/usr/bin/emerge", line 5, in ?
if (not sys.stdout.isatty()) or (portage.settings["NOCOLOR"] in ["yes", "true"]):
AttributeError: 'module' object has no attribute 'settings'

and so I commented the if statement out, to see what would happen, and then ran emerge again (just tried emerge --help). This time, I got much the same type off error message, just with the module not having another attribute (can't off hand remember what it was, but was on line 256 I think). So I conclude that the emerge script isn't importing the portage.py file properly, or portage.py is somehow corrupt. At this point I looked into the search path of python to see where it looks for the modules, and found the environment varibale PYTHONPATH to be empty. Should this be??

I'm wondering if somewhere along the way of the 'emerge system', something might have overwritten this environment variable, and so cause emerge (or any other program that uses PYTHONPATH) to fail.

Perhaps someone could tell me what PYTHONPATH should be, so I can set it, or if i'm on completely the wrong track here.

Thanks,
salukibob
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Wed Sep 25, 2002 5:51 pm    Post subject: Reply with quote

Which version of portage are you running? (emerge -V)
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
salukibob
n00b
n00b


Joined: 24 Sep 2002
Posts: 9
Location: UK

PostPosted: Wed Sep 25, 2002 6:18 pm    Post subject: Reply with quote

portage version is 2.0.37

I tried putting /usr/lib/python2.2/site-packages/ in the PYTHONPATH variable, just to see if it would work, but it didn't. Didn't expect it to, but thought it was worth a try.

salukibob

p.s. btw had to find the portage.py to get the version, as emerge won't work at all. It dies after line 5.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Wed Sep 25, 2002 6:28 pm    Post subject: Reply with quote

I'd take a look at /usr/portage/sys-apps/portage/files/README.RESCUE
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Wed Sep 25, 2002 6:36 pm    Post subject: Reply with quote

'which python' does return /usr/bin/python, correct?
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
salukibob
n00b
n00b


Joined: 24 Sep 2002
Posts: 9
Location: UK

PostPosted: Wed Sep 25, 2002 7:11 pm    Post subject: Reply with quote

well 'which python' won't work because 'which' isn't installed yet. My problems started during the install process of 'emerge system', and hadn't got to 'which' yet when the compilation of groff crashed out. I'm just trying to get emerge to work so I can install the rest of the base system without groff.

Anyway, tried the portage rescue, and still got an error. BUT.... it was a different error, so progress is being made!

The error was:

Traceback (most recent call list):
File "/usr/bin/emerge", line 2, in ?
import os, sys, portage, xpak, string, re, command, time, threading, grp
File "/usr/lib/python2.2/site-packages/portage.py", line 10, in ?
import string, os, types, sys, shlex, shutil, xpak, fcntl, signal, time, missingos
ImportError: dynamic module does not define init function (initfcntl)

I'd be happy to just reinstall, but the same problem occurs with groff, and then that seems to mangle portage.

salukibob
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
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