Building for OpenWrt

lobbia lobbia at 163.com
Wed Apr 12 01:33:07 PDT 2023


Hi experts, 


Can you advice me what's wrong or how shall I build myself for a special branch code for OpenWrt? I'm trying to build package for Openwrt from a old branch other than master from Gitlab but failed. I can build released version for openwrt correctly e.g. v8.20 and v9.01. I can also build the old branch for Ubuntu correctly. Anyone know what's the issue or how to fix? Thanks!


Code branch to be built: add_local_id_option 
https://gitlab.com/openconnect/openconnect/-/tree/add_local_id_option?ref_type=heads


Building procedure:
1. download source code from Gitlab page by clicking 'Download' button and got tar.gz file; (I named it as v8.88 during building)
2. Fork/Clone openwrt code from both repos(openwrt code and packages) on Openwrt Github website;
3. follow Opwnert building instruction, repointing feeds.config to my own repo of packages just downloaded; Change file name and location to the downloaded code file on my own disk in openwrt openconnect package Makefile
4. Run workflow and it failed at 'Compile Firmware' due to reason:    "make[4]: *** No targets specified and no makefile found.  Stop."


I could do this successfully if i select a different source code versions in step1, e.g. v8.20 and v9.01 from ftp.infradead.org/pub/openconnect/. 
I could also successfully build same code file downloaded in above step1 for Ubuntu following https://www.infradead.org/openconnect/building.html.


The failure log:

make[3]: Entering directory '/home/runner/work/openwrt/openwrt/feeds/packages/net/openconnect'
3315mkdir -p /home/runner/work/openwrt/openwrt/dl
3316SHELL= flock /home/runner/work/openwrt/openwrt/tmp/.openconnect-8.88.tar.gz.flock -c '  	/home/runner/work/openwrt/openwrt/scripts/download.pl "/home/runner/work/openwrt/openwrt/dl" "openconnect-8.88.tar.gz" "b6aa49f9209112dd486957829e0c052121472e34a10b85a75391cb2e4bc75603" "" "http://xxx.xxx/"    '
3317rm -f /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/openconnect-8.88/.built
3318touch /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/openconnect-8.88/.built_check
3319CFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -iremap/home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/openconnect-8.88:openconnect-8.88 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/home/runner/work/openwrt/openwrt/staging_dir/target-x86_64_musl/usr/include -I/home/runner/work/openwrt/openwrt/staging_dir/target-x86_64_musl/include -I/home/runner/work/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-7.5.0_musl/usr/include -I/home/runner/work/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-7.5.0_musl/include/fortify -I/home/runner/work/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-7.5.0_musl/include " CXXFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -iremap/home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/openconnect-8.88:openconnect-8.88 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/home/runner/work/openwrt/openwrt/staging_dir/target-x86_64_musl/usr/include -I/home/runner/work/openwrt/openwrt/staging_dir/target-x86_64_musl/include -I/home/runner/work/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-7.5.0_musl/usr/include -I/home/runner/work/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-7.5.0_musl/include/fortify -I/home/runner/work/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-7.5.0_musl/include " LDFLAGS="-L/home/runner/work/openwrt/openwrt/staging_dir/target-x86_64_musl/usr/lib -L/home/runner/work/openwrt/openwrt/staging_dir/target-x86_64_musl/lib -L/home/runner/work/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-7.5.0_musl/usr/lib -L/home/runner/work/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-7.5.0_musl/lib -znow -zrelro " make -j1 -C /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/openconnect-8.88/. AR="x86_64-openwrt-linux-musl-gcc-ar" AS="x86_64-openwrt-linux-musl-gcc -c -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -iremap/home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/openconnect-8.88:openconnect-8.88 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" LD=x86_64-openwrt-linux-musl-ld NM="x86_64-openwrt-linux-musl-gcc-nm" CC="x86_64-openwrt-linux-musl-gcc" GCC="x86_64-openwrt-linux-musl-gcc" CXX="x86_64-openwrt-linux-musl-g++" RANLIB="x86_64-openwrt-linux-musl-gcc-ranlib" STRIP=x86_64-openwrt-linux-musl-strip OBJCOPY=x86_64-openwrt-linux-musl-objcopy OBJDUMP=x86_64-openwrt-linux-musl-objdump SIZE=x86_64-openwrt-linux-musl-size CROSS="x86_64-openwrt-linux-musl-" ARCH="x86_64" ;
3320make[4]: *** No targets specified and no makefile found.  Stop.
3321make[4]: Entering directory '/home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/openconnect-8.88'
3322make[4]: Leaving directory '/home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/openconnect-8.88'
3323make[3]: Leaving directory '/home/runner/work/openwrt/openwrt/feeds/packages/net/openconnect'
3324time: package/feeds/packages/openconnect/compile#0.18#0.02#0.19
3325make[3]: *** [Makefile:89: /home/runner/work/openwrt/openwrt/build_dir/target-x86_64_musl/openconnect-8.88/.built] Error 2
3326make[2]: *** [package/Makefile:113: package/feeds/packages/openconnect/compile] Error 2
3327make[2]: Leaving directory '/home/runner/work/openwrt/openwrt'
3328make[1]: *** [package/Makefile:107: /home/runner/work/openwrt/openwrt/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
3329make[1]: Leaving directory '/home/runner/work/openwrt/openwrt'
3330make: *** [/home/runner/work/openwrt/openwrt/include/toplevel.mk:227: world] Error 2
3331Error: Process completed with exit code 2.


Any idea? Thanks!























More information about the openconnect-devel mailing list