According to https://openwrt.org/toh/hilink/hlk-rm04 the current release is 19.07.2. So I clone the 19.07.2 sources and start a compilation. But after ./scripts/feeds update -a:
Build dependency: Please install the GNU C Compiler (gcc) 4.8 or later
Build dependency: Please install the GNU C++ Compiler (g++) 4.8 or later
IMHO there is little to complain about as I have v11 installed in arch:
fortuna@PC:~/openwrt$ gcc --version
gcc (GCC) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
fortuna@PC:~/openwrt$ g++ --version
g++ (GCC) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Can anyone explain this? Or even better, is there a workaround?
Edit: 19.02 was frozen except for security backports in February, 2019. You would be far better served by using 21.02 or master branch if you are building from source.
Compilation requirements in stable releases are not updated. They're based on whatever was reasonably current are the time when the codebase got branched for stable release. GCC was nowhere near 11 in 2019.
A current Debian or Ubuntu release/VM is often the less painful solution.
Build dependency: Please install the GNU C Compiler (gcc) 4.8 or later
Build dependency: Please install the GNU C++ Compiler (g++) 4.8 or later
Prerequisite check failed. Use FORCE=1 to override.
make[2]: *** [/home/sil/openwrt/include/toplevel.mk:177: staging_dir/host/.prereq-build] Error 1
make[1]: *** [/home/sil/openwrt/include/toplevel.mk:83: prepare-tmpinfo] Error 2
make: *** [/home/sil/openwrt/include/toplevel.mk:225: world] Error 2
OpenWrt support for those devices has been end with the 19.07 release, ie. 19.07 was the last release with support for 4/32 MB devices. There is no future releases and no images ready for download after 19.07.
That's why I'm trying to compile 19.07. But I didn't know that arch is not the right OS to do that.