Errors building dependencies - zlib and libuv

Hi All,

I could build “zlib and libuv” dependency succussfully using “v6.0.0” branch of couchbase , however using latest “master” branch am unable to build these , i followed these steps

$cd ~/couchbase/tlm/deps/packages

For zlib
$ mkdir build-zlib && cd build-zlib && cmake … -DPACKAGE=zlib

$ cmake --build . --target zlib
make: *** No rule to make target ‘zlib’. Stop.

Same for libuv
$ mkdir build-libuv && cd build-libuv && cmake … -DPACKAGE=libuv

$ cmake --build . --target libuv
make: *** No rule to make target ‘libuv’. Stop.

$ cmake --version
cmake version 3.14.20190516-g82c6ec
CMake suite maintained and supported by Kitware (kitware.com/cmake).

I saw changes in this commit here - http://review.couchbase.org/#/c/103864/ as regards to “zlib and libuv”.
Any thoughts/comments on reason for above failures.

libuv, zlib, and several other dependency packages have been migrated to a newer and hopefully improved system which we call “cbdeps 2.0”. There isn’t any documentation yet though, as it was really only intended for internal usage. But briefly, the following should work, assuming you have some pre-requisites such as automake etc installed:

repo init -u git://github.com/couchbase/manifest -m cbdeps/libuv/master.xml
repo sync
WORKSPACE=(pwd) PRODUCT=libuv VERSION=(repo forall build -c ‘echo $REPO__VERSION’) BLD_NUM=8 LOCAL_BUILD=true ./build-tools/cbdeps/scripts/build-one-cbdep

and the cbdeps packages will be created in ./packages. (The process is primarily intended for use in our Jenkins CI, which is why so many things are passed in via environment variables.)

The same commands should work for zlib by replacing every “libuv” above with “zlib”. The only thing you should need to figure out is the correct value for BLD_NUM. For that, in your Couchbase Server repo sync, look at tlm/deps/manifest.cmake; for libuv, you’ll see something like

DECLARE_DEP (libuv V2 VERSION 1.20.3 BUILD 17 PLATFORMS amzn2 centos7 debian8 debian9 macosx suse12 suse15 ubuntu16.04 ubuntu18.04 windows_msvc2017)

The “BUILD 17” part tells you the build number to use. If you’re not building for any of the supported platforms as listed above, then you can use whatever BLD_NUM you like; just add the corresponding DECLARE_DEP() in tlm/deps/manifest.cmake .

1 Like

Thanks a lot for the detailed explanation
I have been able to build these dependencies using steps mentioned

for libuuv
$ ls ~/cb_dependencies/packages/libuv/1.20.3/17/
libuv-ubuntu16.04-ppc64le-1.20.3-17.md5 libuv-ubuntu16.04-ppc64le-1.20.3-17.tgz

for zlib
$ ls ~/cb_dependencies/packages/zlib/1.2.11/4/
zlib-ubuntu16.04-ppc64le-1.2.11-4.md5 zlib-ubuntu16.04-ppc64le-1.2.11-4.tgz

Closing this issue .