Error during making own image on WSL Ubuntu

Hello!

I'm trying to make my own image (v19.07.2) for TP-LINK TL-WR841N on Ubuntu 20.04 LTS. The commands:

git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt
git checkout v19.07.2
./scripts/feeds update -a
./scripts/feeds install -a
make prereq

were successfully done.

Than I opened make menuconfig and set

  • Target System
  • Subtarget
  • Target Profile
  • luCI -> Collections -> luci

Nothing more! Then I run make and finally got this:

...
Creating 4.0 filesystem on /home/ksc/wrt/openwrt/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/root.squashfs, block size 1048576.
Creating 4.0 filesystem on /home/ksc/wrt/openwrt/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/root.squashfs, block size 1048576.
make[5]: *** [/home/ksc/wrt/openwrt/include/image.mk:332: /home/ksc/wrt/openwrt/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/root.squashfs] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory '/home/ksc/wrt/openwrt/target/linux/ar71xx/image'
make[4]: *** [Makefile:24: install] Error 2
make[4]: Leaving directory '/home/ksc/wrt/openwrt/target/linux/ar71xx'
make[3]: *** [Makefile:13: install] Error 2
make[3]: Leaving directory '/home/ksc/wrt/openwrt/target/linux'
time: target/linux/install#11.42#19.03#18.33
make[2]: *** [target/Makefile:25: target/linux/install] Error 2
make[2]: Leaving directory '/home/ksc/wrt/openwrt'
make[1]: *** [target/Makefile:19: /home/ksc/wrt/openwrt/staging_dir/target-mips_24kc_musl/stamp/.target_install] Error 2
make[1]: Leaving directory '/home/ksc/wrt/openwrt'
make: *** [/home/ksc/wrt/openwrt/include/toplevel.mk:227: world] Error 2

Errors with -V=99:

mkimage -A mips -O linux -T kernel -a 0x80060000 -C lzma  -e 0x80060000 -n 'MIPS OpenWrt Linux-4.14.171' -d /home/ksc/wrt/openwrt/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/vmlinux.bin.lzma /home/ksc/wrt/openwrt/bin/targets/ar71xx/tiny/openwrt-ar71xx-tiny-uImage-lzma.bin
Image Name:   MIPS OpenWrt Linux-4.14.171
Created:      Thu Feb 27 21:05:12 2020
Image Type:   MIPS Linux Kernel Image (lzma compressed)
Data Size:    1242941 Bytes = 1213.81 KiB = 1.19 MiB
Load Address: 80060000
Entry Point:  80060000
cp /home/ksc/wrt/openwrt/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/loader-generic.elf /home/ksc/wrt/openwrt/bin/targets/ar71xx/tiny/openwrt-ar71xx-tiny-vmlinux-lzma.elf
mkdir -p /home/ksc/wrt/openwrt/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tmp
/home/ksc/wrt/openwrt/staging_dir/host/bin/mksquashfs4 /home/ksc/wrt/openwrt/build_dir/target-mips_24kc_musl/root-ar71xx /home/ksc/wrt/openwrt/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/root.squashfs -nopad -noappend -root-owned -comp xz -Xpreset 9 -Xe -Xlc 0 -Xlp 2 -Xpb 2  -b 1024k -p '/dev d 755 0 0' -p '/dev/console c 600 0 0 5 1' -processors 1
FATAL ERROR:nanosleep failed in progress thread
Parallel mksquashfs: Using 1 processor
Parallel mksquashfs: Using 1 processor
Creating 4.0 filesystem on /home/ksc/wrt/openwrt/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/root.squashfs, block size 1048576.
make[5]: *** [/home/ksc/wrt/openwrt/include/image.mk:332: /home/ksc/wrt/openwrt/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/root.squashfs] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory '/home/ksc/wrt/openwrt/target/linux/ar71xx/image'
make[4]: *** [Makefile:24: install] Error 2
make[4]: Leaving directory '/home/ksc/wrt/openwrt/target/linux/ar71xx'
make[3]: *** [Makefile:13: install] Error 2
make[3]: Leaving directory '/home/ksc/wrt/openwrt/target/linux'
time: target/linux/install#12.34#22.20#20.96
make[2]: *** [target/Makefile:25: target/linux/install] Error 2
make[2]: Leaving directory '/home/ksc/wrt/openwrt'
make[1]: *** [target/Makefile:19: /home/ksc/wrt/openwrt/staging_dir/target-mips_24kc_musl/stamp/.target_install] Error 2
make[1]: Leaving directory '/home/ksc/wrt/openwrt'
make: *** [/home/ksc/wrt/openwrt/include/toplevel.mk:227: world] Error 2

What's the problem?..

Thank you!

Never heard about that error.

Is there anything special in your buildhost?
A vanilla Ubuntu or such?

Ps. It would be preferable not to checkout the old 19.07.2 but instead checkout the 19.07 stable branch itself with all the fixes since 19.07.2.

Does it do it repeatedly?

Only immediate thought is that you're on some form of virtualisation platform where time services aren't behaving "properly". What is Ubuntu installed on?

Yeah, I'm actually using Ubuntu via WSL. But WSL is widely used so I don't think that is the real reason.

Well, via git tag I see v19.07.0. I think that 19.07.2 is the newer one.

Yup, it does.

Where does your WSL build sit in relation these time handling issues on it: https://github.com/microsoft/WSL/issues/4898? Too many version numbers for me to untangle :o!

EDIT: And https://discourse.ubuntu.com/t/ubuntu-20-04-and-wsl-1/15291

1 Like

That 19.07.2 tag is still old compared to the 19.07 HEAD:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=shortlog;h=refs/heads/openwrt-19.07

19.07.2 in Feb 2020 barely fits to the first page in the 19.07 log.

(19.07.0 is naturally a much older tag)
https://git.openwrt.org/?p=openwrt/openwrt.git;a=summary

The branch logic in general form:

Ps.
There is a plan of 19.07.3 in near future:
http://lists.infradead.org/pipermail/openwrt-adm/2020-May/001403.html

1 Like

Well, I'm not sure what exactly WSL version is used but I think it's WSL 2 since I've installed it recently.

Okay, I see that the problem is related to my local problem with using WSL so I should try WSL support then I guess...

Well, as I got 19.07.0 and 19.07 is not the same versions.
But I'm unable to checkout 19.07 anyway:

$ git clone https://git.openwrt.org/openwrt/openwrt.git
$ git checkout 19.07
error: pathspec '19.07' did not match any file(s) known to git

You use the branch name:

git checkout openwrt-19.07

All branches were listed as "heads" on that git overview page I linked above.
https://git.openwrt.org/?p=openwrt/openwrt.git;a=summary

1 Like

In the begining of making 19.07 I got the following

make[2]: Entering directory '/home/imm/v19.07/scripts/config'
conf.c: In function 'main':
conf.c:620:6: warning: format not a string literal and no format arguments [-Wformat-security]
  620 |      _("\n*** The configuration requires explicit update.\n\n"));
      |      ^
conf.c:674:4: warning: format not a string literal and no format arguments [-Wformat-security]
  674 |    fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
      |    ^~~~~~~
conf.c:678:4: warning: format not a string literal and no format arguments [-Wformat-security]
  678 |    fprintf(stderr, _("\n*** Error during update of the configuration.\n\n"));
      |    ^~~~~~~
conf.c:689:4: warning: format not a string literal and no format arguments [-Wformat-security]
  689 |    fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
      |    ^~~~~~~
make[2]: Leaving directory '/home/imm/v19.07/scripts/config'

And the making process is continuing though. Is it okay?

I'm working in VMWare Uduntu now by the way.

Wsl 2 is only delivered to the developer ring, I think. It will come publicly available with windows 20H1 in a few weeks. So quite likely you have wsl1

I build OpenWrt with Ubuntu 20.04 in virtualbox, not wsl. Works well.

This may not be your issue but WSL, Ubuntu 20.04 and nanosleep are not friends lately:

2 Likes

Use Ubuntu 18.04 LTS wsl install and not the Ubuntu 20.04 LTS install. I use the 18.04 to do unsquashfs and it works just fine i think its just something wrong with the 20.04 version. WSL does work. Left is 18.04 and right is 20.04

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.