distcc arm to x86 will not build kernel, again

Ask questions about Arch Linux ARM. Please search before making a new topic.

distcc arm to x86 will not build kernel, again

Postby keithspg » Sun Aug 11, 2024 1:50 pm

I am running distcc on my system. I have it configured and it works file to build packages. I initiate the build on the Pi and it distributes to the x86 machine. Been doing this for years and every so often I run into a problem and it stops working. Usually a bit of search and I get it resolved. Today, I am stumped. It builds using 'makepkg' fine. I can build HelloWorld.c with gcc cc=DISTCC . I can even use make to build things and it distributes. I cannot do this with the kernel.
I ran into this problem a while back and was able to fix it with this:make_clickable_callback(MAGIC_URL_FULL, '
', 'https://wiki.archlinux.org/title/Distcc#Quirks_compiling_the_Arch_Linux_kernel_package', '', ' class="postlink"')
My old MAKEPKGs for the kernel builds have this as a sed command for arch/arm and arch/arm64, so I am pretty sure it is correct.
Even with this edit, I cannot build the kernel using make when I git clone the kernel and try to build it.
I get this on the Pi:
[code]distcc[174501] ERROR: compile net/bluetooth/rfcomm/rfcomm.mod.c on 192.168.2.77:3636 failed
distcc[174501] (dcc_build_somewhere) Warning: remote compilation of 'net/bluetooth/rfcomm/rfcomm.mod.c' failed, retrying locally[/code]
and this on the x86 machine:
[code]distccd[6082] gcc net/bluetooth/rfcomm/rfcomm.mod.c on localhost failed
distccd[6082] job complete
distccd[6082] (dcc_job_summary) client: 192.168.2.199:47912 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:1447ms gcc net/bluetooth/rfcomm/rfcomm.mod.c
distccd[6076] (dcc_r_file_timed) 2015073 bytes received in 0.017700s, rate 111178kB/s
distccd[6076] (dcc_collect_child) cc times: user 0.000000s, system 0.000000s, 0 minflt, 0 majflt[/code]

When I use makepkg it works fine for 'non kernel' packages.
For example, when I clone and make llmnrd, it works fine with 'make'make_clickable_callback(MAGIC_URL_FULL, '
', 'https://github.com/tklauser/llmnrd.git', '', ' class="postlink"')
clone it then:
[code]$ make -j4
CC llmnr.c
CC iface.c
CC socket.c
CC util.c
CC log.c
CC llmnrd.c
CC llmnr-query.c
LD llmnrd
LD llmnr-query[/code]
on the x86 machine, I get what I expect:
[code]distccd[26906] (dcc_job_summary) client: 192.168.2.199:45598 COMPILE_OK exit:0 sig:0 core:0 ret:0 time:164ms gcc llmnrd.c
distccd[26907] (dcc_collect_child) cc times: user 0.000000s, system 0.000000s, 0 minflt, 0 majflt
distccd[26907] gcc llmnr-query.c on localhost completed ok
distccd[26907] job complete
...[/code]
What do I need to do about the kernel source code to get it to build 6.6.x and distribute via distcc?
keithspg
 
Posts: 224
Joined: Mon Feb 23, 2015 4:14 pm

Re: distcc arm to x86 will not build kernel, again

Postby solskogen » Sun Aug 11, 2024 2:15 pm

Make sure that the compiler on the Pi and the cross compiler on your faster x86-host is exactly the same version. If not, you might get this kind of errors.
solskogen
 
Posts: 215
Joined: Mon Nov 18, 2013 10:41 am

Re: distcc arm to x86 will not build kernel, again

Postby keithspg » Sun Aug 11, 2024 2:39 pm

They are close...
RPi shows: gcc version 12.2.0
Arch x86 shows: gcc version 12.2.1
Would this cause a kernel build problem and not show one with a user space package?
keithspg
 
Posts: 224
Joined: Mon Feb 23, 2015 4:14 pm

Re: distcc arm to x86 will not build kernel, again

Postby graysky » Sun Aug 11, 2024 3:38 pm

Not sure about your build error but Arch ARM's toolchain is on gcc-14.x for months now. Recommend that you update your Arch ARM install and update your cross-compile toolchain on x86. You can use the AUR hosted distccd-alarm package for this purpose.

Alternatively, the kernel package is special in that it is entirely self contained. This means that you can cross-compile it directly on your x86_64 box which I am guessing is more powerful than your RPi. To do this, on your x86_64 box, install the following from the official Arch repos:

aarch64-linux-gnu-binutils
aarch64-linux-gnu-gcc
aarch64-linux-gnu-glibc
aarch64-linux-gnu-linux-api-headers

Then build the ARM kernel with this command:
CARCH=aarch64 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- nice -19 makepkg -sCAfd
graysky
Developer
 
Posts: 1876
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: distcc arm to x86 will not build kernel, again

Postby keithspg » Sun Aug 11, 2024 7:54 pm

@graysky Thanks for the note, but I don't think I can comply with that due to how I use my x86. I have PiOS on the Pis and distcc on the Arch x86 continues to build everything except the kernel for me and I am afraid of changing anything due to the time required to re-figure everything out.
We used to dev our audio player on ArchARM, but had to move to RPiOS to maintain support for armv6 on the Zero/B1. After re-doing all the packages, the distccd still works(ed). I am still on Arch for my x86 computers and have used and continue to use it. If distccd stops building I may have to reconsider by selection for my x86 machines.
keithspg
 
Posts: 224
Joined: Mon Feb 23, 2015 4:14 pm

Re: distcc arm to x86 will not build kernel, again

Postby solskogen » Fri Aug 16, 2024 8:55 am

If you are not using Arch Linux ARM, why are you posting on this forum?
solskogen
 
Posts: 215
Joined: Mon Nov 18, 2013 10:41 am


Return to User Questions

Who is online

Users browsing this forum: No registered users and 25 guests