Failed to build Go 1.14.1 on Asuswrt-Merlin

hello,

I just want to build Go 1.14.1 from source code on Asuswrt-Merlin 384.15(Entware installed, so I can use gcc/bash/git), router is ASUS RT-AC88U. The physical memory is 512MB, with 512MB swap.

After 5-hour compiling, the build failed with “No space left on device”. How can I fix this? Shall I increase the rootfs size? or change $WORK directory to some other directory? Thanks for help.

error info:

admin@RT-AC88U-4AF8:/tmp/mnt/WD12T/home/goroot/src# time ./all.bash 
Building Go cmd/dist using /tmp/mnt/WD12T/home/go-ac88u/go-linux-arm-bootstrap. (go1.4-bootstrap-20170531 linux/arm)
Building Go toolchain1 using /tmp/mnt/WD12T/home/go-ac88u/go-linux-arm-bootstrap.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
# cmd/compile/internal/ssa
compile: writing output: write $WORK/b092/_pkg_.a: no space left on device
go tool dist: FAILED: /tmp/mnt/WD12T/home/goroot/pkg/tool/linux_arm/go_bootstrap install -gcflags=all= -ldflags=all= -i cmd/asm cmd/cgo cmd/compile cmd/link: exit status 2
Command exited with non-zero status 2
real	5h 39m 32s
user	18m 4.12s
sys	3m 41.51s

admin@RT-AC88U-4AF8:/tmp/mnt/WD12T/home/goroot/src# df -Th
Filesystem           Type            Size      Used Available Use% Mounted on
rootfs               rootfs         34.1M     34.1M         0 100% /
/dev/root            squashfs       34.1M     34.1M         0 100% /
devtmpfs             devtmpfs      251.4M         0    251.4M   0% /dev
tmpfs                tmpfs           2.0G     38.8M      2.0G   2% /tmp
/dev/mtdblock4       jffs2          64.0M      1.9M     62.1M   3% /jffs
/dev/sda1            ext4           10.7T      2.3T      7.9T  22% /tmp/mnt/WD12T

admin@RT-AC88U-4AF8:/tmp/home/root# cat /etc/mtab
rootfs / rootfs rw 0 0
/dev/root / squashfs ro,relatime 0 0
devtmpfs /dev devtmpfs rw,relatime,size=257448k,nr_inodes=64362,mode=755 0 0
proc /proc proc rw,relatime 0 0
tmpfs /tmp tmpfs rw,relatime,size=2097152k 0 0
sysfs /sys sysfs rw,relatime 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
/dev/mtdblock4 /jffs jffs2 rw,noatime 0 0
usbfs /proc/bus/usb usbfs rw,relatime 0 0
/dev/sda1 /tmp/mnt/WD12T ext4 rw,nodev,relatime,barrier=1,data=writeback 0 0

Hi, @Zhang_Bo, I recognize that this doesn’t answer your question directly, but what if you cross compile from a machine with more resources so that you don’t hit this space limitation.

Thank you for your reply. I will try cross-compiling.

I have found a pre-built version of Go for Asuswrt-Merlin from Entware app store and currently using it.

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