Can't build toolchain on ubuntu 20-04

I've been playing around with building single packages for openwrt.
I've been following various guides on the openwrt website.
In any case, I had a working setup 2 days ago and it was doing great, then I had to reinstall my OS (from ubuntu 18 to ubuntu 20).
Now I can't compile the toolchain.

make toolchain/install -j1 V=s

will exit with :

make[2]: Entering directory '/media/chris/CAB24EABB24E9BB7/REPOS/openwrt_repo/openwrt/toolchain/kernel-headers'
rm -rf /media/chris/CAB24EABB24E9BB7/REPOS/openwrt_repo/openwrt/build_dir/toolchain-x86_64_gcc-7.5.0_musl/linux-*
xzcat /media/chris/CAB24EABB24E9BB7/REPOS/openwrt_repo/openwrt/dl/linux-4.14.224.tar.xz | tar -C /media/chris/CAB24EABB24E9BB7/REPOS/openwrt_repo/openwrt/build_dir/toolchain-x86_64_gcc-7.5.0_musl -xf -
tar: linux-4.14.224/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c: Cannot open: Invalid argument
tar: linux-4.14.224/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.h: Cannot open: Invalid argument
tar: linux-4.14.224/include/soc/arc/aux.h: Cannot open: Invalid argument
tar: Exiting with failure status due to previous errors
make[2]: *** [Makefile:116: /media/chris/CAB24EABB24E9BB7/REPOS/openwrt_repo/openwrt/build_dir/toolchain-x86_64_gcc-7.5.0_musl/linux-4.14.224/.prepared] Error 2
make[2]: Leaving directory '/media/chris/CAB24EABB24E9BB7/REPOS/openwrt_repo/openwrt/toolchain/kernel-headers'
time: toolchain/kernel-headers/compile#10.50#8.02#24.12
make[1]: *** [toolchain/Makefile:100: toolchain/kernel-headers/compile] Error 2
make[1]: Leaving directory '/media/chris/CAB24EABB24E9BB7/REPOS/openwrt_repo/openwrt'
make: *** [/media/chris/CAB24EABB24E9BB7/REPOS/openwrt_repo/openwrt/include/ toolchain/install] Error 2

What can I do?


  • the architecture I set in make menuconfig is x86-64
  • I clone the openwrt 19.07 release branch, as the master branch would break at other points as wel

so what I ended up doing was recompile using the -i flag with make, so as to ignore any errors.
it did work and there seem to be no issues, but I'd still be curious to hear what the correct way to have handled this would've been, whenever someone sees this

1 Like

very helpful, though that makes it even more confusing as to why just 2 days ago I had no such issues. The location was the same, so it was still on a Windows-formatted partition of the disk

The target filesystem may be corrupted, try to force check it from Windows.