* [Tarantool-patches] [PATCH v3] build: enable cmake in curl build @ 2020-10-08 8:03 Alexander V. Tikhonov 2020-10-08 8:05 ` [Tarantool-patches] [PATCH v1] build: make curl symbols global Alexander V. Tikhonov ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: Alexander V. Tikhonov @ 2020-10-08 8:03 UTC (permalink / raw) To: Igor Munkin, Kirill Yukhin; +Cc: tarantool-patches, Alexander Turenko Initially tryed to change autoconf tools in Curl build to cmake and found the following build issue on: CentOS 6,7 Debian 8 Ubuntu 14.04 Issue found: CMake Error at CMakeLists.txt:41 (cmake_minimum_required): CMake 3.0 or higher is required. You are running version 2.8.12.2 To fix the issue removed the check of the version from curl sources in Tarantool's third party '<root Tarantool sources>/third_party/curl': 12af024bc85606b14ffc415413a7e86e6bbee7eb "Enable curl build with old cmake" After this fix completely changed autoconf to cmake in curl build. Autoconf part completely removed and code cleaned up for cmake. For curl cmake build all autoconf options were ported to cmake configuration call, check the accurate list of the change in [1]. Also the following issues resolved: 1. Found that CURL cmake configuration file: third_party/curl/lib/CMakeLists.txt has installation part for built libcurl.a library: install(TARGETS ${LIB_NAME} EXPORT ${TARGETS_EXPORT_NAME} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} where it changes CMAKE_INSTALL_LIBDIR to appropriate name with suffix of the architecture, like: lib lib64 x86_64 Found that find_library routine from the file: cmake/FindLibCURL.cmake returns only 'lib' value and it breaks the building of the depends binaries. To avoid of it the CMAKE_INSTALL_LIBDIR option was set to cmake call: -DCMAKE_INSTALL_LIBDIR=lib 2. Found issue with building on CentOS 6: Linking C executable curl build/ares/dest/lib/libcares.a(ares__timeval.c.o): In function `ares__tvnow': ares__timeval.c:(.text+0x15): undefined reference to `clock_gettime' collect2: error: ld returned 1 exit status It was fixed with added "-lrt" flag to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS build flags, when cmake version is lower than 3.0 and RT library had needed function. 3. Found issues with building Tarantool statically on Debian 9 and its package build on CentOS 8. Building statically got the issues with openssl linking, like [2]: static-build/openssl-prefix/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_lock_new': threads_pthread.c:(.text+0x45): undefined reference to `pthread_rwlock_init' It happened because in openssl radically changed how threads-related things were handled before 1.1.0 version. It required the application to provide us with the locking functionality in form of callbacks. Since 1.1.0, these matters are entirely internal, so libcrypto requires the presence of the platform specific thread implementation of our choosing, which is pthread on everything. After '-pthread' added to C compile flags package build on CentOS 8 failed with the issue [3]: /build/usr/src/debug/tarantool-2.6.0.141/third_party/curl/lib/warnless.c:101:4: error: #error "SIZEOF_CURL_OFF_T not defined" # error "SIZEOF_CURL_OFF_T not defined" ^~~~~ /build/usr/src/debug/tarantool-2.6.0.141/third_party/curl/lib/warnless.c: In function 'curlx_uztoso': /build/usr/src/debug/tarantool-2.6.0.141/third_party/curl/lib/warnless.c:192:40: error: 'CURL_MASK_SCOFFT' undeclared (first use in this function); did you mean 'CURL_MASK_SINT'? return (curl_off_t)(uznum & (size_t) CURL_MASK_SCOFFT); ^~~~~~~~~~~~~~~~ CURL_MASK_SINT To avoid of the issue decided to use '-pthread' flag only for openssl when it had not this flag in openssl compilation: # check '-pthread' in openssl compile options execute_process(COMMAND openssl version -f OUTPUT_VARIABLE OPENSSL_COMPILE_OPTIONS) # add pthread library for openssl static library linking if(NOT OPENSSL_COMPILE_OPTIONS MATCHES ".* -pthread .*") list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_C_FLAGS=-pthread") endif() 4. Found issue with static build using CentOS 7, where SSL cmake rule failed. Building the image got the issue: [ 1%] Performing configure step for 'bundled-libcurl-project' CMake Warning at CMakeLists.txt:50 (message): the curl cmake build system is poorly maintained. Be aware -- curl version=[7.66.0-DEV] -- Found c-ares: /tarantool/build/ares/dest/lib/libcares.a Found *nroff option: -- -man CMake Error at /usr/share/cmake/Modules/FindOpenSSL.cmake:278 (list): list GET given empty list Call Stack (most recent call first): CMakeLists.txt:347 (find_package) Root cause of the issue that Dockerfile uses globaly installed openSSL with: cmake ... -DOPENSSL_ROOT_DIR=/usr/local ... Its cmake build file: /usr/share/cmake/Modules/FindOpenSSL.cmake fails on parsing the SSL version: it has: REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*") but it should to use: REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*") Anyway we want to use the same OpenSSL library for libcurl, as is used for Tarantool itself. So the path to it set for cURL build: list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_MODULE_PATH=${PROJECT_SOURCE_DIR}/cmake") Closes #4968 Closes #5396 Closes #5019 [1] - https://github.com/tarantool/tarantool/issues/4968#issue-617183031 [2] - https://gitlab.com/tarantool/tarantool/-/jobs/779176133#L6021 [3] - https://gitlab.com/tarantool/tarantool/-/jobs/778309145#L3060 --- Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4874-out-of-source-build-full-ci Issue: https://github.com/tarantool/tarantool/issues/4968 Issue: https://github.com/tarantool/tarantool/issues/5396 Issue: https://github.com/tarantool/tarantool/issues/5019 V3: Added explicitly all disabled flags. Fixed #5396. Removed fix for #5020 as not needed now. cmake/BuildLibCURL.cmake | 249 +++++++++++++++++++-------------------- 1 file changed, 118 insertions(+), 131 deletions(-) diff --git a/cmake/BuildLibCURL.cmake b/cmake/BuildLibCURL.cmake index 86fec39e9..911e49f11 100644 --- a/cmake/BuildLibCURL.cmake +++ b/cmake/BuildLibCURL.cmake @@ -3,11 +3,12 @@ macro(curl_build) set(LIBCURL_SOURCE_DIR ${PROJECT_SOURCE_DIR}/third_party/curl) set(LIBCURL_BINARY_DIR ${PROJECT_BINARY_DIR}/build/curl/work) set(LIBCURL_INSTALL_DIR ${PROJECT_BINARY_DIR}/build/curl/dest) + set(LIBCURL_CMAKE_FLAGS "") message(STATUS "Looking for zlib") find_path(ZLIB_INCLUDE_DIR zlib.h) message(STATUS "Looking for zlib.h - ${ZLIB_INCLUDE_DIR}") - if (BUILD_STATIC) + if(BUILD_STATIC) set(LIBZ_LIB_NAME libz.a) else() set(LIBZ_LIB_NAME z) @@ -15,44 +16,125 @@ macro(curl_build) find_library(LIBZ_LIBRARY NAMES ${LIBZ_LIB_NAME}) message(STATUS "Looking for libz - ${LIBZ_LIBRARY}") - if (NOT ZLIB_INCLUDE_DIR OR NOT LIBZ_LIBRARY) + if(NOT ZLIB_INCLUDE_DIR OR NOT LIBZ_LIBRARY) message(FATAL_ERROR "Unable to find zlib") endif() get_filename_component(FOUND_ZLIB_ROOT_DIR ${ZLIB_INCLUDE_DIR} DIRECTORY) + list(APPEND LIBCURL_CMAKE_FLAGS "-DZLIB_ROOT=${FOUND_ZLIB_ROOT_DIR}") + + # check '-pthread' in openssl compile options + execute_process(COMMAND openssl version -f + OUTPUT_VARIABLE OPENSSL_COMPILE_OPTIONS) + # add pthread library for openssl static library linking + if(NOT OPENSSL_COMPILE_OPTIONS MATCHES ".* -pthread .*") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_C_FLAGS=-pthread") + endif() + + # add librt for clock_gettime function definition + if(${CMAKE_MAJOR_VERSION} VERSION_LESS "3") + CHECK_LIBRARY_EXISTS (rt clock_gettime "" HAVE_LIBRT) + if (HAVE_LIBRT) + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_C_FLAGS=-lrt") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_CXX_FLAGS=-lrt") + endif() + endif() + + # switch on the static build + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_STATICLIB=ON") - # Use the same OpenSSL library for libcurl as is used for - # tarantool itself. + # switch off the shared build + list(APPEND LIBCURL_CMAKE_FLAGS "-DBUILD_SHARED_LIBS=OFF") + + # let's disable testing for curl to save build time + list(APPEND LIBCURL_CMAKE_FLAGS "-DBUILD_TESTING=OFF") + + # Setup use of openssl, use the same OpenSSL library + # for libcurl as is used for tarantool itself. get_filename_component(FOUND_OPENSSL_ROOT_DIR ${OPENSSL_INCLUDE_DIR} DIRECTORY) - set(LIBCURL_OPENSSL_OPT "--with-ssl=${FOUND_OPENSSL_ROOT_DIR}") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_USE_OPENSSL=ON") + list(APPEND LIBCURL_CMAKE_FLAGS "-DOPENSSL_ROOT_DIR=${FOUND_OPENSSL_ROOT_DIR}") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_MODULE_PATH=${PROJECT_SOURCE_DIR}/cmake") - # Use either c-ares bundled with tarantool or - # libcurl-default threaded resolver. + # Setup ARES and its library path, use either c-ares bundled + # with tarantool or libcurl-default threaded resolver. if(BUNDLED_LIBCURL_USE_ARES) - set(ASYN_DNS_USED "ares") - set(ASYN_DNS_UNUSED "threaded-resolver") - set(ASYN_DNS_PATH "=${ARES_INSTALL_DIR}") + set(ENABLE_ARES "ON") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_FIND_ROOT_PATH=${ARES_INSTALL_DIR}") else() - set(ASYN_DNS_USED "threaded-resolver") - set(ASYN_DNS_UNUSED "ares") - set(ASYN_DNS_PATH "") - endif() - - set(ENABLED_DNS_OPT "--enable-${ASYN_DNS_USED}${ASYN_DNS_PATH}") - set(DISABLED_DNS_OPT "--disable-${ASYN_DSN_UNUSED}") - - # Pass -isysroot=<SDK_PATH> option on Mac OS to a preprocessor - # and a C compiler to find header files installed with an SDK. - # - # The idea here is to don't pass all compiler/linker options - # that is set for tarantool, but only a subset that is - # necessary for choosen toolchain, and let curl's configure - # script set options that are appropriate for libcurl. - set(LIBCURL_CPPFLAGS "") - set(LIBCURL_CFLAGS "") - if (TARGET_OS_DARWIN AND NOT "${CMAKE_OSX_SYSROOT}" STREQUAL "") - set(LIBCURL_CPPFLAGS "${LIBCURL_CPPFLAGS} ${CMAKE_C_SYSROOT_FLAG} ${CMAKE_OSX_SYSROOT}") - set(LIBCURL_CFLAGS "${LIBCURL_CFLAGS} ${CMAKE_C_SYSROOT_FLAG} ${CMAKE_OSX_SYSROOT}") + set(ENABLE_ARES "OFF") endif() + list(APPEND LIBCURL_CMAKE_FLAGS "-DENABLE_ARES=${ENABLE_ARES}") + + # switch off the group of protocols with special flag HTTP_ONLY: + # ftp, file, ldap, ldaps, rtsp, dict, telnet, tftp, pop3, imap, smtp + list(APPEND LIBCURL_CMAKE_FLAGS "-DHTTP_ONLY=ON") + + # additionaly disable some more protocols + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_SMB=ON") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_GOPHER=ON") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_CRYPTO_AUTH=ON") + + # switch on ca-fallback feature + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_CA_FALLBACK=ON") + + # Even though we set the external project's install dir + # below, we still need to pass the corresponding install + # prefix via cmake arguments. + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_INSTALL_PREFIX=${LIBCURL_INSTALL_DIR}") + + # The default values for the options below are not always + # "./lib", "./bin" and "./include", while curl expects them + # to be. + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_INSTALL_LIBDIR=lib") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_INSTALL_INCLUDEDIR=include") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_INSTALL_BINDIR=bin") + + # Pass the same toolchain as is used to build tarantool itself, + # because they can be incompatible. + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_LINKER=${CMAKE_LINKER}") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_AR=${CMAKE_AR}") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_RANLIB=${CMAKE_RANLIB}") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_NM=${CMAKE_NM}") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_STRIP=${CMAKE_STRIP}") + + # In hardened mode, which enables -fPIE by default, + # the cmake checks don't work without -fPIC. + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_REQUIRED_FLAGS=-fPIC") + + # Need to set values explicitly everything that is default, because + # we don't know how defaults will be changed in a future and we don't + # want to verify them each time we'll bump new libcurl version. + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_BROTLI=OFF") + list(APPEND LIBCURL_CMAKE_FLAGS "-DUSE_GNUTLS=OFF") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_USE_MBEDTLS=OFF") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_USE_WOLFSSL=OFF") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_USE_NSS=OFF") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_CA_BUNDLE=none") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_CA_PATH=none") + list(APPEND LIBCURL_CMAKE_FLAGS "-DUSE_LIBRTMP=OFF") + list(APPEND LIBCURL_CMAKE_FLAGS "-DHAVE_LIBIDN2=OFF") + list(APPEND LIBCURL_CMAKE_FLAGS "-DUSE_NGHTTP2=OFF") + list(APPEND LIBCURL_CMAKE_FLAGS "-DUSE_NGTCP2=OFF") + list(APPEND LIBCURL_CMAKE_FLAGS "-DUSE_NGHTTP3=OFF") + list(APPEND LIBCURL_CMAKE_FLAGS "-DUSE_QUICHE=OFF") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_HTTP=OFF") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_PROXY=OFF") + list(APPEND LIBCURL_CMAKE_FLAGS "-DENABLE_IPV6=ON") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_COOKIES=OFF") + list(APPEND LIBCURL_CMAKE_FLAGS "-DENABLE_UNIX_SOCKETS=ON") + # should be already set by "-DHTTP_ONLY=ON" above + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_FTP=ON") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_FILE=ON") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_LDAP=ON") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_LDAPS=ON") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_RTSP=ON") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_DICT=ON") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_TELNET=ON") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_TFTP=ON") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_POP3=ON") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_IMAP=ON") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_DISABLE_SMTP=ON") include(ExternalProject) ExternalProject_Add( @@ -62,101 +144,11 @@ macro(curl_build) DOWNLOAD_DIR ${LIBCURL_BINARY_DIR} TMP_DIR ${LIBCURL_BINARY_DIR}/tmp STAMP_DIR ${LIBCURL_BINARY_DIR}/stamp - BINARY_DIR ${LIBCURL_BINARY_DIR} + BINARY_DIR ${LIBCURL_BINARY_DIR}/curl CONFIGURE_COMMAND - cd <SOURCE_DIR> && ./buildconf && - cd <BINARY_DIR> && <SOURCE_DIR>/configure - # Pass the same toolchain as is used to build - # tarantool itself, because they can be - # incompatible. - CC=${CMAKE_C_COMPILER} - LD=${CMAKE_LINKER} - AR=${CMAKE_AR} - RANLIB=${CMAKE_RANLIB} - NM=${CMAKE_NM} - STRIP=${CMAKE_STRIP} - - # Pass -isysroot=<SDK_PATH> option on Mac OS, see - # above. - # Note: Passing of CPPFLAGS / CFLAGS explicitly - # discards using of corresponsing environment - # variables. - CPPFLAGS=${LIBCURL_CPPFLAGS} - CFLAGS=${LIBCURL_CFLAGS} - - # Pass empty LDFLAGS to discard using of - # corresponding environment variable. - # It is possible that a linker flag assumes that - # some compilation flag is set. We don't pass - # CFLAGS from environment, so we should not do it - # for LDFLAGS too. - LDFLAGS= - - --prefix <INSTALL_DIR> - --enable-static - --disable-shared - --disable-symbol-hiding - - --with-zlib=${FOUND_ZLIB_ROOT_DIR} - ${LIBCURL_OPENSSL_OPT} - --with-ca-fallback - - --without-brotli - --without-gnutls - --without-mbedtls - --without-cyassl - --without-wolfssl - --without-mesalink - --without-nss - --without-ca-bundle - --without-ca-path - --without-libpsl - --without-libmetalink - --without-librtmp - --without-winidn - --without-libidn2 - --without-nghttp2 - --without-ngtcp2 - --without-nghttp3 - --without-quiche - --without-zsh-functions-dir - --without-fish-functions-dir - - ${ENABLED_DNS_OPT} - --enable-http - --enable-proxy - --enable-ipv6 - --enable-unix-sockets - --enable-cookies - --enable-http-auth - --enable-mime - --enable-dateparse - - ${DISABLED_DNS_OPT} - --disable-ftp - --disable-file - --disable-ldap - --disable-ldaps - --disable-rtsp - --disable-dict - --disable-telnet - --disable-tftp - --disable-pop3 - --disable-imap - --disable-smb - --disable-smtp - --disable-gopher - --disable-manual - --disable-sspi - --disable-crypto-auth - --disable-ntlm-wb - --disable-tls-srp - --disable-doh - --disable-netrc - --disable-progress-meter - --disable-dnsshuffle - --disable-alt-svc - BUILD_COMMAND cd <BINARY_DIR> && $(MAKE) + cd <BINARY_DIR> && cmake <SOURCE_DIR> + ${LIBCURL_CMAKE_FLAGS} + BUILD_COMMAND cd <BINARY_DIR> && $(MAKE) -j INSTALL_COMMAND cd <BINARY_DIR> && $(MAKE) install) add_library(bundled-libcurl STATIC IMPORTED GLOBAL) @@ -168,6 +160,7 @@ macro(curl_build) endif() add_dependencies(bundled-libcurl bundled-libcurl-project) + # setup CURL_INCLUDE_DIRS & CURL_LIBRARIES for global use set(CURL_INCLUDE_DIRS ${LIBCURL_INSTALL_DIR}/include) set(CURL_LIBRARIES bundled-libcurl ${LIBZ_LIBRARY}) if (BUNDLED_LIBCURL_USE_ARES) @@ -177,13 +170,7 @@ macro(curl_build) set(CURL_LIBRARIES ${CURL_LIBRARIES} rt) endif() - unset(ASYN_DNS_USED) - unset(ASYN_DNS_UNUSED) - unset(ASYN_DNS_PATH) - unset(ENABLED_DNS_OPT) - unset(DISABLED_DNS_OPT) - unset(LIBCURL_CPPFLAGS) - unset(LIBCURL_CFLAGS) + unset(FOUND_ZLIB_ROOT_DIR) unset(FOUND_OPENSSL_ROOT_DIR) unset(LIBCURL_INSTALL_DIR) unset(LIBCURL_BINARY_DIR) -- 2.25.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Tarantool-patches] [PATCH v1] build: make curl symbols global 2020-10-08 8:03 [Tarantool-patches] [PATCH v3] build: enable cmake in curl build Alexander V. Tikhonov @ 2020-10-08 8:05 ` Alexander V. Tikhonov 2020-10-13 11:47 ` Igor Munkin 2020-10-08 8:09 ` [Tarantool-patches] [PATCH v1] gitlab-ci: add out-of-source build Alexander V. Tikhonov 2020-10-12 18:52 ` [Tarantool-patches] [PATCH v3] build: enable cmake in curl build Igor Munkin 2 siblings, 1 reply; 10+ messages in thread From: Alexander V. Tikhonov @ 2020-10-08 8:05 UTC (permalink / raw) To: Igor Munkin, Kirill Yukhin; +Cc: tarantool-patches, Alexander Turenko Building using cmake got issue in testing: [043] box-tap/gh-5223-curl-exports.test.lua [ fail ] [043] Test failed! Output from reject file box-tap/gh-5223-curl-exports.reject: [043] [043] Last 15 lines of Tarantool Log file [Instance "app_server"][/build/usr/src/debug/tarantool-2.6.0.54/test/var/043_box-tap/gh-5223-curl-exports.test.lua.tarantool.log]: [043] LuajitError: ...tool-2.6.0.54/test/box-tap/gh-5223-curl-exports.test.lua:57: tarantool: undefined symbol: curl_version_info It happened because curl used visibility hiding mode for its symbols and the test could not use it. To fix it symbols hiding disabled for gcc and clang. Closes #5268 --- Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4874-out-of-source-build-full-ci Issue: https://github.com/tarantool/tarantool/issues/5268 third_party/curl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/curl b/third_party/curl index 5a1fc8d33..ac15de38d 160000 --- a/third_party/curl +++ b/third_party/curl @@ -1 +1 @@ -Subproject commit 5a1fc8d33808d7b22f57bdf9403cda7ff07b0670 +Subproject commit ac15de38d981f22affbc4d275a3b874e0eee57d6 -- 2.25.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Tarantool-patches] [PATCH v1] build: make curl symbols global 2020-10-08 8:05 ` [Tarantool-patches] [PATCH v1] build: make curl symbols global Alexander V. Tikhonov @ 2020-10-13 11:47 ` Igor Munkin 0 siblings, 0 replies; 10+ messages in thread From: Igor Munkin @ 2020-10-13 11:47 UTC (permalink / raw) To: Alexander V. Tikhonov; +Cc: tarantool-patches, Alexander Turenko Sasha, Thanks for the patch! Please, don't take it personal, but I totally don't like it. There is no need to patch curl build system at all. The symbols are simply hidden by default[1], so you to set the proper option to CMake. Consider the following changes: ================================================================================ diff --git a/cmake/BuildLibCURL.cmake b/cmake/BuildLibCURL.cmake index a4e222f95..0456bfd93 100644 --- a/cmake/BuildLibCURL.cmake +++ b/cmake/BuildLibCURL.cmake @@ -48,6 +48,8 @@ macro(curl_build) # let's disable testing for curl to save build time list(APPEND LIBCURL_CMAKE_FLAGS "-DBUILD_TESTING=OFF") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_HIDDEN_SYMBOLS=OFF") + # Setup use of openssl, use the same OpenSSL library # for libcurl as is used for tarantool itself. get_filename_component(FOUND_OPENSSL_ROOT_DIR ${OPENSSL_INCLUDE_DIR} DIRECTORY) diff --git a/third_party/curl b/third_party/curl index ac15de38d..12af024bc 160000 --- a/third_party/curl +++ b/third_party/curl @@ -1 +1 @@ -Subproject commit ac15de38d981f22affbc4d275a3b874e0eee57d6 +Subproject commit 12af024bc85606b14ffc415413a7e86e6bbee7eb ================================================================================ After these changes the tests are fine on my machine. On 08.10.20, Alexander V. Tikhonov wrote: > Building using cmake got issue in testing: > > [043] box-tap/gh-5223-curl-exports.test.lua [ fail ] > [043] Test failed! Output from reject file box-tap/gh-5223-curl-exports.reject: > [043] > [043] Last 15 lines of Tarantool Log file [Instance "app_server"][/build/usr/src/debug/tarantool-2.6.0.54/test/var/043_box-tap/gh-5223-curl-exports.test.lua.tarantool.log]: > [043] LuajitError: ...tool-2.6.0.54/test/box-tap/gh-5223-curl-exports.test.lua:57: tarantool: undefined symbol: curl_version_info > > It happened because curl used visibility hiding mode for its symbols > and the test could not use it. To fix it symbols hiding disabled for > gcc and clang. > > Closes #5268 > --- > > Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4874-out-of-source-build-full-ci > Issue: https://github.com/tarantool/tarantool/issues/5268 > > third_party/curl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/third_party/curl b/third_party/curl > index 5a1fc8d33..ac15de38d 160000 > --- a/third_party/curl > +++ b/third_party/curl > @@ -1 +1 @@ > -Subproject commit 5a1fc8d33808d7b22f57bdf9403cda7ff07b0670 > +Subproject commit ac15de38d981f22affbc4d275a3b874e0eee57d6 For the protocol, here is your patch for curl build system: ================================================================================ diff --git a/CMake/CurlSymbolHiding.cmake b/CMake/CurlSymbolHiding.cmake index aaac9fead..fb77eed69 100644 --- a/CMake/CurlSymbolHiding.cmake +++ b/CMake/CurlSymbolHiding.cmake @@ -28,15 +28,15 @@ if(CURL_HIDDEN_SYMBOLS) set(SUPPORTS_SYMBOL_HIDING FALSE) if(CMAKE_C_COMPILER_ID MATCHES "Clang") - set(SUPPORTS_SYMBOL_HIDING TRUE) - set(_SYMBOL_EXTERN "__attribute__ ((__visibility__ (\"default\")))") - set(_CFLAG_SYMBOLS_HIDE "-fvisibility=hidden") + set(SUPPORTS_SYMBOL_HIDING FALSE) + set(_SYMBOL_EXTERN "") + set(_CFLAG_SYMBOLS_HIDE "") elseif(CMAKE_COMPILER_IS_GNUCC) if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4) # note: this is considered buggy prior to 4.0 but the autotools don't care, so let's ignore that fact - set(SUPPORTS_SYMBOL_HIDING TRUE) - set(_SYMBOL_EXTERN "__attribute__ ((__visibility__ (\"default\")))") - set(_CFLAG_SYMBOLS_HIDE "-fvisibility=hidden") + set(SUPPORTS_SYMBOL_HIDING FALSE) + set(_SYMBOL_EXTERN "") + set(_CFLAG_SYMBOLS_HIDE "") endif() elseif(CMAKE_C_COMPILER_ID MATCHES "SunPro" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 8.0) set(SUPPORTS_SYMBOL_HIDING TRUE) ================================================================================ > -- > 2.25.1 > -- Best regards, IM ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Tarantool-patches] [PATCH v1] gitlab-ci: add out-of-source build 2020-10-08 8:03 [Tarantool-patches] [PATCH v3] build: enable cmake in curl build Alexander V. Tikhonov 2020-10-08 8:05 ` [Tarantool-patches] [PATCH v1] build: make curl symbols global Alexander V. Tikhonov @ 2020-10-08 8:09 ` Alexander V. Tikhonov 2020-10-13 20:39 ` Igor Munkin 2020-10-12 18:52 ` [Tarantool-patches] [PATCH v3] build: enable cmake in curl build Igor Munkin 2 siblings, 1 reply; 10+ messages in thread From: Alexander V. Tikhonov @ 2020-10-08 8:09 UTC (permalink / raw) To: Igor Munkin, Kirill Yukhin; +Cc: tarantool-patches, Alexander Turenko Implemented out-of-source build at cmake files. Added out of source build make targets and added test job to gitlab-ci. Closes #4874 --- Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4874-out-of-source-build-full-ci Issue: https://github.com/tarantool/tarantool/issues/4874 .gitlab-ci.yml | 7 +++++++ .travis.mk | 26 +++++++++++++++++++++++++- cmake/utils.cmake | 4 ++-- src/box/CMakeLists.txt | 1 + 4 files changed, 35 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d40dc74e3..d5dc52f82 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -174,6 +174,13 @@ luacheck: # Tests +out_of_source: + stage: test + tags: + - deploy_test + script: + - ${GITLAB_MAKE} test_oos_build + release: <<: *docker_test_definition script: diff --git a/.travis.mk b/.travis.mk index d797472e2..5730e1097 100644 --- a/.travis.mk +++ b/.travis.mk @@ -7,7 +7,9 @@ DOCKER_IMAGE_TARANTOOL="registry.gitlab.com/tarantool/tarantool/testing/debian-s TEST_RUN_EXTRA_PARAMS?= MAX_FILES?=65534 MAX_PROC?=2500 -OOS_SRC_PATH="/source" +OOS_SRC_PATH?="/source" +OOS_BUILD_PATH?="/rw_bins" +OOS_BUILD_RULE?=test_oos_no_deps BIN_DIR=/usr/local/bin OSX_VARDIR?=/tmp/tnt @@ -207,6 +209,28 @@ test_debian_install_luacheck: test_debian_luacheck: test_debian_install_luacheck configure_debian make luacheck +# Out-Of-Source build + +build_oos: + mkdir ${OOS_BUILD_PATH} 2>/dev/null || : ; \ + cd ${OOS_BUILD_PATH} && \ + cmake ${OOS_SRC_PATH} ${CMAKE_EXTRA_PARAMS} && \ + make -j + +test_oos_no_deps: build_oos + cd ${OOS_BUILD_PATH}/test && \ + ${OOS_SRC_PATH}/test/test-run.py \ + --builddir ${OOS_BUILD_PATH} \ + --vardir ${OOS_BUILD_PATH}/test/var --force + +test_oos: deps_debian test_oos_no_deps + +test_oos_build: + docker run --network=host -w ${OOS_SRC_PATH} \ + --mount type=bind,source="${PWD}",target=${OOS_SRC_PATH},readonly,bind-propagation=rslave \ + -i ${DOCKER_IMAGE_TARANTOOL} \ + make -f .travis.mk ${OOS_BUILD_RULE} + ####### # OSX # ####### diff --git a/cmake/utils.cmake b/cmake/utils.cmake index 3ab2d3ff2..eaec821b3 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -70,9 +70,9 @@ endfunction() function(bin_source varname srcfile dstfile) set(var ${${varname}}) - set(${varname} ${var} ${dstfile} PARENT_SCOPE) set (srcfile "${CMAKE_CURRENT_SOURCE_DIR}/${srcfile}") - set (dstfile "${CMAKE_CURRENT_SOURCE_DIR}/${dstfile}") + set (dstfile "${CMAKE_CURRENT_BINARY_DIR}/${dstfile}") + set(${varname} ${var} "${dstfile}" PARENT_SCOPE) set (tmpfile "${dstfile}.tmp") get_filename_component(module ${dstfile} NAME_WE) diff --git a/src/box/CMakeLists.txt b/src/box/CMakeLists.txt index 8b2e704cf..6e25401a1 100644 --- a/src/box/CMakeLists.txt +++ b/src/box/CMakeLists.txt @@ -77,6 +77,7 @@ set_property(DIRECTORY PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${lua_sources}) include_directories(${ZSTD_INCLUDE_DIRS}) include_directories(${CMAKE_BINARY_DIR}/src/box/sql) +include_directories(${CMAKE_BINARY_DIR}/src/box) add_library(vclock STATIC vclock.c) target_link_libraries(vclock core bit) -- 2.25.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Tarantool-patches] [PATCH v1] gitlab-ci: add out-of-source build 2020-10-08 8:09 ` [Tarantool-patches] [PATCH v1] gitlab-ci: add out-of-source build Alexander V. Tikhonov @ 2020-10-13 20:39 ` Igor Munkin 2020-10-14 9:07 ` Alexander V. Tikhonov 0 siblings, 1 reply; 10+ messages in thread From: Igor Munkin @ 2020-10-13 20:39 UTC (permalink / raw) To: Alexander V. Tikhonov; +Cc: tarantool-patches, Alexander Turenko Sasha, Thanks for the patch! On 08.10.20, Alexander V. Tikhonov wrote: > Implemented out-of-source build at cmake files. > Added out of source build make targets and added > test job to gitlab-ci. Minor: IIRC, commit message body is up to 72 characters width. > > Closes #4874 > --- > > Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4874-out-of-source-build-full-ci > Issue: https://github.com/tarantool/tarantool/issues/4874 > > .gitlab-ci.yml | 7 +++++++ > .travis.mk | 26 +++++++++++++++++++++++++- > cmake/utils.cmake | 4 ++-- > src/box/CMakeLists.txt | 1 + > 4 files changed, 35 insertions(+), 3 deletions(-) > <snipped> I guess the changes below are not related to gitlab-ci, but out-of-source build per se, are they? If so, please don't mix it here and move it to a separate patch. > diff --git a/cmake/utils.cmake b/cmake/utils.cmake > index 3ab2d3ff2..eaec821b3 100644 > --- a/cmake/utils.cmake > +++ b/cmake/utils.cmake > @@ -70,9 +70,9 @@ endfunction() > > function(bin_source varname srcfile dstfile) > set(var ${${varname}}) > - set(${varname} ${var} ${dstfile} PARENT_SCOPE) > set (srcfile "${CMAKE_CURRENT_SOURCE_DIR}/${srcfile}") > - set (dstfile "${CMAKE_CURRENT_SOURCE_DIR}/${dstfile}") > + set (dstfile "${CMAKE_CURRENT_BINARY_DIR}/${dstfile}") > + set(${varname} ${var} "${dstfile}" PARENT_SCOPE) > set (tmpfile "${dstfile}.tmp") > get_filename_component(module ${dstfile} NAME_WE) > > diff --git a/src/box/CMakeLists.txt b/src/box/CMakeLists.txt > index 8b2e704cf..6e25401a1 100644 > --- a/src/box/CMakeLists.txt > +++ b/src/box/CMakeLists.txt > @@ -77,6 +77,7 @@ set_property(DIRECTORY PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${lua_sources}) > > include_directories(${ZSTD_INCLUDE_DIRS}) > include_directories(${CMAKE_BINARY_DIR}/src/box/sql) > +include_directories(${CMAKE_BINARY_DIR}/src/box) I see no difference in build logs related to these changes. > > add_library(vclock STATIC vclock.c) > target_link_libraries(vclock core bit) > -- > 2.25.1 > -- Best regards, IM ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Tarantool-patches] [PATCH v1] gitlab-ci: add out-of-source build 2020-10-13 20:39 ` Igor Munkin @ 2020-10-14 9:07 ` Alexander V. Tikhonov 0 siblings, 0 replies; 10+ messages in thread From: Alexander V. Tikhonov @ 2020-10-14 9:07 UTC (permalink / raw) To: Igor Munkin; +Cc: tarantool-patches Hi Igor, thanks for the review, I've made all your suggestions and created 2 new separate patches, please check it too. On Tue, Oct 13, 2020 at 11:39:48PM +0300, Igor Munkin wrote: > Sasha, > > Thanks for the patch! > > On 08.10.20, Alexander V. Tikhonov wrote: > > Implemented out-of-source build at cmake files. > > Added out of source build make targets and added > > test job to gitlab-ci. > > Minor: IIRC, commit message body is up to 72 characters width. > > > > > Closes #4874 > > --- > > > > Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4874-out-of-source-build-full-ci > > Issue: https://github.com/tarantool/tarantool/issues/4874 > > > > .gitlab-ci.yml | 7 +++++++ > > .travis.mk | 26 +++++++++++++++++++++++++- > > cmake/utils.cmake | 4 ++-- > > src/box/CMakeLists.txt | 1 + > > 4 files changed, 35 insertions(+), 3 deletions(-) > > > > <snipped> > > I guess the changes below are not related to gitlab-ci, but > out-of-source build per se, are they? If so, please don't mix it here > and move it to a separate patch. > > > diff --git a/cmake/utils.cmake b/cmake/utils.cmake > > index 3ab2d3ff2..eaec821b3 100644 > > --- a/cmake/utils.cmake > > +++ b/cmake/utils.cmake > > @@ -70,9 +70,9 @@ endfunction() > > > > function(bin_source varname srcfile dstfile) > > set(var ${${varname}}) > > - set(${varname} ${var} ${dstfile} PARENT_SCOPE) > > set (srcfile "${CMAKE_CURRENT_SOURCE_DIR}/${srcfile}") > > - set (dstfile "${CMAKE_CURRENT_SOURCE_DIR}/${dstfile}") > > + set (dstfile "${CMAKE_CURRENT_BINARY_DIR}/${dstfile}") > > + set(${varname} ${var} "${dstfile}" PARENT_SCOPE) > > set (tmpfile "${dstfile}.tmp") > > get_filename_component(module ${dstfile} NAME_WE) > > > > diff --git a/src/box/CMakeLists.txt b/src/box/CMakeLists.txt > > index 8b2e704cf..6e25401a1 100644 > > --- a/src/box/CMakeLists.txt > > +++ b/src/box/CMakeLists.txt > > @@ -77,6 +77,7 @@ set_property(DIRECTORY PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${lua_sources}) > > > > include_directories(${ZSTD_INCLUDE_DIRS}) > > include_directories(${CMAKE_BINARY_DIR}/src/box/sql) > > +include_directories(${CMAKE_BINARY_DIR}/src/box) > > I see no difference in build logs related to these changes. > > > > > add_library(vclock STATIC vclock.c) > > target_link_libraries(vclock core bit) > > -- > > 2.25.1 > > > > -- > Best regards, > IM ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Tarantool-patches] [PATCH v3] build: enable cmake in curl build 2020-10-08 8:03 [Tarantool-patches] [PATCH v3] build: enable cmake in curl build Alexander V. Tikhonov 2020-10-08 8:05 ` [Tarantool-patches] [PATCH v1] build: make curl symbols global Alexander V. Tikhonov 2020-10-08 8:09 ` [Tarantool-patches] [PATCH v1] gitlab-ci: add out-of-source build Alexander V. Tikhonov @ 2020-10-12 18:52 ` Igor Munkin 2020-10-13 10:20 ` Igor Munkin 2020-10-14 9:12 ` Alexander V. Tikhonov 2 siblings, 2 replies; 10+ messages in thread From: Igor Munkin @ 2020-10-12 18:52 UTC (permalink / raw) To: Alexander V. Tikhonov; +Cc: tarantool-patches, Alexander Turenko Sasha, Thanks for the patch! On 08.10.20, Alexander V. Tikhonov wrote: > Initially tryed to change autoconf tools in Curl build to cmake and Typo (again): s/tryed/tried/. > found the following build issue on: > CentOS 6,7 Minor: IMHO, it's better to split these lines as you did in the commit you're referring below. > Debian 8 > Ubuntu 14.04 > > Issue found: > CMake Error at CMakeLists.txt:41 (cmake_minimum_required): > CMake 3.0 or higher is required. You are running version 2.8.12.2 > > To fix the issue removed the check of the version from curl sources Typo: s/removed the check/check is removed/. > in Tarantool's third party '<root Tarantool sources>/third_party/curl': > > 12af024bc85606b14ffc415413a7e86e6bbee7eb "Enable curl build with old cmake" Minor: We mention commits in the form 0000000000000000000000000000000000000000 ('commit message header'): full 40-digits hash and the commit message header in parenthesis. > > After this fix completely changed autoconf to cmake in curl build. > Autoconf part completely removed and code cleaned up for cmake. Typo: s/removed/is removed/. > For curl cmake build all autoconf options were ported to cmake > configuration call, check the accurate list of the change in [1]. > > Also the following issues resolved: > <snipped> > 3. Found issues with building Tarantool statically on Debian 9 and > its package build on CentOS 8. > > Building statically got the issues with openssl linking, like [2]: > > static-build/openssl-prefix/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_lock_new': > threads_pthread.c:(.text+0x45): undefined reference to `pthread_rwlock_init' > > It happened because in openssl radically changed how threads-related > things were handled before 1.1.0 version. It required the application > to provide us with the locking functionality in form of callbacks. > Since 1.1.0, these matters are entirely internal, so libcrypto > requires the presence of the platform specific thread implementation > of our choosing, which is pthread on everything. > > After '-pthread' added to C compile flags package build on CentOS 8 > failed with the issue [3]: > > /build/usr/src/debug/tarantool-2.6.0.141/third_party/curl/lib/warnless.c:101:4: error: #error "SIZEOF_CURL_OFF_T not defined" > # error "SIZEOF_CURL_OFF_T not defined" > ^~~~~ > /build/usr/src/debug/tarantool-2.6.0.141/third_party/curl/lib/warnless.c: In function 'curlx_uztoso': > /build/usr/src/debug/tarantool-2.6.0.141/third_party/curl/lib/warnless.c:192:40: error: 'CURL_MASK_SCOFFT' undeclared (first use in this function); did you mean 'CURL_MASK_SINT'? > return (curl_off_t)(uznum & (size_t) CURL_MASK_SCOFFT); > ^~~~~~~~~~~~~~~~ > CURL_MASK_SINT > > To avoid of the issue decided to use '-pthread' flag only for openssl > when it had not this flag in openssl compilation: > > # check '-pthread' in openssl compile options > execute_process(COMMAND openssl version -f > OUTPUT_VARIABLE OPENSSL_COMPILE_OPTIONS) > # add pthread library for openssl static library linking > if(NOT OPENSSL_COMPILE_OPTIONS MATCHES ".* -pthread .*") > list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_C_FLAGS=-pthread") > endif() Minor: I doubt code duplication in sources and commit message makes the changes clearer :) The description above is enough (except it lacks the reason why CURL_MASK_SCOFFT is undeclared, but it looks like minor details that can be changed in future or googled by inquisitive readers) > <snipped> > > Closes #4968 > Closes #5396 > Closes #5019 Minor (again): Please sort the issues above. > > [1] - https://github.com/tarantool/tarantool/issues/4968#issue-617183031 > [2] - https://gitlab.com/tarantool/tarantool/-/jobs/779176133#L6021 > [3] - https://gitlab.com/tarantool/tarantool/-/jobs/778309145#L3060 > --- > > > Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4874-out-of-source-build-full-ci > Issue: https://github.com/tarantool/tarantool/issues/4968 > Issue: https://github.com/tarantool/tarantool/issues/5396 > Issue: https://github.com/tarantool/tarantool/issues/5019 > > V3: Added explicitly all disabled flags. > Fixed #5396. > Removed fix for #5020 as not needed now. > > cmake/BuildLibCURL.cmake | 249 +++++++++++++++++++-------------------- > 1 file changed, 118 insertions(+), 131 deletions(-) > > diff --git a/cmake/BuildLibCURL.cmake b/cmake/BuildLibCURL.cmake > index 86fec39e9..911e49f11 100644 > --- a/cmake/BuildLibCURL.cmake > +++ b/cmake/BuildLibCURL.cmake > @@ -3,11 +3,12 @@ macro(curl_build) > set(LIBCURL_SOURCE_DIR ${PROJECT_SOURCE_DIR}/third_party/curl) > set(LIBCURL_BINARY_DIR ${PROJECT_BINARY_DIR}/build/curl/work) > set(LIBCURL_INSTALL_DIR ${PROJECT_BINARY_DIR}/build/curl/dest) > + set(LIBCURL_CMAKE_FLAGS "") > > message(STATUS "Looking for zlib") > find_path(ZLIB_INCLUDE_DIR zlib.h) > message(STATUS "Looking for zlib.h - ${ZLIB_INCLUDE_DIR}") > - if (BUILD_STATIC) > + if(BUILD_STATIC) Minor: This line changes nothing except the whitespace (it looks like rebase conflict resolution). Such changes only enlarge the patch, so I believe they can be dropped. However, I have no strict objections, regarding this one, since it doesn't introduce new hunks (ergo the changes are quite local). > set(LIBZ_LIB_NAME libz.a) > else() > set(LIBZ_LIB_NAME z) > @@ -15,44 +16,125 @@ macro(curl_build) > find_library(LIBZ_LIBRARY NAMES ${LIBZ_LIB_NAME}) > message(STATUS "Looking for libz - ${LIBZ_LIBRARY}") > > - if (NOT ZLIB_INCLUDE_DIR OR NOT LIBZ_LIBRARY) > + if(NOT ZLIB_INCLUDE_DIR OR NOT LIBZ_LIBRARY) Ditto. > message(FATAL_ERROR "Unable to find zlib") > endif() <snipped> > + > + # switch off the group of protocols with special flag HTTP_ONLY: > + # ftp, file, ldap, ldaps, rtsp, dict, telnet, tftp, pop3, imap, smtp I guess this comment is irrelevant considering the options you disabled manually below. > + list(APPEND LIBCURL_CMAKE_FLAGS "-DHTTP_ONLY=ON") <snipped> > + # In hardened mode, which enables -fPIE by default, > + # the cmake checks don't work without -fPIC. > + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_REQUIRED_FLAGS=-fPIC") As a result of the offline discussion this line is removed > + <snipped> > > include(ExternalProject) > ExternalProject_Add( > @@ -62,101 +144,11 @@ macro(curl_build) <snipped> > - --disable-symbol-hiding There is <CURL_HIDDEN_SYMBOLS> option, that is ON (AFAIU, this extension[1]). So, this change is inconsistent: you drop this configure options and don't set the proper CMake flag. <snipped> > + BUILD_COMMAND cd <BINARY_DIR> && $(MAKE) -j The comment regarding this line is left unaddressed. > INSTALL_COMMAND cd <BINARY_DIR> && $(MAKE) install) <snipped> > -- > 2.25.1 > [1]: https://github.com/tarantool/curl/blob/5a1fc8d33808d7b22f57bdf9403cda7ff07b0670/CMake/CurlSymbolHiding.cmake#L24 -- Best regards, IM ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Tarantool-patches] [PATCH v3] build: enable cmake in curl build 2020-10-12 18:52 ` [Tarantool-patches] [PATCH v3] build: enable cmake in curl build Igor Munkin @ 2020-10-13 10:20 ` Igor Munkin 2020-10-14 9:08 ` Alexander V. Tikhonov 2020-10-14 9:12 ` Alexander V. Tikhonov 1 sibling, 1 reply; 10+ messages in thread From: Igor Munkin @ 2020-10-13 10:20 UTC (permalink / raw) To: Alexander V. Tikhonov; +Cc: tarantool-patches, Alexander Turenko Well, I faced the following build failure on the linking stage: | $ cmake -DCMAKE_BUILD_TYPE=Debug . && make -j | | <snipped> | | -- Found LibSSH2: /usr/lib64/libssh2.so (found version "1.9.0_DEV") | -- Looking for libssh2_version | -- Looking for libssh2_version - found | -- Looking for libssh2_init | -- Looking for libssh2_init - found | -- Looking for libssh2_exit | -- Looking for libssh2_exit - found | -- Looking for libssh2_scp_send64 | -- Looking for libssh2_scp_send64 - found | -- Looking for libssh2_session_handshake | -- Looking for libssh2_session_handshake - found | -- Performing Test USE_UNIX_SOCKETS | -- Performing Test USE_UNIX_SOCKETS - Success | -- Looking for include files /usr/include/libssh2.h, stdio.h | -- Looking for include files /usr/include/libssh2.h, stdio.h - found | -- Looking for 3 include files /usr/include/libssh2.h, ..., inttypes.h | -- Looking for 3 include files /usr/include/libssh2.h, ..., inttypes.h - found | -- Looking for 4 include files /usr/include/libssh2.h, ..., sys/filio.h | -- Looking for 4 include files /usr/include/libssh2.h, ..., sys/filio.h - not found | -- Looking for 4 include files /usr/include/libssh2.h, ..., sys/ioctl.h | -- Looking for 4 include files /usr/include/libssh2.h, ..., sys/ioctl.h - found | -- Looking for 5 include files /usr/include/libssh2.h, ..., sys/param.h | -- Looking for 5 include files /usr/include/libssh2.h, ..., sys/param.h - found | -- Looking for 6 include files /usr/include/libssh2.h, ..., sys/poll.h | -- Looking for 6 include files /usr/include/libssh2.h, ..., sys/poll.h - found | -- Looking for 7 include files /usr/include/libssh2.h, ..., sys/resource.h | -- Looking for 7 include files /usr/include/libssh2.h, ..., sys/resource.h - found | -- Looking for 8 include files /usr/include/libssh2.h, ..., sys/select.h | -- Looking for 8 include files /usr/include/libssh2.h, ..., sys/select.h - found | -- Looking for 9 include files /usr/include/libssh2.h, ..., sys/socket.h | -- Looking for 9 include files /usr/include/libssh2.h, ..., sys/socket.h - found | -- Looking for 10 include files /usr/include/libssh2.h, ..., sys/sockio.h | -- Looking for 10 include files /usr/include/libssh2.h, ..., sys/sockio.h - not found | -- Looking for 10 include files /usr/include/libssh2.h, ..., sys/stat.h | -- Looking for 10 include files /usr/include/libssh2.h, ..., sys/stat.h - found | -- Looking for 11 include files /usr/include/libssh2.h, ..., sys/time.h | -- Looking for 11 include files /usr/include/libssh2.h, ..., sys/time.h - found | -- Looking for 12 include files /usr/include/libssh2.h, ..., sys/types.h | -- Looking for 12 include files /usr/include/libssh2.h, ..., sys/types.h - found | -- Looking for 13 include files /usr/include/libssh2.h, ..., sys/uio.h | -- Looking for 13 include files /usr/include/libssh2.h, ..., sys/uio.h - found | -- Looking for 14 include files /usr/include/libssh2.h, ..., sys/un.h | -- Looking for 14 include files /usr/include/libssh2.h, ..., sys/un.h - found | -- Looking for 15 include files /usr/include/libssh2.h, ..., sys/utime.h | -- Looking for 15 include files /usr/include/libssh2.h, ..., sys/utime.h - not found | -- Looking for 15 include files /usr/include/libssh2.h, ..., sys/xattr.h | -- Looking for 15 include files /usr/include/libssh2.h, ..., sys/xattr.h - found | -- Looking for 16 include files /usr/include/libssh2.h, ..., alloca.h | -- Looking for 16 include files /usr/include/libssh2.h, ..., alloca.h - found | -- Looking for 17 include files /usr/include/libssh2.h, ..., arpa/inet.h | -- Looking for 17 include files /usr/include/libssh2.h, ..., arpa/inet.h - found | -- Looking for 18 include files /usr/include/libssh2.h, ..., arpa/tftp.h | -- Looking for 18 include files /usr/include/libssh2.h, ..., arpa/tftp.h - found | -- Looking for 19 include files /usr/include/libssh2.h, ..., assert.h | -- Looking for 19 include files /usr/include/libssh2.h, ..., assert.h - found | -- Looking for 20 include files /usr/include/libssh2.h, ..., crypto.h | -- Looking for 20 include files /usr/include/libssh2.h, ..., crypto.h - not found | -- Looking for 20 include files /usr/include/libssh2.h, ..., err.h | -- Looking for 20 include files /usr/include/libssh2.h, ..., err.h - found | -- Looking for 21 include files /usr/include/libssh2.h, ..., errno.h | -- Looking for 21 include files /usr/include/libssh2.h, ..., errno.h - found | -- Looking for 22 include files /usr/include/libssh2.h, ..., fcntl.h | -- Looking for 22 include files /usr/include/libssh2.h, ..., fcntl.h - found | -- Looking for 23 include files /usr/include/libssh2.h, ..., idn2.h | -- Looking for 23 include files /usr/include/libssh2.h, ..., idn2.h - found | -- Looking for 24 include files /usr/include/libssh2.h, ..., ifaddrs.h | -- Looking for 24 include files /usr/include/libssh2.h, ..., ifaddrs.h - found | -- Looking for 25 include files /usr/include/libssh2.h, ..., io.h | -- Looking for 25 include files /usr/include/libssh2.h, ..., io.h - not found | -- Looking for 25 include files /usr/include/libssh2.h, ..., krb.h | -- Looking for 25 include files /usr/include/libssh2.h, ..., krb.h - not found | -- Looking for 25 include files /usr/include/libssh2.h, ..., libgen.h | -- Looking for 25 include files /usr/include/libssh2.h, ..., libgen.h - found | -- Looking for 26 include files /usr/include/libssh2.h, ..., locale.h | -- Looking for 26 include files /usr/include/libssh2.h, ..., locale.h - found | -- Looking for 27 include files /usr/include/libssh2.h, ..., net/if.h | -- Looking for 27 include files /usr/include/libssh2.h, ..., net/if.h - found | -- Looking for 28 include files /usr/include/libssh2.h, ..., netdb.h | -- Looking for 28 include files /usr/include/libssh2.h, ..., netdb.h - found | -- Looking for 29 include files /usr/include/libssh2.h, ..., netinet/in.h | -- Looking for 29 include files /usr/include/libssh2.h, ..., netinet/in.h - found | -- Looking for 30 include files /usr/include/libssh2.h, ..., netinet/tcp.h | -- Looking for 30 include files /usr/include/libssh2.h, ..., netinet/tcp.h - found | -- Looking for 31 include files /usr/include/libssh2.h, ..., pem.h | -- Looking for 31 include files /usr/include/libssh2.h, ..., pem.h - not found | -- Looking for 31 include files /usr/include/libssh2.h, ..., poll.h | -- Looking for 31 include files /usr/include/libssh2.h, ..., poll.h - found | -- Looking for 32 include files /usr/include/libssh2.h, ..., pwd.h | -- Looking for 32 include files /usr/include/libssh2.h, ..., pwd.h - found | -- Looking for 33 include files /usr/include/libssh2.h, ..., rsa.h | -- Looking for 33 include files /usr/include/libssh2.h, ..., rsa.h - not found | -- Looking for 33 include files /usr/include/libssh2.h, ..., setjmp.h | -- Looking for 33 include files /usr/include/libssh2.h, ..., setjmp.h - found | -- Looking for 34 include files /usr/include/libssh2.h, ..., sgtty.h | -- Looking for 34 include files /usr/include/libssh2.h, ..., sgtty.h - found | -- Looking for 35 include files /usr/include/libssh2.h, ..., signal.h | -- Looking for 35 include files /usr/include/libssh2.h, ..., signal.h - found | -- Looking for 36 include files /usr/include/libssh2.h, ..., ssl.h | -- Looking for 36 include files /usr/include/libssh2.h, ..., ssl.h - not found | -- Looking for 36 include files /usr/include/libssh2.h, ..., stdbool.h | -- Looking for 36 include files /usr/include/libssh2.h, ..., stdbool.h - found | -- Looking for 37 include files /usr/include/libssh2.h, ..., stdint.h | -- Looking for 37 include files /usr/include/libssh2.h, ..., stdint.h - found | -- Looking for 39 include files /usr/include/libssh2.h, ..., stdlib.h | -- Looking for 39 include files /usr/include/libssh2.h, ..., stdlib.h - found | -- Looking for 40 include files /usr/include/libssh2.h, ..., string.h | -- Looking for 40 include files /usr/include/libssh2.h, ..., string.h - found | -- Looking for 41 include files /usr/include/libssh2.h, ..., strings.h | -- Looking for 41 include files /usr/include/libssh2.h, ..., strings.h - found | -- Looking for 42 include files /usr/include/libssh2.h, ..., stropts.h | -- Looking for 42 include files /usr/include/libssh2.h, ..., stropts.h - found | -- Looking for 43 include files /usr/include/libssh2.h, ..., termio.h | -- Looking for 43 include files /usr/include/libssh2.h, ..., termio.h - found | -- Looking for 44 include files /usr/include/libssh2.h, ..., termios.h | -- Looking for 44 include files /usr/include/libssh2.h, ..., termios.h - found | -- Looking for 45 include files /usr/include/libssh2.h, ..., time.h | -- Looking for 45 include files /usr/include/libssh2.h, ..., time.h - found | -- Looking for 46 include files /usr/include/libssh2.h, ..., unistd.h | -- Looking for 46 include files /usr/include/libssh2.h, ..., unistd.h - found | -- Looking for 47 include files /usr/include/libssh2.h, ..., utime.h | -- Looking for 47 include files /usr/include/libssh2.h, ..., utime.h - found | -- Looking for 48 include files /usr/include/libssh2.h, ..., x509.h | -- Looking for 48 include files /usr/include/libssh2.h, ..., x509.h - not found | -- Looking for 48 include files /usr/include/libssh2.h, ..., process.h | -- Looking for 48 include files /usr/include/libssh2.h, ..., process.h - not found | -- Looking for 48 include files /usr/include/libssh2.h, ..., stddef.h | -- Looking for 48 include files /usr/include/libssh2.h, ..., stddef.h - found | -- Looking for 49 include files /usr/include/libssh2.h, ..., dlfcn.h | -- Looking for 49 include files /usr/include/libssh2.h, ..., dlfcn.h - found | -- Looking for 50 include files /usr/include/libssh2.h, ..., malloc.h | -- Looking for 50 include files /usr/include/libssh2.h, ..., malloc.h - found | -- Looking for 51 include files /usr/include/libssh2.h, ..., memory.h | -- Looking for 51 include files /usr/include/libssh2.h, ..., memory.h - found | -- Looking for 52 include files /usr/include/libssh2.h, ..., netinet/if_ether.h | -- Looking for 52 include files /usr/include/libssh2.h, ..., netinet/if_ether.h - found | -- Looking for 54 include files /usr/include/libssh2.h, ..., sockio.h | -- Looking for 54 include files /usr/include/libssh2.h, ..., sockio.h - not found | -- Looking for 54 include files /usr/include/libssh2.h, ..., sys/utsname.h | -- Looking for 54 include files /usr/include/libssh2.h, ..., sys/utsname.h - found | | <snipped> | | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `ssh_knownhost': | libssh2.c:(.text+0x36d): undefined reference to `libssh2_session_hostkey' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x4d8): undefined reference to `libssh2_knownhost_checkp' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x689): undefined reference to `libssh2_knownhost_add' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6ed): undefined reference to `libssh2_knownhost_writefile' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `ssh_check_fingerprint': | libssh2.c:(.text+0x792): undefined reference to `libssh2_hostkey_hash' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `ssh_force_knownhost_key_type': | libssh2.c:(.text+0xade): undefined reference to `libssh2_knownhost_get' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0xc44): undefined reference to `libssh2_session_method_pref' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `ssh_statemach_act': | libssh2.c:(.text+0xdb8): undefined reference to `libssh2_session_set_blocking' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0xe21): undefined reference to `libssh2_session_handshake' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0xe73): undefined reference to `libssh2_session_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0xf59): undefined reference to `libssh2_userauth_list' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0xf8f): undefined reference to `libssh2_userauth_authenticated' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0xfe8): undefined reference to `libssh2_session_last_errno' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x15c3): undefined reference to `libssh2_userauth_publickey_fromfile_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x169c): undefined reference to `libssh2_session_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x17d0): undefined reference to `libssh2_userauth_password_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x1932): undefined reference to `libssh2_agent_init' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x19a0): undefined reference to `libssh2_agent_connect' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x1a41): undefined reference to `libssh2_agent_list_identities' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x1afb): undefined reference to `libssh2_agent_get_identity' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x1b4c): undefined reference to `libssh2_agent_userauth' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x1cef): undefined reference to `libssh2_userauth_keyboard_interactive_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x1e70): undefined reference to `libssh2_sftp_init' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x1eb9): undefined reference to `libssh2_session_last_errno' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x1ef4): undefined reference to `libssh2_session_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x1f98): undefined reference to `libssh2_sftp_symlink_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x206b): undefined reference to `libssh2_sftp_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x2be5): undefined reference to `libssh2_sftp_stat_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x2c31): undefined reference to `libssh2_sftp_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x3121): undefined reference to `libssh2_sftp_stat_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x316d): undefined reference to `libssh2_sftp_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x32ae): undefined reference to `libssh2_sftp_symlink_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x32fa): undefined reference to `libssh2_sftp_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x3417): undefined reference to `libssh2_sftp_mkdir_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x3463): undefined reference to `libssh2_sftp_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x357e): undefined reference to `libssh2_sftp_rename_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x35ca): undefined reference to `libssh2_sftp_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x36d9): undefined reference to `libssh2_sftp_rmdir_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x3725): undefined reference to `libssh2_sftp_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x380e): undefined reference to `libssh2_sftp_unlink_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x385a): undefined reference to `libssh2_sftp_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x394d): undefined reference to `libssh2_sftp_statvfs' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x3999): undefined reference to `libssh2_sftp_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x3c1b): undefined reference to `libssh2_sftp_stat_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x3d6e): undefined reference to `libssh2_sftp_stat_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x3ea6): undefined reference to `libssh2_sftp_open_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x3ee4): undefined reference to `libssh2_session_last_errno' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x3f16): undefined reference to `libssh2_sftp_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x438e): undefined reference to `libssh2_sftp_seek64' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x45f4): undefined reference to `libssh2_sftp_mkdir_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x4652): undefined reference to `libssh2_sftp_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x4779): undefined reference to `libssh2_sftp_open_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x47b7): undefined reference to `libssh2_session_last_errno' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x47e1): undefined reference to `libssh2_sftp_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x49c5): undefined reference to `libssh2_sftp_readdir_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x4ce9): undefined reference to `libssh2_sftp_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x4d3b): undefined reference to `libssh2_session_last_errno' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x4e3f): undefined reference to `libssh2_sftp_symlink_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x50fe): undefined reference to `libssh2_sftp_close_handle' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5213): undefined reference to `libssh2_sftp_open_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5251): undefined reference to `libssh2_session_last_errno' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x527b): undefined reference to `libssh2_sftp_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5363): undefined reference to `libssh2_sftp_stat_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5616): undefined reference to `libssh2_sftp_seek64' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x581f): undefined reference to `libssh2_sftp_seek64' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x595c): undefined reference to `libssh2_sftp_close_handle' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x59aa): undefined reference to `libssh2_session_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5aaa): undefined reference to `libssh2_sftp_close_handle' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5af8): undefined reference to `libssh2_session_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5b5b): undefined reference to `libssh2_sftp_shutdown' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5d3f): undefined reference to `libssh2_scp_send64' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5d88): undefined reference to `libssh2_session_last_errno' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5dc3): undefined reference to `libssh2_session_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5f83): undefined reference to `libssh2_scp_recv2' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5fcc): undefined reference to `libssh2_session_last_errno' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6007): undefined reference to `libssh2_session_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6198): undefined reference to `libssh2_channel_send_eof' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x61e6): undefined reference to `libssh2_session_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6254): undefined reference to `libssh2_channel_wait_eof' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x62a2): undefined reference to `libssh2_session_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6310): undefined reference to `libssh2_channel_wait_closed' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x635e): undefined reference to `libssh2_session_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x63cc): undefined reference to `libssh2_channel_free' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x641a): undefined reference to `libssh2_session_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x64aa): undefined reference to `libssh2_channel_free' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x64f8): undefined reference to `libssh2_session_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6572): undefined reference to `libssh2_session_disconnect_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x65c0): undefined reference to `libssh2_session_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6665): undefined reference to `libssh2_knownhost_free' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x66a4): undefined reference to `libssh2_agent_disconnect' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x66f2): undefined reference to `libssh2_session_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6730): undefined reference to `libssh2_agent_free' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6793): undefined reference to `libssh2_session_free' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x67e1): undefined reference to `libssh2_session_last_error' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `ssh_block2waitfor': | libssh2.c:(.text+0x6b7e): undefined reference to `libssh2_session_block_directions' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `ssh_block_statemach': | libssh2.c:(.text+0x6d71): undefined reference to `libssh2_session_block_directions' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `ssh_connect': | libssh2.c:(.text+0x6f2d): undefined reference to `libssh2_session_init_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6f9c): undefined reference to `libssh2_session_flag' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6fdf): undefined reference to `libssh2_knownhost_init' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x7010): undefined reference to `libssh2_session_free' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x703d): undefined reference to `libssh2_knownhost_readfile' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `scp_send': | libssh2.c:(.text+0x73ab): undefined reference to `libssh2_channel_write_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `scp_recv': | libssh2.c:(.text+0x7446): undefined reference to `libssh2_channel_read_ex' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `sftp_send': | libssh2.c:(.text+0x761e): undefined reference to `libssh2_sftp_write' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `sftp_recv': | libssh2.c:(.text+0x76b7): undefined reference to `libssh2_sftp_read' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `Curl_ssh_init': | libssh2.c:(.text+0x7823): undefined reference to `libssh2_init' | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `Curl_ssh_cleanup': | libssh2.c:(.text+0x783e): undefined reference to `libssh2_exit' | collect2: error: ld returned 1 exit status | make[2]: *** [test/unit/CMakeFiles/luaL_iterator.test.dir/build.make:127: test/unit/luaL_iterator.test] Error 1 | make[1]: *** [CMakeFiles/Makefile2:4930: test/unit/CMakeFiles/luaL_iterator.test.dir/all] Error 2 | make[1]: *** Waiting for unfinished jobs.... There is a similar issue[1] in curl repo (unfortunately a stalled and closed). I faced the issue as a result of autotools replacement with CMake: the option was disabled by default in autoconf[2], but enabled by default in CMake[3]. Here is the patch fixing the issue: ================================================================================ diff --git a/cmake/BuildLibCURL.cmake b/cmake/BuildLibCURL.cmake index a4e222f95..caebf1870 100644 --- a/cmake/BuildLibCURL.cmake +++ b/cmake/BuildLibCURL.cmake @@ -106,6 +106,7 @@ macro(curl_build) list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_USE_MBEDTLS=OFF") list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_USE_WOLFSSL=OFF") list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_USE_NSS=OFF") + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_USE_LIBSSH2=OFF") list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_CA_BUNDLE=none") list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_CA_PATH=none") list(APPEND LIBCURL_CMAKE_FLAGS "-DUSE_LIBRTMP=OFF") ================================================================================ After applying the patch the error is gone and tests are fine. [1]: https://github.com/curl/curl/issues/1146 [2]: https://github.com/tarantool/curl/blob/5a1fc8d33808d7b22f57bdf9403cda7ff07b0670/configure.ac#L2890 [3]: https://github.com/tarantool/curl/blob/5a1fc8d33808d7b22f57bdf9403cda7ff07b0670/CMakeLists.txt#L642 -- Best regards, IM ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Tarantool-patches] [PATCH v3] build: enable cmake in curl build 2020-10-13 10:20 ` Igor Munkin @ 2020-10-14 9:08 ` Alexander V. Tikhonov 0 siblings, 0 replies; 10+ messages in thread From: Alexander V. Tikhonov @ 2020-10-14 9:08 UTC (permalink / raw) To: Igor Munkin; +Cc: tarantool-patches HI Igor, I've used your solution in the patch. On Tue, Oct 13, 2020 at 01:20:31PM +0300, Igor Munkin wrote: > Well, I faced the following build failure on the linking stage: > > | $ cmake -DCMAKE_BUILD_TYPE=Debug . && make -j > | > | <snipped> > | > | -- Found LibSSH2: /usr/lib64/libssh2.so (found version "1.9.0_DEV") > | -- Looking for libssh2_version > | -- Looking for libssh2_version - found > | -- Looking for libssh2_init > | -- Looking for libssh2_init - found > | -- Looking for libssh2_exit > | -- Looking for libssh2_exit - found > | -- Looking for libssh2_scp_send64 > | -- Looking for libssh2_scp_send64 - found > | -- Looking for libssh2_session_handshake > | -- Looking for libssh2_session_handshake - found > | -- Performing Test USE_UNIX_SOCKETS > | -- Performing Test USE_UNIX_SOCKETS - Success > | -- Looking for include files /usr/include/libssh2.h, stdio.h > | -- Looking for include files /usr/include/libssh2.h, stdio.h - found > | -- Looking for 3 include files /usr/include/libssh2.h, ..., inttypes.h > | -- Looking for 3 include files /usr/include/libssh2.h, ..., inttypes.h - found > | -- Looking for 4 include files /usr/include/libssh2.h, ..., sys/filio.h > | -- Looking for 4 include files /usr/include/libssh2.h, ..., sys/filio.h - not found > | -- Looking for 4 include files /usr/include/libssh2.h, ..., sys/ioctl.h > | -- Looking for 4 include files /usr/include/libssh2.h, ..., sys/ioctl.h - found > | -- Looking for 5 include files /usr/include/libssh2.h, ..., sys/param.h > | -- Looking for 5 include files /usr/include/libssh2.h, ..., sys/param.h - found > | -- Looking for 6 include files /usr/include/libssh2.h, ..., sys/poll.h > | -- Looking for 6 include files /usr/include/libssh2.h, ..., sys/poll.h - found > | -- Looking for 7 include files /usr/include/libssh2.h, ..., sys/resource.h > | -- Looking for 7 include files /usr/include/libssh2.h, ..., sys/resource.h - found > | -- Looking for 8 include files /usr/include/libssh2.h, ..., sys/select.h > | -- Looking for 8 include files /usr/include/libssh2.h, ..., sys/select.h - found > | -- Looking for 9 include files /usr/include/libssh2.h, ..., sys/socket.h > | -- Looking for 9 include files /usr/include/libssh2.h, ..., sys/socket.h - found > | -- Looking for 10 include files /usr/include/libssh2.h, ..., sys/sockio.h > | -- Looking for 10 include files /usr/include/libssh2.h, ..., sys/sockio.h - not found > | -- Looking for 10 include files /usr/include/libssh2.h, ..., sys/stat.h > | -- Looking for 10 include files /usr/include/libssh2.h, ..., sys/stat.h - found > | -- Looking for 11 include files /usr/include/libssh2.h, ..., sys/time.h > | -- Looking for 11 include files /usr/include/libssh2.h, ..., sys/time.h - found > | -- Looking for 12 include files /usr/include/libssh2.h, ..., sys/types.h > | -- Looking for 12 include files /usr/include/libssh2.h, ..., sys/types.h - found > | -- Looking for 13 include files /usr/include/libssh2.h, ..., sys/uio.h > | -- Looking for 13 include files /usr/include/libssh2.h, ..., sys/uio.h - found > | -- Looking for 14 include files /usr/include/libssh2.h, ..., sys/un.h > | -- Looking for 14 include files /usr/include/libssh2.h, ..., sys/un.h - found > | -- Looking for 15 include files /usr/include/libssh2.h, ..., sys/utime.h > | -- Looking for 15 include files /usr/include/libssh2.h, ..., sys/utime.h - not found > | -- Looking for 15 include files /usr/include/libssh2.h, ..., sys/xattr.h > | -- Looking for 15 include files /usr/include/libssh2.h, ..., sys/xattr.h - found > | -- Looking for 16 include files /usr/include/libssh2.h, ..., alloca.h > | -- Looking for 16 include files /usr/include/libssh2.h, ..., alloca.h - found > | -- Looking for 17 include files /usr/include/libssh2.h, ..., arpa/inet.h > | -- Looking for 17 include files /usr/include/libssh2.h, ..., arpa/inet.h - found > | -- Looking for 18 include files /usr/include/libssh2.h, ..., arpa/tftp.h > | -- Looking for 18 include files /usr/include/libssh2.h, ..., arpa/tftp.h - found > | -- Looking for 19 include files /usr/include/libssh2.h, ..., assert.h > | -- Looking for 19 include files /usr/include/libssh2.h, ..., assert.h - found > | -- Looking for 20 include files /usr/include/libssh2.h, ..., crypto.h > | -- Looking for 20 include files /usr/include/libssh2.h, ..., crypto.h - not found > | -- Looking for 20 include files /usr/include/libssh2.h, ..., err.h > | -- Looking for 20 include files /usr/include/libssh2.h, ..., err.h - found > | -- Looking for 21 include files /usr/include/libssh2.h, ..., errno.h > | -- Looking for 21 include files /usr/include/libssh2.h, ..., errno.h - found > | -- Looking for 22 include files /usr/include/libssh2.h, ..., fcntl.h > | -- Looking for 22 include files /usr/include/libssh2.h, ..., fcntl.h - found > | -- Looking for 23 include files /usr/include/libssh2.h, ..., idn2.h > | -- Looking for 23 include files /usr/include/libssh2.h, ..., idn2.h - found > | -- Looking for 24 include files /usr/include/libssh2.h, ..., ifaddrs.h > | -- Looking for 24 include files /usr/include/libssh2.h, ..., ifaddrs.h - found > | -- Looking for 25 include files /usr/include/libssh2.h, ..., io.h > | -- Looking for 25 include files /usr/include/libssh2.h, ..., io.h - not found > | -- Looking for 25 include files /usr/include/libssh2.h, ..., krb.h > | -- Looking for 25 include files /usr/include/libssh2.h, ..., krb.h - not found > | -- Looking for 25 include files /usr/include/libssh2.h, ..., libgen.h > | -- Looking for 25 include files /usr/include/libssh2.h, ..., libgen.h - found > | -- Looking for 26 include files /usr/include/libssh2.h, ..., locale.h > | -- Looking for 26 include files /usr/include/libssh2.h, ..., locale.h - found > | -- Looking for 27 include files /usr/include/libssh2.h, ..., net/if.h > | -- Looking for 27 include files /usr/include/libssh2.h, ..., net/if.h - found > | -- Looking for 28 include files /usr/include/libssh2.h, ..., netdb.h > | -- Looking for 28 include files /usr/include/libssh2.h, ..., netdb.h - found > | -- Looking for 29 include files /usr/include/libssh2.h, ..., netinet/in.h > | -- Looking for 29 include files /usr/include/libssh2.h, ..., netinet/in.h - found > | -- Looking for 30 include files /usr/include/libssh2.h, ..., netinet/tcp.h > | -- Looking for 30 include files /usr/include/libssh2.h, ..., netinet/tcp.h - found > | -- Looking for 31 include files /usr/include/libssh2.h, ..., pem.h > | -- Looking for 31 include files /usr/include/libssh2.h, ..., pem.h - not found > | -- Looking for 31 include files /usr/include/libssh2.h, ..., poll.h > | -- Looking for 31 include files /usr/include/libssh2.h, ..., poll.h - found > | -- Looking for 32 include files /usr/include/libssh2.h, ..., pwd.h > | -- Looking for 32 include files /usr/include/libssh2.h, ..., pwd.h - found > | -- Looking for 33 include files /usr/include/libssh2.h, ..., rsa.h > | -- Looking for 33 include files /usr/include/libssh2.h, ..., rsa.h - not found > | -- Looking for 33 include files /usr/include/libssh2.h, ..., setjmp.h > | -- Looking for 33 include files /usr/include/libssh2.h, ..., setjmp.h - found > | -- Looking for 34 include files /usr/include/libssh2.h, ..., sgtty.h > | -- Looking for 34 include files /usr/include/libssh2.h, ..., sgtty.h - found > | -- Looking for 35 include files /usr/include/libssh2.h, ..., signal.h > | -- Looking for 35 include files /usr/include/libssh2.h, ..., signal.h - found > | -- Looking for 36 include files /usr/include/libssh2.h, ..., ssl.h > | -- Looking for 36 include files /usr/include/libssh2.h, ..., ssl.h - not found > | -- Looking for 36 include files /usr/include/libssh2.h, ..., stdbool.h > | -- Looking for 36 include files /usr/include/libssh2.h, ..., stdbool.h - found > | -- Looking for 37 include files /usr/include/libssh2.h, ..., stdint.h > | -- Looking for 37 include files /usr/include/libssh2.h, ..., stdint.h - found > | -- Looking for 39 include files /usr/include/libssh2.h, ..., stdlib.h > | -- Looking for 39 include files /usr/include/libssh2.h, ..., stdlib.h - found > | -- Looking for 40 include files /usr/include/libssh2.h, ..., string.h > | -- Looking for 40 include files /usr/include/libssh2.h, ..., string.h - found > | -- Looking for 41 include files /usr/include/libssh2.h, ..., strings.h > | -- Looking for 41 include files /usr/include/libssh2.h, ..., strings.h - found > | -- Looking for 42 include files /usr/include/libssh2.h, ..., stropts.h > | -- Looking for 42 include files /usr/include/libssh2.h, ..., stropts.h - found > | -- Looking for 43 include files /usr/include/libssh2.h, ..., termio.h > | -- Looking for 43 include files /usr/include/libssh2.h, ..., termio.h - found > | -- Looking for 44 include files /usr/include/libssh2.h, ..., termios.h > | -- Looking for 44 include files /usr/include/libssh2.h, ..., termios.h - found > | -- Looking for 45 include files /usr/include/libssh2.h, ..., time.h > | -- Looking for 45 include files /usr/include/libssh2.h, ..., time.h - found > | -- Looking for 46 include files /usr/include/libssh2.h, ..., unistd.h > | -- Looking for 46 include files /usr/include/libssh2.h, ..., unistd.h - found > | -- Looking for 47 include files /usr/include/libssh2.h, ..., utime.h > | -- Looking for 47 include files /usr/include/libssh2.h, ..., utime.h - found > | -- Looking for 48 include files /usr/include/libssh2.h, ..., x509.h > | -- Looking for 48 include files /usr/include/libssh2.h, ..., x509.h - not found > | -- Looking for 48 include files /usr/include/libssh2.h, ..., process.h > | -- Looking for 48 include files /usr/include/libssh2.h, ..., process.h - not found > | -- Looking for 48 include files /usr/include/libssh2.h, ..., stddef.h > | -- Looking for 48 include files /usr/include/libssh2.h, ..., stddef.h - found > | -- Looking for 49 include files /usr/include/libssh2.h, ..., dlfcn.h > | -- Looking for 49 include files /usr/include/libssh2.h, ..., dlfcn.h - found > | -- Looking for 50 include files /usr/include/libssh2.h, ..., malloc.h > | -- Looking for 50 include files /usr/include/libssh2.h, ..., malloc.h - found > | -- Looking for 51 include files /usr/include/libssh2.h, ..., memory.h > | -- Looking for 51 include files /usr/include/libssh2.h, ..., memory.h - found > | -- Looking for 52 include files /usr/include/libssh2.h, ..., netinet/if_ether.h > | -- Looking for 52 include files /usr/include/libssh2.h, ..., netinet/if_ether.h - found > | -- Looking for 54 include files /usr/include/libssh2.h, ..., sockio.h > | -- Looking for 54 include files /usr/include/libssh2.h, ..., sockio.h - not found > | -- Looking for 54 include files /usr/include/libssh2.h, ..., sys/utsname.h > | -- Looking for 54 include files /usr/include/libssh2.h, ..., sys/utsname.h - found > | > | <snipped> > | > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `ssh_knownhost': > | libssh2.c:(.text+0x36d): undefined reference to `libssh2_session_hostkey' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x4d8): undefined reference to `libssh2_knownhost_checkp' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x689): undefined reference to `libssh2_knownhost_add' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6ed): undefined reference to `libssh2_knownhost_writefile' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `ssh_check_fingerprint': > | libssh2.c:(.text+0x792): undefined reference to `libssh2_hostkey_hash' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `ssh_force_knownhost_key_type': > | libssh2.c:(.text+0xade): undefined reference to `libssh2_knownhost_get' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0xc44): undefined reference to `libssh2_session_method_pref' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `ssh_statemach_act': > | libssh2.c:(.text+0xdb8): undefined reference to `libssh2_session_set_blocking' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0xe21): undefined reference to `libssh2_session_handshake' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0xe73): undefined reference to `libssh2_session_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0xf59): undefined reference to `libssh2_userauth_list' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0xf8f): undefined reference to `libssh2_userauth_authenticated' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0xfe8): undefined reference to `libssh2_session_last_errno' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x15c3): undefined reference to `libssh2_userauth_publickey_fromfile_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x169c): undefined reference to `libssh2_session_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x17d0): undefined reference to `libssh2_userauth_password_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x1932): undefined reference to `libssh2_agent_init' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x19a0): undefined reference to `libssh2_agent_connect' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x1a41): undefined reference to `libssh2_agent_list_identities' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x1afb): undefined reference to `libssh2_agent_get_identity' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x1b4c): undefined reference to `libssh2_agent_userauth' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x1cef): undefined reference to `libssh2_userauth_keyboard_interactive_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x1e70): undefined reference to `libssh2_sftp_init' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x1eb9): undefined reference to `libssh2_session_last_errno' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x1ef4): undefined reference to `libssh2_session_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x1f98): undefined reference to `libssh2_sftp_symlink_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x206b): undefined reference to `libssh2_sftp_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x2be5): undefined reference to `libssh2_sftp_stat_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x2c31): undefined reference to `libssh2_sftp_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x3121): undefined reference to `libssh2_sftp_stat_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x316d): undefined reference to `libssh2_sftp_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x32ae): undefined reference to `libssh2_sftp_symlink_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x32fa): undefined reference to `libssh2_sftp_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x3417): undefined reference to `libssh2_sftp_mkdir_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x3463): undefined reference to `libssh2_sftp_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x357e): undefined reference to `libssh2_sftp_rename_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x35ca): undefined reference to `libssh2_sftp_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x36d9): undefined reference to `libssh2_sftp_rmdir_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x3725): undefined reference to `libssh2_sftp_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x380e): undefined reference to `libssh2_sftp_unlink_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x385a): undefined reference to `libssh2_sftp_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x394d): undefined reference to `libssh2_sftp_statvfs' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x3999): undefined reference to `libssh2_sftp_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x3c1b): undefined reference to `libssh2_sftp_stat_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x3d6e): undefined reference to `libssh2_sftp_stat_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x3ea6): undefined reference to `libssh2_sftp_open_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x3ee4): undefined reference to `libssh2_session_last_errno' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x3f16): undefined reference to `libssh2_sftp_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x438e): undefined reference to `libssh2_sftp_seek64' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x45f4): undefined reference to `libssh2_sftp_mkdir_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x4652): undefined reference to `libssh2_sftp_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x4779): undefined reference to `libssh2_sftp_open_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x47b7): undefined reference to `libssh2_session_last_errno' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x47e1): undefined reference to `libssh2_sftp_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x49c5): undefined reference to `libssh2_sftp_readdir_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x4ce9): undefined reference to `libssh2_sftp_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x4d3b): undefined reference to `libssh2_session_last_errno' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x4e3f): undefined reference to `libssh2_sftp_symlink_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x50fe): undefined reference to `libssh2_sftp_close_handle' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5213): undefined reference to `libssh2_sftp_open_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5251): undefined reference to `libssh2_session_last_errno' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x527b): undefined reference to `libssh2_sftp_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5363): undefined reference to `libssh2_sftp_stat_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5616): undefined reference to `libssh2_sftp_seek64' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x581f): undefined reference to `libssh2_sftp_seek64' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x595c): undefined reference to `libssh2_sftp_close_handle' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x59aa): undefined reference to `libssh2_session_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5aaa): undefined reference to `libssh2_sftp_close_handle' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5af8): undefined reference to `libssh2_session_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5b5b): undefined reference to `libssh2_sftp_shutdown' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5d3f): undefined reference to `libssh2_scp_send64' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5d88): undefined reference to `libssh2_session_last_errno' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5dc3): undefined reference to `libssh2_session_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5f83): undefined reference to `libssh2_scp_recv2' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x5fcc): undefined reference to `libssh2_session_last_errno' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6007): undefined reference to `libssh2_session_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6198): undefined reference to `libssh2_channel_send_eof' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x61e6): undefined reference to `libssh2_session_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6254): undefined reference to `libssh2_channel_wait_eof' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x62a2): undefined reference to `libssh2_session_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6310): undefined reference to `libssh2_channel_wait_closed' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x635e): undefined reference to `libssh2_session_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x63cc): undefined reference to `libssh2_channel_free' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x641a): undefined reference to `libssh2_session_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x64aa): undefined reference to `libssh2_channel_free' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x64f8): undefined reference to `libssh2_session_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6572): undefined reference to `libssh2_session_disconnect_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x65c0): undefined reference to `libssh2_session_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6665): undefined reference to `libssh2_knownhost_free' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x66a4): undefined reference to `libssh2_agent_disconnect' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x66f2): undefined reference to `libssh2_session_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6730): undefined reference to `libssh2_agent_free' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6793): undefined reference to `libssh2_session_free' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x67e1): undefined reference to `libssh2_session_last_error' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `ssh_block2waitfor': > | libssh2.c:(.text+0x6b7e): undefined reference to `libssh2_session_block_directions' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `ssh_block_statemach': > | libssh2.c:(.text+0x6d71): undefined reference to `libssh2_session_block_directions' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `ssh_connect': > | libssh2.c:(.text+0x6f2d): undefined reference to `libssh2_session_init_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6f9c): undefined reference to `libssh2_session_flag' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x6fdf): undefined reference to `libssh2_knownhost_init' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x7010): undefined reference to `libssh2_session_free' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libssh2.c:(.text+0x703d): undefined reference to `libssh2_knownhost_readfile' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `scp_send': > | libssh2.c:(.text+0x73ab): undefined reference to `libssh2_channel_write_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `scp_recv': > | libssh2.c:(.text+0x7446): undefined reference to `libssh2_channel_read_ex' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `sftp_send': > | libssh2.c:(.text+0x761e): undefined reference to `libssh2_sftp_write' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `sftp_recv': > | libssh2.c:(.text+0x76b7): undefined reference to `libssh2_sftp_read' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `Curl_ssh_init': > | libssh2.c:(.text+0x7823): undefined reference to `libssh2_init' > | /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../build/curl/dest/lib/libcurl.a(libssh2.o): in function `Curl_ssh_cleanup': > | libssh2.c:(.text+0x783e): undefined reference to `libssh2_exit' > | collect2: error: ld returned 1 exit status > | make[2]: *** [test/unit/CMakeFiles/luaL_iterator.test.dir/build.make:127: test/unit/luaL_iterator.test] Error 1 > | make[1]: *** [CMakeFiles/Makefile2:4930: test/unit/CMakeFiles/luaL_iterator.test.dir/all] Error 2 > | make[1]: *** Waiting for unfinished jobs.... > > There is a similar issue[1] in curl repo (unfortunately a stalled and > closed). I faced the issue as a result of autotools replacement with > CMake: the option was disabled by default in autoconf[2], but enabled by > default in CMake[3]. Here is the patch fixing the issue: > > ================================================================================ > > diff --git a/cmake/BuildLibCURL.cmake b/cmake/BuildLibCURL.cmake > index a4e222f95..caebf1870 100644 > --- a/cmake/BuildLibCURL.cmake > +++ b/cmake/BuildLibCURL.cmake > @@ -106,6 +106,7 @@ macro(curl_build) > list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_USE_MBEDTLS=OFF") > list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_USE_WOLFSSL=OFF") > list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_USE_NSS=OFF") > + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_USE_LIBSSH2=OFF") > list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_CA_BUNDLE=none") > list(APPEND LIBCURL_CMAKE_FLAGS "-DCURL_CA_PATH=none") > list(APPEND LIBCURL_CMAKE_FLAGS "-DUSE_LIBRTMP=OFF") > > ================================================================================ > > After applying the patch the error is gone and tests are fine. > > [1]: https://github.com/curl/curl/issues/1146 > [2]: https://github.com/tarantool/curl/blob/5a1fc8d33808d7b22f57bdf9403cda7ff07b0670/configure.ac#L2890 > [3]: https://github.com/tarantool/curl/blob/5a1fc8d33808d7b22f57bdf9403cda7ff07b0670/CMakeLists.txt#L642 > > -- > Best regards, > IM ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Tarantool-patches] [PATCH v3] build: enable cmake in curl build 2020-10-12 18:52 ` [Tarantool-patches] [PATCH v3] build: enable cmake in curl build Igor Munkin 2020-10-13 10:20 ` Igor Munkin @ 2020-10-14 9:12 ` Alexander V. Tikhonov 1 sibling, 0 replies; 10+ messages in thread From: Alexander V. Tikhonov @ 2020-10-14 9:12 UTC (permalink / raw) To: Igor Munkin; +Cc: tarantool-patches Hi Igor, I've made all of your suggestions except > > + # switch off the group of protocols with special flag HTTP_ONLY: > > + # ftp, file, ldap, ldaps, rtsp, dict, telnet, tftp, pop3, imap, smtp > > I guess this comment is irrelevant considering the options you disabled > manually below. where I think is correct and should stay for information. Also I still working on finding solution not to use hardcoded parallel build with: make -j On Mon, Oct 12, 2020 at 09:52:34PM +0300, Igor Munkin wrote: > Sasha, > > Thanks for the patch! > > On 08.10.20, Alexander V. Tikhonov wrote: > > Initially tryed to change autoconf tools in Curl build to cmake and > > Typo (again): s/tryed/tried/. > > > found the following build issue on: > > CentOS 6,7 > > Minor: IMHO, it's better to split these lines as you did in the commit > you're referring below. > > > Debian 8 > > Ubuntu 14.04 > > > > Issue found: > > CMake Error at CMakeLists.txt:41 (cmake_minimum_required): > > CMake 3.0 or higher is required. You are running version 2.8.12.2 > > > > To fix the issue removed the check of the version from curl sources > > Typo: s/removed the check/check is removed/. > > > in Tarantool's third party '<root Tarantool sources>/third_party/curl': > > > > 12af024bc85606b14ffc415413a7e86e6bbee7eb "Enable curl build with old cmake" > > Minor: We mention commits in the form > 0000000000000000000000000000000000000000 ('commit message header'): > full 40-digits hash and the commit message header in parenthesis. > > > > > After this fix completely changed autoconf to cmake in curl build. > > Autoconf part completely removed and code cleaned up for cmake. > > Typo: s/removed/is removed/. > > > For curl cmake build all autoconf options were ported to cmake > > configuration call, check the accurate list of the change in [1]. > > > > Also the following issues resolved: > > > > <snipped> > > > 3. Found issues with building Tarantool statically on Debian 9 and > > its package build on CentOS 8. > > > > Building statically got the issues with openssl linking, like [2]: > > > > static-build/openssl-prefix/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_lock_new': > > threads_pthread.c:(.text+0x45): undefined reference to `pthread_rwlock_init' > > > > It happened because in openssl radically changed how threads-related > > things were handled before 1.1.0 version. It required the application > > to provide us with the locking functionality in form of callbacks. > > Since 1.1.0, these matters are entirely internal, so libcrypto > > requires the presence of the platform specific thread implementation > > of our choosing, which is pthread on everything. > > > > After '-pthread' added to C compile flags package build on CentOS 8 > > failed with the issue [3]: > > > > /build/usr/src/debug/tarantool-2.6.0.141/third_party/curl/lib/warnless.c:101:4: error: #error "SIZEOF_CURL_OFF_T not defined" > > # error "SIZEOF_CURL_OFF_T not defined" > > ^~~~~ > > /build/usr/src/debug/tarantool-2.6.0.141/third_party/curl/lib/warnless.c: In function 'curlx_uztoso': > > /build/usr/src/debug/tarantool-2.6.0.141/third_party/curl/lib/warnless.c:192:40: error: 'CURL_MASK_SCOFFT' undeclared (first use in this function); did you mean 'CURL_MASK_SINT'? > > return (curl_off_t)(uznum & (size_t) CURL_MASK_SCOFFT); > > ^~~~~~~~~~~~~~~~ > > CURL_MASK_SINT > > > > To avoid of the issue decided to use '-pthread' flag only for openssl > > when it had not this flag in openssl compilation: > > > > # check '-pthread' in openssl compile options > > execute_process(COMMAND openssl version -f > > OUTPUT_VARIABLE OPENSSL_COMPILE_OPTIONS) > > # add pthread library for openssl static library linking > > if(NOT OPENSSL_COMPILE_OPTIONS MATCHES ".* -pthread .*") > > list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_C_FLAGS=-pthread") > > endif() > > Minor: I doubt code duplication in sources and commit message makes the > changes clearer :) The description above is enough (except it lacks the > reason why CURL_MASK_SCOFFT is undeclared, but it looks like minor > details that can be changed in future or googled by inquisitive readers) > > > > > <snipped> > > > > > Closes #4968 > > Closes #5396 > > Closes #5019 > > Minor (again): Please sort the issues above. > > > > > [1] - https://github.com/tarantool/tarantool/issues/4968#issue-617183031 > > [2] - https://gitlab.com/tarantool/tarantool/-/jobs/779176133#L6021 > > [3] - https://gitlab.com/tarantool/tarantool/-/jobs/778309145#L3060 > > --- > > > > > > Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4874-out-of-source-build-full-ci > > Issue: https://github.com/tarantool/tarantool/issues/4968 > > Issue: https://github.com/tarantool/tarantool/issues/5396 > > Issue: https://github.com/tarantool/tarantool/issues/5019 > > > > V3: Added explicitly all disabled flags. > > Fixed #5396. > > Removed fix for #5020 as not needed now. > > > > cmake/BuildLibCURL.cmake | 249 +++++++++++++++++++-------------------- > > 1 file changed, 118 insertions(+), 131 deletions(-) > > > > diff --git a/cmake/BuildLibCURL.cmake b/cmake/BuildLibCURL.cmake > > index 86fec39e9..911e49f11 100644 > > --- a/cmake/BuildLibCURL.cmake > > +++ b/cmake/BuildLibCURL.cmake > > @@ -3,11 +3,12 @@ macro(curl_build) > > set(LIBCURL_SOURCE_DIR ${PROJECT_SOURCE_DIR}/third_party/curl) > > set(LIBCURL_BINARY_DIR ${PROJECT_BINARY_DIR}/build/curl/work) > > set(LIBCURL_INSTALL_DIR ${PROJECT_BINARY_DIR}/build/curl/dest) > > + set(LIBCURL_CMAKE_FLAGS "") > > > > message(STATUS "Looking for zlib") > > find_path(ZLIB_INCLUDE_DIR zlib.h) > > message(STATUS "Looking for zlib.h - ${ZLIB_INCLUDE_DIR}") > > - if (BUILD_STATIC) > > + if(BUILD_STATIC) > > Minor: This line changes nothing except the whitespace (it looks like > rebase conflict resolution). Such changes only enlarge the patch, so I > believe they can be dropped. However, I have no strict objections, > regarding this one, since it doesn't introduce new hunks (ergo the > changes are quite local). > > > set(LIBZ_LIB_NAME libz.a) > > else() > > set(LIBZ_LIB_NAME z) > > @@ -15,44 +16,125 @@ macro(curl_build) > > find_library(LIBZ_LIBRARY NAMES ${LIBZ_LIB_NAME}) > > message(STATUS "Looking for libz - ${LIBZ_LIBRARY}") > > > > - if (NOT ZLIB_INCLUDE_DIR OR NOT LIBZ_LIBRARY) > > + if(NOT ZLIB_INCLUDE_DIR OR NOT LIBZ_LIBRARY) > > Ditto. > > > message(FATAL_ERROR "Unable to find zlib") > > endif() > > <snipped> > > > + > > + # switch off the group of protocols with special flag HTTP_ONLY: > > + # ftp, file, ldap, ldaps, rtsp, dict, telnet, tftp, pop3, imap, smtp > > I guess this comment is irrelevant considering the options you disabled > manually below. > > > + list(APPEND LIBCURL_CMAKE_FLAGS "-DHTTP_ONLY=ON") > > <snipped> > > > + # In hardened mode, which enables -fPIE by default, > > + # the cmake checks don't work without -fPIC. > > + list(APPEND LIBCURL_CMAKE_FLAGS "-DCMAKE_REQUIRED_FLAGS=-fPIC") > > As a result of the offline discussion this line is removed > > > + > > <snipped> > > > > > include(ExternalProject) > > ExternalProject_Add( > > @@ -62,101 +144,11 @@ macro(curl_build) > > <snipped> > > > - --disable-symbol-hiding > > There is <CURL_HIDDEN_SYMBOLS> option, that is ON (AFAIU, this > extension[1]). So, this change is inconsistent: you drop this configure > options and don't set the proper CMake flag. > > <snipped> > > > + BUILD_COMMAND cd <BINARY_DIR> && $(MAKE) -j > > The comment regarding this line is left unaddressed. > > > INSTALL_COMMAND cd <BINARY_DIR> && $(MAKE) install) > > <snipped> > > > -- > > 2.25.1 > > > > [1]: https://github.com/tarantool/curl/blob/5a1fc8d33808d7b22f57bdf9403cda7ff07b0670/CMake/CurlSymbolHiding.cmake#L24 > > -- > Best regards, > IM ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-10-14 9:12 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-10-08 8:03 [Tarantool-patches] [PATCH v3] build: enable cmake in curl build Alexander V. Tikhonov 2020-10-08 8:05 ` [Tarantool-patches] [PATCH v1] build: make curl symbols global Alexander V. Tikhonov 2020-10-13 11:47 ` Igor Munkin 2020-10-08 8:09 ` [Tarantool-patches] [PATCH v1] gitlab-ci: add out-of-source build Alexander V. Tikhonov 2020-10-13 20:39 ` Igor Munkin 2020-10-14 9:07 ` Alexander V. Tikhonov 2020-10-12 18:52 ` [Tarantool-patches] [PATCH v3] build: enable cmake in curl build Igor Munkin 2020-10-13 10:20 ` Igor Munkin 2020-10-14 9:08 ` Alexander V. Tikhonov 2020-10-14 9:12 ` Alexander V. Tikhonov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox