OPENWRT: GNULIB Error While installing

Hello Guys,

I am facing the below error while I am installing OpenWRT-LEDE-4.2.1.0 in my Ubuntu 20.04.5 LTS Desktop.

<pre>gcc  -I.   -I/media/teq/6b282e2f-57e9-4bf5-976e-aa23855e9e47/Router/PO_Documents/ST_Router/AX1800/OpenWRT_4210/Build/mtk-openwrt-lede-4.2.1.0-20200612-d2c8e460/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/media/teq/6b282e2f-57e9-4bf5-976e-aa23855e9e47/Router/PO_Documents/ST_Router/AX1800/OpenWRT_4210/Build/mtk-openwrt-lede-4.2.1.0-20200612-d2c8e460/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include   -O2 -I/media/teq/6b282e2f-57e9-4bf5-976e-aa23855e9e47/Router/PO_Documents/ST_Router/AX1800/OpenWRT_4210/Build/mtk-openwrt-lede-4.2.1.0-20200612-d2c8e460/mtk-openwrt-lede-4.2.1.0/staging_dir/host/include -I/media/teq/6b282e2f-57e9-4bf5-976e-aa23855e9e47/Router/PO_Documents/ST_Router/AX1800/OpenWRT_4210/Build/mtk-openwrt-lede-4.2.1.0-20200612-d2c8e460/mtk-openwrt-lede-4.2.1.0/staging_dir/host/usr/include  -MT freadahead.o -MD -MP -MF $depbase.Tpo -c -o freadahead.o freadahead.c &amp;&amp;\
mv -f $depbase.Tpo $depbase.Po
<b>freadahead.c:</b> In function &apos;<b>freadahead</b>&apos;:
<b>freadahead.c:91:3:</b> <font color="#CC0000"><b>error: </b></font>#error &quot;Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib.&quot;
   91 |  #<font color="#CC0000"><b>error</b></font> &quot;Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib.&quot;
      |   <font color="#CC0000"><b>^~~~~</b></font>
make[7]: *** [Makefile:1837: freadahead.o] Error 1
make[7]: Leaving directory &apos;/media/teq/6b282e2f-57e9-4bf5-976e-aa23855e9e47/Router/PO_Documents/ST_Router/AX1800/OpenWRT_4210/Build/mtk-openwrt-lede-4.2.1.0-20200612-d2c8e460/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17/lib&apos;
make[6]: *** [Makefile:1602: all] Error 2
make[6]: Leaving directory &apos;/media/teq/6b282e2f-57e9-4bf5-976e-aa23855e9e47/Router/PO_Documents/ST_Router/AX1800/OpenWRT_4210/Build/mtk-openwrt-lede-4.2.1.0-20200612-d2c8e460/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17/lib&apos;
make[5]: *** [Makefile:1506: all-recursive] Error 1
make[5]: Leaving directory &apos;/media/teq/6b282e2f-57e9-4bf5-976e-aa23855e9e47/Router/PO_Documents/ST_Router/AX1800/OpenWRT_4210/Build/mtk-openwrt-lede-4.2.1.0-20200612-d2c8e460/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17&apos;
make[4]: *** [Makefile:1461: all] Error 2
make[4]: Leaving directory &apos;/media/teq/6b282e2f-57e9-4bf5-976e-aa23855e9e47/Router/PO_Documents/ST_Router/AX1800/OpenWRT_4210/Build/mtk-openwrt-lede-4.2.1.0-20200612-d2c8e460/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17&apos;
make[3]: *** [Makefile:29: /media/teq/6b282e2f-57e9-4bf5-976e-aa23855e9e47/Router/PO_Documents/ST_Router/AX1800/OpenWRT_4210/Build/mtk-openwrt-lede-4.2.1.0-20200612-d2c8e460/mtk-openwrt-lede-4.2.1.0/build_dir/host/m4-1.4.17/.built] Error 2
make[3]: Leaving directory &apos;/media/teq/6b282e2f-57e9-4bf5-976e-aa23855e9e47/Router/PO_Documents/ST_Router/AX1800/OpenWRT_4210/Build/mtk-openwrt-lede-4.2.1.0-20200612-d2c8e460/mtk-openwrt-lede-4.2.1.0/tools/m4&apos;
make[2]: *** [tools/Makefile:153: tools/m4/compile] Error 2
make[2]: Leaving directory &apos;/media/teq/6b282e2f-57e9-4bf5-976e-aa23855e9e47/Router/PO_Documents/ST_Router/AX1800/OpenWRT_4210/Build/mtk-openwrt-lede-4.2.1.0-20200612-d2c8e460/mtk-openwrt-lede-4.2.1.0&apos;
make[1]: *** [tools/Makefile:150: /media/teq/6b282e2f-57e9-4bf5-976e-aa23855e9e47/Router/PO_Documents/ST_Router/AX1800/OpenWRT_4210/Build/mtk-openwrt-lede-4.2.1.0-20200612-d2c8e460/mtk-openwrt-lede-4.2.1.0/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yyynyyyyyynyyyyynyynnyyyyyyynyyyyyyyyyyyyyyyynyynynnyyynnny] Error 2
make[1]: Leaving directory &apos;/media/teq/6b282e2f-57e9-4bf5-976e-aa23855e9e47/Router/PO_Documents/ST_Router/AX1800/OpenWRT_4210/Build/mtk-openwrt-lede-4.2.1.0-20200612-d2c8e460/mtk-openwrt-lede-4.2.1.0&apos;
make: *** [/media/teq/6b282e2f-57e9-4bf5-976e-aa23855e9e47/Router/PO_Documents/ST_Router/AX1800/OpenWRT_4210/Build/mtk-openwrt-lede-4.2.1.0-20200612-d2c8e460/mtk-openwrt-lede-4.2.1.0/include/toplevel.mk:199: world] Error 2
</pre>

Can you guys please help me out to solve this error?

Thank You

My guess is, your Linux dist is too new, however ....

It appears you are using firmware that is not from the official OpenWrt project.

When using forks/offshoots/vendor-specific builds that are "based on OpenWrt", there may be many differences compared to the official versions (hosted by OpenWrt.org). Some of these customizations may fundamentally change the way that OpenWrt works. You might need help from people with specific/specialized knowledge about the firmware you are using, so it is possible that advice you get here may not be useful.

You may find that the best options are:

  1. Install an official version of OpenWrt, if your device is supported (see https://firmware-selector.openwrt.org).
  2. Ask for help from the maintainer(s) or user community of the specific firmware that you are using.
  3. Provide the source code for the firmware so that users on this forum can understand how your firmware works (OpenWrt forum users are volunteers, so somebody might look at the code if they have time and are interested in your issue).

If you believe that this specific issue is common to generic/official OpenWrt and/or the maintainers of
your build have indicated as such, please feel free to clarify.

.... which is the same reply you got last time you posted.

Hello @frollic,

Can we update GNU M4 in the OpenWrt package?

In my view, it seems GNU M4 version mismatch error.

Let me know your thought.

Thank YOu

ask the creator of the SDK....

1 Like
  • To be clear, OpenWrt is its own OS, you don't install it on another OS

Is this the official OpenWrt SDK?