Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
x11-drivers/nvidia-drivers-334.21: Unable to emerge
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
UX.MAN
n00b
n00b


Joined: 09 Mar 2013
Posts: 72

PostPosted: Sat Mar 29, 2014 11:37 pm    Post subject: x11-drivers/nvidia-drivers-334.21: Unable to emerge Reply with quote

Hi,

I'm getting the following error when trying to emerge x11-drivers/nvidia-drivers-334.21:

Code:
make: Entering an unknown directory
make: *** /lib/modules/3.12.13-gentoo/build: Permission denied.  Stop.
make: Leaving an unknown directory
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/usr/src/linux-3.12.13-gentoo'
NVIDIA: left KBUILD.
 nvidia.ko failed to build!
make: *** [nvidia.ko] Error 1


I can't find any inconsistencies in my system and have no clue what this is about.
I have uploaded the full log here:

http://pastebin.com/rVERV5fG

If anyone can help, I would appreciate!
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7089
Location: Saint Amant, Acadiana

PostPosted: Sun Mar 30, 2014 12:29 am    Post subject: Reply with quote

Methinks you should file a bug - bugs.gentoo.org
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
UX.MAN
n00b
n00b


Joined: 09 Mar 2013
Posts: 72

PostPosted: Sun Mar 30, 2014 1:46 am    Post subject: Reply with quote

I was thinking about doing that. I will file a bug report.
If anyone has anything else to add, please update this post.
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 501

PostPosted: Sun Mar 30, 2014 7:56 am    Post subject: Reply with quote

does the directory exist? and the kernel sources for it?
don't build kernels as root, use a default user for that.
Back to top
View user's profile Send private message
UX.MAN
n00b
n00b


Joined: 09 Mar 2013
Posts: 72

PostPosted: Mon Mar 31, 2014 1:23 pm    Post subject: Reply with quote

Yes, the directory exists. Also, I have always compiled the kernel as root within /usr/src/linux directory; I don't believe it represents any kind of security risks.

I have filed in a bug report for this error. It's not been confirmed yet, but it might be. If you want to follow, here is the link https://bugs.gentoo.org/show_bug.cgi?id=506216
If the bug is confirmed, I will mark this thread as being temporarily solved, and will switch it to solved once a patch is developed.


Last edited by UX.MAN on Tue Apr 01, 2014 6:33 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13831

PostPosted: Tue Apr 01, 2014 2:09 am    Post subject: Reply with quote

UX.MAN wrote:
I don't believe it represents any kind of security risks.
You are free to believe what you like, but the advice from roarinelk is sound. Nothing in the kernel build process requires root privilege, so you should not give it root privilege. Additionally, I have seen anecdotes of bugs, usually in early series -rc kernels, that would do substantial damage if run as root but be relatively harmless if run as an unprivileged user.
Back to top
View user's profile Send private message
UX.MAN
n00b
n00b


Joined: 09 Mar 2013
Posts: 72

PostPosted: Tue Apr 01, 2014 4:19 pm    Post subject: Reply with quote

Ok, the building process does not require root privileges, but the installation of modules does.
I will follow your suggestions and build the kernel as an unprivileged user, and them build the modules as root. I'll also remove any reminiscences of all other kernels I have previously installed and get back to you.

Stay tuned!
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 1763
Location: Here and Away Again

PostPosted: Tue Apr 01, 2014 5:56 pm    Post subject: Reply with quote

Hu wrote:
Nothing in the kernel build process requires root privilege, so you should not give it root privilege. Additionally, I have seen anecdotes of bugs, usually in early series -rc kernels, that would do substantial damage if run as root but be relatively harmless if run as an unprivileged user.

Be that as it may, I can't remember nor find a mention of this in the handbook or the wikki. As such, I imagine it's more likely for users to do just that, be they new or not-so-new.

I, too, tend to do it as root. Whether it's a habit of old, or a risk I'm willing to take for no particular reason(s), I don't know. ^^;
_________________
Kind Regards,
~ The Noob Unlimited ~

Sore wa sore, kore wa kore.
Back to top
View user's profile Send private message
UX.MAN
n00b
n00b


Joined: 09 Mar 2013
Posts: 72

PostPosted: Tue Apr 01, 2014 6:32 pm    Post subject: Reply with quote

@Chiitoo I agree with you. This should be mentioned on the handbook or wiki. None of this information is noted there.

I have found that there is a wiki article describing how to remove all the leftovers of previously installed kernels (here: https://wiki.gentoo.org/wiki/Kernel/Removal). I did not know that the kernel modules where left at /lib/modules/'your_kernel_version', even after unmerging gentoo-sources and even running a depclean.

I will try all this and get back to you with a brief report.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13831

PostPosted: Wed Apr 02, 2014 1:45 am    Post subject: Reply with quote

Chiitoo wrote:
Be that as it may, I can't remember nor find a mention of this in the handbook or the wikki. As such, I imagine it's more likely for users to do just that, be they new or not-so-new.

I, too, tend to do it as root. Whether it's a habit of old, or a risk I'm willing to take for no particular reason(s), I don't know. ^^;
Right, Gentoo does not mention it. I think I saw passing reference to it on LKML long ago. I did not save a link or I would gladly share it here.

Incidentally, I like out-of-tree kernel builds for the convenience of building multiple distinct kernel configurations from a single kernel source tree. Once you have out-of-tree working, building as an unprivileged user is an easy addition. To build out of tree, set $KBUILD_OUTPUT to the directory where objects should go. To stage an install, set $INSTALL_PATH and $INSTALL_MOD_PATH for the main kernel image and the modules, respectively.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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