From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp46.i.mail.ru (smtp46.i.mail.ru [94.100.177.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 0549246970E for ; Wed, 18 Dec 2019 05:33:39 +0300 (MSK) Date: Wed, 18 Dec 2019 05:33:36 +0300 From: Alexander Turenko Message-ID: <20191218023335.6olxxxqeyj7qhyhb@tkn_work_nb> References: <20191125135347.5105-1-sergepetrenko@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191125135347.5105-1-sergepetrenko@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH] build: link bundled libcurl with c-ares List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Serge Petrenko Cc: tarantool-patches@dev.tarantool.org I brief: I would compare build times of c-ares with `./configure && make -j` against `cmake . && make -j` and let's start with using ./configure if the difference is not significant, but otherwise use CMake from beginning. See other thoughts below. WBR, Alexander Turenko. ---- I guess that src/CMakeLists.txt will give a warning on static build: see around `${libstatic} STREQUAL bundled-libcurl` line. I also guess that using CMake for luajit, curl and c-ares may solve several problems: build time, passing toolchain and Mac OS specific flags, handling -DCMAKE_BUILD_TYPE in subprojects, clean out-of-source build. Let's verify at least build time: if ./configure adds much time, then we'll make other developers angry. Maybe it worth to use CMake for c-ares from begnning. Don't sure whether it worth to copy CMakeLists.txt from c-ares to our cmake/ directory. Let's start w/o copy and consider to do it if we'll need to change something. I don't sure which pros and cons have using of ExternalProject(), it seems we should look a bit into this. I also don't sure whether tarantool-specific flags will be passed for c-ares when we'll use CMake (with / without ExternalProject()). Some of them we should pass (such as -UNDEBUG that is set by -DCMAKE_BUILD_TYPE=Debug), some maybe not (need to verify add_compile_flags() macro calls at least). Sergey V. will work on https://github.com/tarantool/tarantool/issues/4444 , maybe it worth to cooperate. (CCed him.) Is c-ares depends on some libraries? WBR, Alexander Turenko. On Mon, Nov 25, 2019 at 04:53:47PM +0300, Serge Petrenko wrote: > libcurl has a built-in threaded resolver used for asynchronous DNS > requests, however, when DNS server is slow to respond, the request still > hangs tarantool until it is finished. The reason is that curl calls > thread_join on the resolving thread internally upon timeout, making the > calling thread hang until resolution has ended. > Use c-ares as an asynchronous resolver instead to eliminate the problem. > > Closes #4591 > --- > https://github.com/tarantool/tarantool/issues/4591 > https://github.com/tarantool/tarantool/tree/sp/gh-4591-link-curl-with-c-ares-full-ci