Bottom line, I rebuild my kernel and, consequently, re-emerged my nvidia-drivers package only to find that I kept getting the following error:
!!! Invalid token (not "=") Unable
Traceback (most recent call last):
File "/usr/bin/emerge", line 4049, in ?
File "/usr/bin/emerge", line 3768, in emerge_main
settings, trees, mtimedb = load_emerge_config()
File "/usr/bin/emerge", line 3679, in load_emerge_config
trees = portage.create_trees(trees=trees, **kwargs)
File "/usr/lib/portage/pym/portage.py", line 6780, in create_trees
File "/usr/lib/portage/pym/portage.py", line 1045, in __init__
env_d = getconfig(
File "/usr/lib/portage/pym/portage_util.py", line 283, in getconfig
raise portage_exception.ParseError(str(e)+" in "+mycfg)
portage_exception.ParseError: "ParseError: Invalid token (not '='): /etc/profile.env: line 39 in /etc/profile.env"
After getting this error, if I try to emerge ANYTHING I get the error again (Immediately). A search through the forums revealed that running env-update.sh (NOT env-update) would fix the problem and I can emerge things again. After tinkering around with emerging nvidia-drivers (which continually result with this error problem) and re-emerging eselect, I realized that the problem can be recreated by either:
a) Emerging nvidia-drivers (the error comes up right after the 'Switching to xorg-x11 OpenGL interface' line (meaning right after the eselect command)
b) Running eselect opengl set nvidia
This is on my amd64 system with:
app-admin/eselect-1.0.2 USE="bash-completion doc"
Downgrading to nvidia-drivers-1.0.8762-r1 results with the same problem. As a side note, the reason I have to run env-update.sh INSTEAD OF env-update is that env-update will results with the error above while env-update.sh will not. I will post my emerge --info as an attachment (as to not make this post any longer) Also, I am using gentoo-sources-2.6.16-r8 but will try upgrading (doing it now) to 2.6.17-gentoo-r8 and will post if any change is discovered.
Created attachment 99171 [details]
Post the contents of /etc/env.d/03opengl and eselect-opengl version.
# Configuration file for eselect
# This file has been automatically generated.
app-admin/eselect-1.0.2 USE="bash-completion doc"
You still didn't post eselect-opengl version.
emerge -pv eselect-opengl
And I don't see anything wrong with the above file. What's in /etc/profile.env line 39?
My apologies, I didn't realize that there was a separate ebuild for opengl. Here's that info:
Interestingly, there IS no line 39. It stops at 37. Maybe I have a corrupt profile.env then? I'll attach a copy of it to this bug.
Created attachment 99218 [details]
Eh, I don't see anything obviously wrong there. You still have the problem with the above profile.env?
Still do. Whats more is that something with my portage isn't being updated because whenever I emerge anything, emerge reads that I have an old version of nvidia-drivers which need to be unmerged, which it tries to do until it gets to selecting the new driver and I'm then thrown into this catch 22 again. Now, I had gotten this problem after doing two things. First: rebuilding my kernel (is there anything there that could be causing a conflict?) Secondly, after updating my system. (I don't think that eselect, eselect-opengl or nvidia-drivers were updated here, but where could I check this?)
Ok. I don't know if this will set any alarms off or not, but about a month ago I gave XGL a try and wasn't very pleased with the effort I had to go through to get games to run properly so I haven't used it since (I don't use it now, but it is installed) With that said, I restarted my computer a while ago and got this error:
export: 'cgwd:=': not a valid identifier
/etc/profile.env: line 39: syntax error near unexpected token 'Unable='''
cgwd being the window manager I was using for XGL. Might this be connected even it I'm not currently using it?
Indeed, looks like you've found it. XGL has left some cruft behind itself. Find the files and delete them.
I have proceeded to remove all of xgl and cgwd from my computer (compiz remains, but I haven't seen any errors that indicate that compiz may be a problem). I have rebooted and restarted X several times with no luck. I have searched through the forums and through the web. I was able to fix the problem, although I don't know if I fixed it directly or as a consequence of. I first removed eselect-opengl from my system and then removed nvidia-drivers. With that done (in that order) I re-emerged both builds and it works fine. By preventing eselect-opengl to run during the unmerge process, I allowed nvidia-drivers to finish cleaning themselves before allowing them to re-install. I don't know how 'sound' this process actually is (compared to what it could be) and I'm still not sure what broke on me specifically, but my computer does seem to be running as it should.
Great, 5 minutes later and I've already reopened the bug. Apparently my above post will only solve the problem temporarily, but unmerging the nvidia-drivers later on will still break the environment. I've also some new lines of error to pass along. If I try to run glxinfo, I get:
Error: API mismatch: the NVIDIA kernel module has the version 1.0-8774, but
this client has the version 1.0-9625. Please make sure that the kernel
module and all NVIDIA driver components have the same version.
NVIDIA: Direct rendering failed; attempting indirect rendering.
(followed by the usual info glxinfo spits out)
(In reply to comment #12)
> Error: API mismatch: the NVIDIA kernel module has the version 1.0-8774, but
> this client has the version 1.0-9625. Please make sure that the kernel
> module and all NVIDIA driver components have the same version.
> NVIDIA: Direct rendering failed; attempting indirect rendering.
Completely unrelated, please don't recycle this bug. Plus make sure you've unmerged nvidia-kernel/nvidia-glx, rmmod nvidia, delete the module from /lib/modules/<kernel-version> and emerge nvidia-drivers.
Can't reproduce the problem and you didn't post any broken file above, the only borkage is related to XGL that we don't distribute at all.
My apologies for taking up space here. When I first came across this problem I thought it was bug-related, but after a lot of digging it turned out to be something else alltogether. If you're interested in seeing where it went, here's the post:
Thanks for your help regardless!
OK, seems all solved now, so closing the bug. Thanks. :)