Home | News | Download | Packages | Forum | Wiki | Github

Installing first source package


Good evening,

I am trying to learn to use the xbps-src tool but I am getting an error message that I do not understand.

=> MT7630E-2.0.9_1: removing autodeps, please wait…
=> MT7630E-2.0.9_1: building …
=> MT7630E-2.0.9_1: running pre-build hook: 02-script-wrapper …
=> MT7630E-2.0.9_1: running do_build …
make -C /lib/modules/uname -r/build M=/builddir/MT7630E-2.0.9/rt2x00 modules
make[1]: *** /lib/modules/4.10.17_1/build: No such file or directory. Stop.
make: *** [Makefile:9: all] Error 2
=> ERROR: MT7630E-2.0.9_1: failed to run do_build() at line 9.

/lib/modules/4.10.17_1/build exists. Why does it say it does not exist?

Thank you.

(Masato the Empty) #2

xbps-src runs in a chroot, so all paths you see are actually relative to void-packages/masterdir

So what that means is that masterdir/lib/modules… doesn’t exist.

I never thought about it or checked before, but the xbps-src bootstrap doesn’t seem to have a linux kernel installed (really why should it under most circumstances?)

So if you need a kernel tree to build against, you need to add the kernel (both linux#.# and linux#.#-headers) to the makedepends in your template.

NOTE: I’m not an expert at this, but I suspect that if you’re building a kernel module, putting it in a binary package isn’t the way that this should normally be done. Instead you should always build it locally and rebuild it every time the kernel updates.

To “package” such a module then you’d package it as a dfsg module. (disclaimer - I know very little about that system so I won’t have any suggestions about how that actually works…) For ideas you might want to look at the templates for other dfsg packages.


Do you mean DKMS (Dynamic Kernel Module Support)? DFSG would be the Debian Free Software Guidelines.

(Masato the Empty) #4

Yes. It was late (for me) and I was screwing up my acronyms.

Thanks @volleyper. If the OP didn’t get what it was from my post, then hopefully you’ve cleared it up.

EDIT: weird that it was that one that popped into my head… I’ve been off of Debian for almost a year now and I haven’t even seen that acronym in a while now…