Hi,
I am trying to understand how to compile software for openwrt, but I am having problems…
At the moment I try to compile a trivial hello-world program for which I created an openwrt-Makefile.
My device is an AR-300M.
I cloned GitHub - domino-team/openwrt-cc: openwrt CC with Domino/GL patches and ran make menuconfig.
Then I tried to compile my package (named “mh”) with “make package/mh/compile” but that failed because of missing libraries.
I gathered from some postings that it is neccessary to compile the toolkit first.
So I tried “make tools/install” which compiled some tools just fine but ultimately fails at automake.
This is the error I get:
... make[2]: Leaving directory '/home/mh/test/openwrt/openwrt-cc/tools/xz' make[2]: Entering directory '/home/mh/test/openwrt/openwrt-cc/tools/automake' (cd /home/mh/test/openwrt/openwrt-cc/build_dir/host/automake-1.15; AUTOM4TE=/home/mh/test/openwrt/openwrt-cc/staging_dir/host/bin/autom4te AUTOCONF=/home/mh/test/openwrt/openwrt-cc/staging_dir/host/bin/autoconf AUTOMAKE=/home/mh/test/openwrt/openwrt-cc/staging_dir/host/bin/automake ACLOCAL=/home/mh/test/openwrt/openwrt-cc/staging_dir/host/bin/aclocal AUTOHEADER=/home/mh/test/openwrt/openwrt-cc/staging_dir/host/bin/autoheader LIBTOOLIZE=/home/mh/test/openwrt/openwrt-cc/staging_dir/host/bin/libtoolize LIBTOOL=/home/mh/test/openwrt/openwrt-cc/staging_dir/host/bin/libtool M4=/home/mh/test/openwrt/openwrt-cc/staging_dir/host/bin/m4 AUTOPOINT=true STAGING_DIR="" ./bootstrap.sh) Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at ./bin/automake.tmp line 3938. Makefile:50: recipe for target '/home/mh/test/openwrt/openwrt-cc/build_dir/host/automake-1.15/.configured' failed make[2]: *** [/home/mh/test/openwrt/openwrt-cc/build_dir/host/automake-1.15/.configured] Error 255 make[2]: Leaving directory '/home/mh/test/openwrt/openwrt-cc/tools/automake' tools/Makefile:122: recipe for target 'tools/automake/compile' failed make[1]: *** [tools/automake/compile] Error 2 make[1]: Leaving directory '/home/mh/test/openwrt/openwrt-cc' /home/mh/test/openwrt/openwrt-cc/include/toplevel.mk:181: recipe for target 'tools/install' failed make: *** [tools/install] Error 2I also tried the same exercise with the chaos-calmer branch from openwrt and get the same error.
What am I doing wrong?
Where can I find an up-to-date tutorial on how to compile a package for openwrt that documents everything and does not assume prior experience with openwrt?
Many thanks!