From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp29.i.mail.ru (smtp29.i.mail.ru [94.100.177.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 1D29A469719 for ; Thu, 8 Oct 2020 11:22:14 +0300 (MSK) From: "Alexander V. Tikhonov" Date: Thu, 8 Oct 2020 11:22:11 +0300 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH curl v1] Make curl symbols global List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Munkin , Kirill Yukhin Cc: tarantool-patches@dev.tarantool.org, 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 tarantool/tarantool#5268 --- Github: https://github.com/tarantool/tarantool/tree/avtikhon/curl-7_71_1 Issue: https://github.com/tarantool/tarantool/issues/5268 CMake/CurlSymbolHiding.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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