You are not logged in.
Pages: 1
hi.
I am trying to use distcc with dkms. I have a netbook with a slow celeron and a laptop a little more capable, both running archlinux x86_64.
I have setup both distcc and distccd. This setup works fine when used with makepkg for example.
But when dkms is used to compile a driver in a *-dkms-* package, the compilation is done if the kernel is upgraded and not when using makepkg.
In my case it's the rtl88xxau-aircrack-dkms-git pacakge.
I tried to patch the Makefile in /usr/src/rtl88xxau by adding a line:
CC += "DISTCC_HOSTS=192.168.44.115 distcc"
this does not work I don't why. ditsccd never receive any job.
or
by patching dkms.conf in the same dir by changing the MAKE line to
MAKE="'make' -j$PROCS_NUM KVER=${kernelver} KSRC=/lib/modules/${kernelver}/build DISTCC_HOSTS=192.168.44.115 CC=distcc"
and this does not work either because distccd refuse to do the job with error like:
distccd[291961] (dcc_run_job) Warning: -fplugin= and/or -specs= passed, which are insecure and not supported.
distccd[291961] (dcc_job_summary) client: 192.168.44.177:51362 OTHER exit:0 sig:0 core:0 ret:0 time:1854ms
Is it expected because distcc (not distccd) is run as root ?
I can't find any -specs or -fplugin in the Makefile. So what's that ?
Last edited by solstice (2020-07-09 13:33:33)
Offline
It's part of the *kernel* build component, not the dkms Makefile. The module's own Makefile just proxies out to the kernel's build infrastructure.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
IIRC there are some cases when distcc can not be used. I'm not sure if Kernel modules is one of those. You can use distcc to compile a Kernel, but anything which requires said Kernels sources, can not be compiled with distcc - unless every compiler slave (host) has the same headers (this had something to do with preprocessing and how jobs are distributed...). Someone who knows more about the insides of compiling might verify / give more insight on this - I might be wrong (this is just a hunch)!
Also, AFAIK/IIRC using distcc was/is a cludge, and the project has seen less maintanance these days (i.e. more bugs, overhead and situations when it just doesn't compile - and in worst case, quiet failures). In case the computer you are compiling for is excruciatingly slow, it might be more worthwhile to have a whole chroot (or if the architecture is too different, then a VM) for compiling on the slave for the host/client (computer), and then use package management (or something else) to just transfer the binaries.
Last edited by Wild Penguin (2020-01-21 13:46:00)
Offline
@escharwtz @Wild Penguin
OK. Thanks for the info
I will not use a VM (no need too) and may be not a chroot. It was just to speed things up a bit.
@Wild Penguin I just learned a cool trick on #archlinux-arm: You install and use qemu-user-static and binfmt-qemu-static from aur, and you are able to chroot even to a different arch like arm from a x86_64. impressive !
Offline
So that's weird. It does work when the target is arm but not x86_86.
For example, trying to compile for my netbook (x86_64 with distcc) does not work, but doing the same for a rpi0, using both distcc and cross-compil, ... just works.
1. First patch the Makefile to compile on rpi (natively)
2. patch dkms.conf to use ditscc
--- PKGBUILD 2020-07-09 15:29:20.243286540 +0200
+++ PKGBUILD 2020-07-09 14:47:24.090079080 +0200
@@ -29,10 +29,17 @@
)
}
+prepare() {
+ cd ${srcdir}/${_pkgbase}
+ sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile
+ sed -i 's/CONFIG_PLATFORM_ARM_RPI = n/CONFIG_PLATFORM_ARM_RPI = y/g' Makefile
+}
+
package() {
cd ${srcdir}/${_pkgbase}
mkdir -p ${pkgdir}/usr/src/${_pkgbase}-${pkgver}
cp -pr * ${pkgdir}/usr/src/${_pkgbase}-${pkgver}
+ sed -i '/^MAKE/s/"$/ DISTCC_HOSTS=192.168.44.115:3634\/3 CC=distcc CXX=distcc"/' ${srcdir}/dkms.conf
+ sed -i '/^MAKE/s/$PROCS_NUM/3/' ${srcdir}/dkms.conf
cp ${srcdir}/dkms.conf ${pkgdir}/usr/src/${_pkgbase}-${pkgver}
# Set name and version
Just change the ip/port
It's still the same error for x86_64 and distcc.
Last edited by solstice (2020-07-09 14:35:16)
Offline
Pages: 1