SOLVED: gcc version conflict

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?

Oh, and FORCE=1 doesn't work either.

I installed gcc48 but I don't know how to make openwrt use it. It continues to use GCC v11 instead.

Assuming you are actually using Arch Linux

Make sure you have all the pre-reqs for Arch?

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.

1 Like

Thanks for your answer.

fortuna@PC:~/aur$ sudo pacman -Q openwrt-devel
openwrt-devel 0.1-1

I see openwrt-devel is at 0.7-1. Would that make a difference do you think?

Yes, but in the device page they recommend 19.07.2 probably because of memory limitations.

Honestly, I couldn't answer as I use Ubuntu and build from source. I posted the link only because of the issues with Arch other people have had.

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.

Alright. Well I updated openwrt-devel to 0.7-1:

fortuna@PC:~$ sudo pacman -Q openwrt-devel
openwrt-devel 0.7-1

and nothing changed:

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

https://openwrt.org/supported_devices/432_warning

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.

Thanks for your help anyway!

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