X86/64 Docker built not working and can't be built!

cd $some_openwrt_project
wget -q https://gitlab.com/ynezz/openwrt-ci/raw/master/Makefile -O Makefile.ci
make ci-prepare -f Makefile.ci
docker run --rm --tty --interactive \
	--volume $(pwd):/home/build/source \
	--workdir /home/build/source \
	--env CI_TARGET_BUILD_DEPENDS=uci \
	--env CI_ENABLE_UNIT_TESTING=1 \
	openwrtorg/sdk:x86-64 \
	make ci-sdk-oot-build -f Makefile.ci

---
make[2]: Leaving directory '/home/build/openwrt'
make[1]: Leaving directory '/home/build/openwrt'
touch /home/build/openwrt/tmp/.ci-sdk-prepared
( echo "SET(CMAKE_SYSTEM_NAME Linux)" ; echo "SET(CMAKE_FIND_ROOT_PATH /home/build/openwrt/staging_dir/target-x86_64_musl)" ; echo "SET(OWRT_CROSS /home/build/openwrt/staging_dir/toolchain-x86_64_gcc-8.4.0_musl/bin/x86_64-openwrt-linux-musl-)" ; echo 'SET(CMAKE_C_COMPILER ${OWRT_CROSS}gcc)' ; echo 'SET(CMAKE_CXX_COMPILER ${OWRT_CROSS}g++)' ; echo "SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" ; echo "SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)" ; echo "SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" ; echo "ADD_DEFINITIONS(-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result)" ; ) > toolchain.cmake
rm -fr ./build 2>/dev/null; mkdir -p ./build && cd ./build &&  /home/build/openwrt/staging_dir/host/bin/cmake -D CMAKE_BUILD_TYPE=Debug  -D CMAKE_TOOLCHAIN_FILE=toolchain.cmake .. ; ret=$? ; if [ $ret != 0 ]; then exit $ret; fi ;  make -j80 VERBOSE=1 all  ; ret=$? ; if [ $ret != 0 ]; then exit $ret; fi ; cd ..
CMake Error: The source directory "/home/build/source" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
make: *** [openwrt-ci/sdk-build.mk:57: ci-sdk-oot-build] Error 1

It works as expected.

As stated in the README, ci-sdk-oot-build is meant for out of tree build for target with SDK, which means, that it's used for CI test building of C based OpenWrt sub-projects with SDK, in other words building of single packages and it's dependencies like for example libubox.

So in order to get it working you need to do:

export some_openwrt_project=libubox
git clone https://git.openwrt.org/project/${some_openwrt_project}.git
cd $some_openwrt_project
wget -q https://gitlab.com/ynezz/openwrt-ci/raw/master/Makefile -O Makefile.ci
make ci-prepare -f Makefile.ci
docker run --rm --tty --interactive \
	--volume $(pwd):/home/build/source \
	--workdir /home/build/source \
	--env CI_TARGET_BUILD_DEPENDS=uci \
	--env CI_ENABLE_UNIT_TESTING=1 \
	openwrtorg/sdk:x86-64 \
	make ci-sdk-oot-build -f Makefile.ci

You see, that CI ci-sdk-oot-build make/build target expects CMakeLists.txt in the source directory.

That openwrt-ci is work in progress, I need to write some documentation, I've posted some details to the mailing list

I wanted to compile a complete set of downloads.openwrt.org snapshots on my private server, :yum:and see if there were simple and convenient tools like docker.

That could be achieved with some tweaks of https://git.openwrt.org/?p=buildbot.git;a=blob;f=docker/docker-compose.yml;h=93f7c83428f0e360826a10215eca690ab49fd0ad;hb=HEAD

1 Like

I give it a try , thank you very much :grinning: