* [tarantool-patches] [PATCH 0/2] Build libcurl statically
@ 2019-08-16 2:32 Alexander Turenko
2019-08-16 2:32 ` [tarantool-patches] [PATCH 1/2] lua: workaround pwd.getpwall() issue on Fedora 29 Alexander Turenko
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Alexander Turenko @ 2019-08-16 2:32 UTC (permalink / raw)
To: Georgy Kirichenko
Cc: Alexander Turenko, tarantool-patches, Alexander V . Tikhonov,
Mergen Imeev
We decided to build libcurl statically to avoid problems with libcurl
versions that Linux distributives ships (see the list below). I also did
this for Mac OS and FreeBSD to provide more or less uniform build and
dependencies list across OSes.
This patchset holds libcurl-7.65.3. AFAIK there is no problems on this
version that affects our built-in http client. We tested this version
(also linked statically to tarantool) against the performance
degradation we observed by our customers on CentOS 7 (#4397) and it
works good. The following list of issues re built-in http client will
become unrelevant after this patchset:
* #4180 ('httpc: redirects are broken with libcurl-7.30 and older');
* #4389 ('libcurl memory leak');
* #4397 ('HTTPS seem to be unstable').
I didn't close them from a commit however, because it would be good to
do a little extra work on them: at least bisect and understand what is a
cause of a problem. Say, it is possible that a problem caused by a
libcurl build option, but not a specific version. This information would
be useful to be sure we really don't affected by the issues and will not
step into the problems in the future.
The patchset contains two patches.
The first one workarounds a systemd issue that affects built-in pwd
module when tarantool is linked against libcurl w/o GSS API support
(this is how we build libcurl to link it statically). The problem
appears on Fedora 29. This is prerequisite to push the second patch.
The second patch enables static libcurl build, enables it by default and
adjusts all relevant scripts and dependencies.
https://github.com/tarantool/tarantool/issues/4318
https://github.com/tarantool/tarantool/tree/imeevma/gh-4318-link-libcurl-statically-full-ci
CI now fails, because some SQL tests were not updated properly on
master. I'll rebase the branch when it will be fixed and will ensure
that everything work.
Alexander Turenko (1):
lua: workaround pwd.getpwall() issue on Fedora 29
Mergen Imeev (1):
build: link libcurl statically from a submodule
.gitmodules | 3 +
.travis.mk | 8 +--
CMakeLists.txt | 12 +++-
Dockerfile.staticbuild | 14 +----
cmake/BuildLibCURL.cmake | 118 +++++++++++++++++++++++++++++++++++++++
debian/control | 9 ++-
rpm/tarantool.spec | 9 ++-
src/CMakeLists.txt | 3 +
src/lua/pwd.lua | 13 +++++
test/unit/CMakeLists.txt | 1 +
third_party/curl | 1 +
11 files changed, 169 insertions(+), 22 deletions(-)
create mode 100644 cmake/BuildLibCURL.cmake
create mode 160000 third_party/curl
--
2.22.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [tarantool-patches] [PATCH 1/2] lua: workaround pwd.getpwall() issue on Fedora 29
2019-08-16 2:32 [tarantool-patches] [PATCH 0/2] Build libcurl statically Alexander Turenko
@ 2019-08-16 2:32 ` Alexander Turenko
2019-08-16 2:32 ` [tarantool-patches] [PATCH 2/2] build: link libcurl statically from a submodule Alexander Turenko
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Alexander Turenko @ 2019-08-16 2:32 UTC (permalink / raw)
To: Georgy Kirichenko
Cc: Alexander Turenko, tarantool-patches, Alexander V . Tikhonov,
Mergen Imeev
This is a workaround for systemd-nss issue:
https://github.com/systemd/systemd/issues/9585
The following error is observed on app-tap/pwd.test.lua on Fedora 29
(glibc-2.28-26.fc29, systemd-239-12.git8bca462.fc29) when tarantool is
linked with libcurl w/o GSS-API support:
| builtin/pwd.lua:169: getpwall failed [errno 2]: No such file or directory
Such tarantool build lacks of libselinux.so.1 transitive dependency
(tarantool -> libcurl.so.4 -> libgssapi_krb5.so.2 -> libkrb5support.so.0
-> libselinux.so.1) and strace shows the following calls when
pwd.getpwall() is invoked first time:
| openat(AT_FDCWD, "/lib64/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 7A
| <...>
| access("/etc/selinux/config", F_OK) = -1 ENOENT (No such file or directory)
It looks like a part of libselinux initialization code and is invoked
during execution of a last ffi.C.getpwent() call that returns `nil` as a
result and left errno set to ENOENT. Our pwd module set errno to zero
before getpwent() call and expects that it will be preserved if no
unrecoverable errors occur. It seems that this expectation is not meet
due to the systemd-nss issue linked above.
Second and next getpwall() calls will succeed, so the commit adds an
extra getpwall() during pwd module load. This workaround is disabled on
FreeBSD due to another issue: #4428 ('getpwall() hangs on FreeBSD 12').
See also the previous related commit:
efccac691a4609c11f555a11704e91af4cda0836 ('lua: fix error handling in
getpwall and getgrall').
Follows up #3766.
Part of #4318.
---
src/lua/pwd.lua | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/lua/pwd.lua b/src/lua/pwd.lua
index 58c2e94f3..b6de1562f 100644
--- a/src/lua/pwd.lua
+++ b/src/lua/pwd.lua
@@ -194,6 +194,19 @@ local function getgrall()
return grs
end
+-- Workaround pwd.getpwall() issue on Fedora 29: successful
+-- getgrent() call that should normally return NULL and preserve
+-- errno, set it to ENOENT due to systemd-nss issue [1] when a
+-- password database is traversed first time.
+--
+-- [1]: https://github.com/systemd/systemd/issues/9585
+--
+-- It is disabled on FreeBSD due to gh-4428: getpwall() hangs on
+-- FreeBSD 12.
+if jit.os ~= 'BSD' then
+ pcall(getpwall)
+end
+
return {
getpw = getpw,
getgr = getgr,
--
2.22.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [tarantool-patches] [PATCH 2/2] build: link libcurl statically from a submodule
2019-08-16 2:32 [tarantool-patches] [PATCH 0/2] Build libcurl statically Alexander Turenko
2019-08-16 2:32 ` [tarantool-patches] [PATCH 1/2] lua: workaround pwd.getpwall() issue on Fedora 29 Alexander Turenko
@ 2019-08-16 2:32 ` Alexander Turenko
2019-08-19 22:54 ` [tarantool-patches] Re: [PATCH 0/2] Build libcurl statically Alexander Turenko
2019-08-22 8:42 ` Kirill Yukhin
3 siblings, 0 replies; 6+ messages in thread
From: Alexander Turenko @ 2019-08-16 2:32 UTC (permalink / raw)
To: Georgy Kirichenko
Cc: Mergen Imeev, tarantool-patches, Alexander V . Tikhonov, Mergen Imeev
From: Mergen Imeev <imeevma@gmail.com>
Hold libcurl-7.65.3. This version is not affected by the following
issues:
* #4180 ('httpc: redirects are broken with libcurl-7.30 and older');
* #4389 ('libcurl memory leak');
* #4397 ('HTTPS seem to be unstable').
After this patch libcurl will be statically linked when
ENABLE_BUNDLED_LIBCURL option is set. This option is set by default.
Closes #4318
@TarantoolBot document
Title: Tarantool dependency list was changed
* Added build dependencies: autoconf, automake, libtool, zlib-devel
(zlib1g-dev on Debian).
* Added runtime dependencies: zlib (zlib1g on Debian).
* Removed build dependencies: libcurl-devel (libcurl4-openssl-dev on
Debian).
* Removed runtime dependencies: curl.
The reason is that now we use compiled-in libcurl: so we don't depend on
a system libcurl, but inherit its dependencies.
---
.gitmodules | 3 +
.travis.mk | 8 +--
CMakeLists.txt | 12 +++-
Dockerfile.staticbuild | 14 +----
cmake/BuildLibCURL.cmake | 118 +++++++++++++++++++++++++++++++++++++++
debian/control | 9 ++-
rpm/tarantool.spec | 9 ++-
src/CMakeLists.txt | 3 +
test/unit/CMakeLists.txt | 1 +
third_party/curl | 1 +
10 files changed, 156 insertions(+), 22 deletions(-)
create mode 100644 cmake/BuildLibCURL.cmake
create mode 160000 third_party/curl
diff --git a/.gitmodules b/.gitmodules
index 1062f7379..ac13f1c3f 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -37,3 +37,6 @@
[submodule "third_party/serpent"]
path = third_party/serpent
url = https://github.com/tarantool/serpent.git
+[submodule "third_party/curl"]
+ path = third_party/curl
+ url = https://github.com/curl/curl.git
diff --git a/.travis.mk b/.travis.mk
index c0c23b6d7..4e43ad6f3 100644
--- a/.travis.mk
+++ b/.travis.mk
@@ -52,7 +52,7 @@ deps_debian:
libcurl4-openssl-dev libunwind-dev libicu-dev \
python python-pip python-setuptools python-dev \
python-msgpack python-yaml python-argparse python-six python-gevent \
- lcov ruby clang llvm llvm-dev
+ lcov ruby clang llvm llvm-dev zlib1g-dev autoconf automake libtool
deps_buster_clang_8: deps_debian
echo "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-8 main" > /etc/apt/sources.list.d/clang_8.list
@@ -117,7 +117,7 @@ test_asan_debian: deps_debian deps_buster_clang_8 test_asan_debian_no_deps
deps_osx:
brew update
- brew install openssl readline curl icu4c libiconv --force
+ brew install openssl readline curl icu4c libiconv zlib autoconf automake libtool --force
python2 -V || brew install python2 --force
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py >get-pip.py
python get-pip.py --user
@@ -152,10 +152,10 @@ test_osx: deps_osx test_osx_no_deps
deps_freebsd:
sudo pkg install -y git cmake gmake gcc coreutils \
- readline ncurses libyaml openssl curl libunwind icu \
+ readline ncurses libyaml openssl libunwind icu \
python27 py27-pip py27-setuptools py27-daemon \
py27-yaml py27-argparse py27-six py27-gevent \
- gdb bash
+ gdb bash autoconf automake libtool
build_freebsd:
cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON ${CMAKE_EXTRA_PARAMS}
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bfb15effb..9b3950bdf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -334,8 +334,15 @@ endif()
#
# Curl
#
-set(CURL_FIND_REQUIRED ON)
-find_package(CURL)
+option(ENABLE_BUNDLED_LIBCURL "Enable building of the bundled libcurl" ON)
+if (ENABLE_BUNDLED_LIBCURL)
+ include(BuildLibCURL)
+ curl_build()
+ add_dependencies(build_bundled_libs bundled-libcurl)
+else()
+ set(CURL_FIND_REQUIRED ON)
+ find_package(CURL)
+endif()
#
# ReadLine
@@ -525,6 +532,7 @@ set(options PACKAGE VERSION BUILD C_COMPILER CXX_COMPILER C_FLAGS CXX_FLAGS
ENABLE_BACKTRACE
ENABLE_DOC
ENABLE_DIST
+ ENABLE_BUNDLED_LIBCURL
ENABLE_BUNDLED_LIBYAML
ENABLE_BUNDLED_MSGPUCK)
foreach(option IN LISTS options)
diff --git a/Dockerfile.staticbuild b/Dockerfile.staticbuild
index 6a784990b..9f97aa910 100644
--- a/Dockerfile.staticbuild
+++ b/Dockerfile.staticbuild
@@ -19,7 +19,7 @@ RUN set -x \
zip \
unzip \
libunwind \
- libcurl \
+ zlib \
&& yum -y install \
perl \
gcc-c++ \
@@ -43,18 +43,9 @@ RUN set -x && \
curl -O -L https://www.openssl.org/source/openssl-1.1.0h.tar.gz && \
tar -xvf openssl-1.1.0h.tar.gz && \
cd openssl-1.1.0h && \
- ./config && \
+ ./config --libdir=lib && \
make && make install
-RUN set -x && \
- cd / && \
- git clone https://github.com/curl/curl.git && \
- cd curl && \
- git checkout curl-7_59_0 && \
- ./buildconf && \
- LD_LIBRARY_PATH=/usr/local/lib64 LIBS=" -lssl -lcrypto -ldl" ./configure --enable-static --enable-shared --with-ssl && \
- make -j && make install
-
RUN set -x && \
cd / && \
wget http://download.icu-project.org/files/icu4c/62.1/icu4c-62_1-src.tgz && \
@@ -86,6 +77,7 @@ RUN set -x \
-DENABLE_DIST:BOOL=ON \
-DBUILD_STATIC=ON \
-DOPENSSL_USE_STATIC_LIBS=ON \
+ -DOPENSSL_ROOT_DIR=/usr/local \
.) \
&& make -C /tarantool -j
diff --git a/cmake/BuildLibCURL.cmake b/cmake/BuildLibCURL.cmake
new file mode 100644
index 000000000..866b3c49e
--- /dev/null
+++ b/cmake/BuildLibCURL.cmake
@@ -0,0 +1,118 @@
+# A macro to build the bundled libcurl
+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)
+
+ if (BUILD_STATIC)
+ set(LIBZ_LIB_NAME libz.a)
+ else()
+ set(LIBZ_LIB_NAME z)
+ endif()
+ find_library(LIBZ_LIBRARY NAMES ${LIBZ_LIB_NAME})
+ if ("${LIBZ_LIBRARY}" STREQUAL "LIBZ_LIBRARY-NOTFOUND")
+ message(FATAL_ERROR "Unable to find zlib")
+ endif()
+
+ # Set curl option to find OpenSSL library.
+ if ("${OPENSSL_ROOT_DIR}" STREQUAL "")
+ # Linux / FreeBSD.
+ set(LIBCURL_OPENSSL_OPT "--with-ssl")
+ else()
+ # Mac OS.
+ set(LIBCURL_OPENSSL_OPT "--with-ssl=${OPENSSL_ROOT_DIR}")
+ endif()
+
+ include(ExternalProject)
+ ExternalProject_Add(
+ bundled-libcurl-project
+ SOURCE_DIR ${LIBCURL_SOURCE_DIR}
+ PREFIX ${LIBCURL_INSTALL_DIR}
+ DOWNLOAD_DIR ${LIBCURL_BINARY_DIR}
+ TMP_DIR ${LIBCURL_BINARY_DIR}/tmp
+ STAMP_DIR ${LIBCURL_BINARY_DIR}/stamp
+ BINARY_DIR ${LIBCURL_BINARY_DIR}
+ CONFIGURE_COMMAND
+ cd <SOURCE_DIR> && ./buildconf &&
+ cd <BINARY_DIR> && <SOURCE_DIR>/configure
+ --prefix <INSTALL_DIR>
+ --enable-static
+ --enable-shared
+
+ --with-zlib
+ ${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
+
+ --enable-http
+ --enable-proxy
+ --enable-ipv6
+ --enable-threaded-resolver
+ --enable-unix-sockets
+ --enable-cookies
+ --enable-http-auth
+ --enable-mime
+ --enable-dateparse
+
+ --disable-ares
+ --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)
+ INSTALL_COMMAND cd <BINARY_DIR> && $(MAKE) install)
+
+ add_library(bundled-libcurl STATIC IMPORTED GLOBAL)
+ set_target_properties(bundled-libcurl PROPERTIES IMPORTED_LOCATION
+ ${LIBCURL_INSTALL_DIR}/lib/libcurl.a)
+ add_dependencies(bundled-libcurl bundled-libcurl-project)
+
+ set(CURL_INCLUDE_DIRS ${LIBCURL_INSTALL_DIR}/include)
+ set(CURL_LIBRARIES bundled-libcurl ${LIBZ_LIBRARY})
+ if (TARGET_OS_LINUX OR TARGET_OS_FREEBSD)
+ set(CURL_LIBRARIES ${CURL_LIBRARIES} rt)
+ endif()
+
+ unset(LIBCURL_INSTALL_DIR)
+ unset(LIBCURL_BINARY_DIR)
+ unset(LIBCURL_SOURCE_DIR)
+endmacro(curl_build)
diff --git a/debian/control b/debian/control
index b9d9e1862..91d0b0e44 100644
--- a/debian/control
+++ b/debian/control
@@ -10,9 +10,10 @@ Build-Depends: cdbs (>= 0.4.100), debhelper (>= 9), dpkg-dev (>= 1.16.1~),
libncurses5-dev,
libyaml-dev,
libssl-dev,
- libcurl4-gnutls-dev | libcurl4-openssl-dev | libcurl4-nss-dev,
libunwind-dev | libunwind8-dev | libunwind7-dev,
libicu-dev,
+# libcurl build dependencies
+ autoconf, automake, libtool, zlib1g-dev,
Section: database
Standards-Version: 3.9.8
Homepage: http://tarantool.org/
@@ -42,7 +43,7 @@ Replaces: tarantool-common (<< 1.5.3), tarantool-lts-common
Depends: ${misc:Depends}, adduser, lsb-base,
# Deps for built-in package manager
# https://github.com/tarantool/tarantool/issues/2612
- openssl, curl
+ openssl
Recommends: tarantool-dev, git, build-essential, cmake
Description: Tarantool in-memory database - common files
Tarantool is an in-memory database and Lua application server.
@@ -53,7 +54,9 @@ Package: tarantool
Architecture: i386 amd64 armhf arm64
Priority: optional
Depends: ${shlibs:Depends}, ${misc:Depends}, netbase, binutils, libgomp1,
- libyaml-0-2, openssl, tarantool-common (>= 1.7.5.46)
+ libyaml-0-2, openssl, tarantool-common (>= 1.7.5.46),
+# libcurl dependencies (except ones we have already)
+ zlib1g
Replaces: tarantool-lts
Conflicts: tarantool-lts-modules,
tarantool-lts-postgresql-module,
diff --git a/rpm/tarantool.spec b/rpm/tarantool.spec
index 002df26b1..10daf1458 100644
--- a/rpm/tarantool.spec
+++ b/rpm/tarantool.spec
@@ -17,7 +17,6 @@ BuildRequires: sed
BuildRequires: readline-devel
BuildRequires: libyaml-devel
BuildRequires: openssl-devel
-BuildRequires: libcurl-devel
BuildRequires: libicu-devel
#BuildRequires: msgpuck-devel
%if 0%{?fedora} > 0
@@ -27,6 +26,13 @@ BuildRequires: perl-podlators
Requires(pre): %{_sbindir}/useradd
Requires(pre): %{_sbindir}/groupadd
+# libcurl dependencies (except ones we have already).
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: libtool
+BuildRequires: zlib-devel
+Requires: zlib
+
%if %{with systemd}
Requires(post): systemd
Requires(preun): systemd
@@ -84,7 +90,6 @@ Requires: /etc/services
# Deps for built-in package manager
# https://github.com/tarantool/tarantool/issues/2612
Requires: openssl
-Requires: curl
%if (0%{?fedora} >= 22 || 0%{?rhel} >= 8)
# RHEL <= 7 doesn't support Recommends:
Recommends: tarantool-devel
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index acd719e9b..e12de6005 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -168,6 +168,7 @@ endif()
set_source_files_compile_flags(${server_sources})
add_library(server STATIC ${server_sources})
+add_dependencies(server build_bundled_libs)
target_link_libraries(server core coll http_parser bit uri uuid swim swim_udp
swim_ev crypto)
@@ -226,6 +227,8 @@ if(BUILD_STATIC)
list(APPEND EXPORT_LIST ${SYMBOLS_LIB})
# set variable to allow rescan (CMake depended)
set(SYMBOLS_LIB "SYMBOLS_LIB-NOTFOUND")
+ elseif (${libstatic} STREQUAL bundled-libcurl)
+ message("We don't need to export symbols from statically linked libcurl, skipped")
else()
message(WARNING "${libstatic} should be a static")
endif()
diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt
index 73ee0a974..4a57597e9 100644
--- a/test/unit/CMakeLists.txt
+++ b/test/unit/CMakeLists.txt
@@ -10,6 +10,7 @@ include_directories(${PROJECT_BINARY_DIR}/src)
include_directories(${PROJECT_SOURCE_DIR}/src/box)
include_directories(${CMAKE_SOURCE_DIR}/third_party)
include_directories(${ICU_INCLUDE_DIRS})
+include_directories(${CURL_INCLUDE_DIRS})
add_library(unit STATIC unit.c)
diff --git a/third_party/curl b/third_party/curl
new file mode 160000
index 000000000..aa73eb47b
--- /dev/null
+++ b/third_party/curl
@@ -0,0 +1 @@
+Subproject commit aa73eb47bc8583070734696b25b34ad54c2c1f5e
--
2.22.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [tarantool-patches] Re: [PATCH 0/2] Build libcurl statically
2019-08-16 2:32 [tarantool-patches] [PATCH 0/2] Build libcurl statically Alexander Turenko
2019-08-16 2:32 ` [tarantool-patches] [PATCH 1/2] lua: workaround pwd.getpwall() issue on Fedora 29 Alexander Turenko
2019-08-16 2:32 ` [tarantool-patches] [PATCH 2/2] build: link libcurl statically from a submodule Alexander Turenko
@ 2019-08-19 22:54 ` Alexander Turenko
2019-08-20 7:51 ` Георгий Кириченко
2019-08-22 8:42 ` Kirill Yukhin
3 siblings, 1 reply; 6+ messages in thread
From: Alexander Turenko @ 2019-08-19 22:54 UTC (permalink / raw)
To: Georgy Kirichenko; +Cc: tarantool-patches, Alexander V . Tikhonov, Mergen Imeev
> https://github.com/tarantool/tarantool/issues/4318
> https://github.com/tarantool/tarantool/tree/imeevma/gh-4318-link-libcurl-statically-full-ci
>
> CI now fails, because some SQL tests were not updated properly on
> master. I'll rebase the branch when it will be fixed and will ensure
> that everything work.
CI is now okay.
----
Georgy asks me to ensure that openssl links statically when it is
requested with -DOPENSSL_USE_STATIC_LIBS=ON CMake option (correct me if
I misunderstood something).
I had performed several builds on my Gentoo box on master
(2.3.0-26-gd0e38d59f) and
imeevma/gh-4318-link-libcurl-statically-full-ci (2.3.0-23-gdcd4795bb)
branches.
The following patch was temporary applied to pass builds with
-DOPENSSL_USE_STATIC_LIBS=ON, but without -DBUILD_STATIC=ON (it is
needed both on master and on the feature branch).
| diff --git a/CMakeLists.txt b/CMakeLists.txt
| index bfb15effb..4b542e655 100644
| --- a/CMakeLists.txt
| +++ b/CMakeLists.txt
| @@ -329,6 +329,9 @@ endif()
| if(BUILD_STATIC)
| find_library(Z_LIBRARY libz.a)
| set(OPENSSL_LIBRARIES ${OPENSSL_LIBRARIES} ${Z_LIBRARY})
| +elseif(NOT BUILD_STATIC AND OPENSSL_USE_STATIC_LIBS)
| + find_library(Z_LIBRARY z)
| + set(OPENSSL_LIBRARIES ${OPENSSL_LIBRARIES} ${Z_LIBRARY})
| endif()
|
| #
(I don't sure I understood how it works, so I'll think about it, will
file an issue and will send a patch later separately.)
The raw results are below, they looks okay for me. Georgy, can you,
please, look into them and answer whether it answers your question?
WBR, Alexander Turenko.
master
------
$ cmake . -DCMAKE_BUILD_TYPE=Debug -DENABLE_BACKTRACE=ON -DENABLE_DIST=ON && make -j
$ lddtree src/tarantool
tarantool => src/tarantool (interpreter => /lib64/ld-linux-x86-64.so.2)
tarantool => src/tarantool (interpreter => /lib64/ld-linux-x86-64.so.2)
libicui18n.so.64 => /usr/lib64/libicui18n.so.64
libicuuc.so.64 => /usr/lib64/libicuuc.so.64
libicudata.so.64 => /usr/lib64/libicudata.so.64
libreadline.so.8 => /lib64/libreadline.so.8
libncurses.so.6 => /lib64/libncurses.so.6
libform.so.6 => /usr/lib64/libform.so.6
libcurl.so.4 => /usr/lib64/libcurl.so.4
libnghttp2.so.14 => //usr/lib64/libnghttp2.so.14
libz.so.1 => /lib64/libz.so.1
libssl.so.1.1 => /usr/lib64/libssl.so.1.1
libcrypto.so.1.1 => /usr/lib64/libcrypto.so.1.1
libdl.so.2 => /lib64/libdl.so.2
ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
librt.so.1 => /lib64/librt.so.1
libpthread.so.0 => /lib64/libpthread.so.0
libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgcc_s.so.1
libunwind-x86_64.so.8 => /usr/lib64/libunwind-x86_64.so.8
libunwind.so.8 => /usr/lib64/libunwind.so.8
libgomp.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgomp.so.1
libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libstdc++.so.6
libm.so.6 => /lib64/libm.so.6
libc.so.6 => /lib64/libc.so.6
Expected: dynamic libssl, libcrypto (ok).
$ cmake . -DCMAKE_BUILD_TYPE=Debug -DENABLE_BACKTRACE=ON -DENABLE_DIST=ON -DBUILD_STATIC=ON && make -j
$ lddtree src/tarantool
tarantool => src/tarantool (interpreter => /lib64/ld-linux-x86-64.so.2)
libssl.so.1.1 => /usr/lib64/libssl.so.1.1
libz.so.1 => /lib64/libz.so.1
libcrypto.so.1.1 => /usr/lib64/libcrypto.so.1.1
libdl.so.2 => /lib64/libdl.so.2
libpthread.so.0 => /lib64/libpthread.so.0
librt.so.1 => /lib64/librt.so.1
libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgcc_s.so.1
libm.so.6 => /lib64/libm.so.6
libc.so.6 => /lib64/libc.so.6
ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
Expected: dynamic libssl, libcrypto (ok).
$ cmake . -DCMAKE_BUILD_TYPE=Debug -DENABLE_BACKTRACE=ON -DENABLE_DIST=ON -DOPENSSL_USE_STATIC_LIBS=ON && make -j
$ lddtree src/tarantool
tarantool => src/tarantool (interpreter => /lib64/ld-linux-x86-64.so.2)
libicui18n.so.64 => /usr/lib64/libicui18n.so.64
libicuuc.so.64 => /usr/lib64/libicuuc.so.64
libicudata.so.64 => /usr/lib64/libicudata.so.64
libreadline.so.8 => /lib64/libreadline.so.8
libncurses.so.6 => /lib64/libncurses.so.6
libform.so.6 => /usr/lib64/libform.so.6
libcurl.so.4 => /usr/lib64/libcurl.so.4
libnghttp2.so.14 => //usr/lib64/libnghttp2.so.14
libssl.so.1.1 => //usr/lib64/libssl.so.1.1
libcrypto.so.1.1 => //usr/lib64/libcrypto.so.1.1
libdl.so.2 => /lib64/libdl.so.2
ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
libz.so.1 => /lib64/libz.so.1
librt.so.1 => /lib64/librt.so.1
libpthread.so.0 => /lib64/libpthread.so.0
libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgcc_s.so.1
libunwind-x86_64.so.8 => /usr/lib64/libunwind-x86_64.so.8
libunwind.so.8 => /usr/lib64/libunwind.so.8
libgomp.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgomp.so.1
libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libstdc++.so.6
libm.so.6 => /lib64/libm.so.6
libc.so.6 => /lib64/libc.so.6
Expected: static libssl, libcrypto (ok).
Note: System libcurl is linked dynamically into tarantool and links its
dependencies libssl/libcrypto dynamically too. We cannot change a system
library. So it is also expected behaviour (but only for master, when we does
not build libcurl ourself).
$ cmake . -DCMAKE_BUILD_TYPE=Debug -DENABLE_BACKTRACE=ON -DENABLE_DIST=ON -DBUILD_STATIC=ON -DOPENSSL_USE_STATIC_LIBS=ON && make -j
$ lddtree src/tarantool
tarantool => src/tarantool (interpreter => /lib64/ld-linux-x86-64.so.2)
libdl.so.2 => /lib64/libdl.so.2
libpthread.so.0 => /lib64/libpthread.so.0
librt.so.1 => /lib64/librt.so.1
libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgcc_s.so.1
libm.so.6 => /lib64/libm.so.6
libc.so.6 => /lib64/libc.so.6
ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
Expected: static libssl, libcrypto (ok).
imeevma/gh-4318-link-libcurl-statically-full-ci
-----------------------------------------------
$ cmake . -DCMAKE_BUILD_TYPE=Debug -DENABLE_BACKTRACE=ON -DENABLE_DIST=ON && make -j
$ lddtree src/tarantool
tarantool => src/tarantool (interpreter => /lib64/ld-linux-x86-64.so.2)
tarantool => src/tarantool (interpreter => /lib64/ld-linux-x86-64.so.2)
libicui18n.so.64 => /usr/lib64/libicui18n.so.64
libicuuc.so.64 => /usr/lib64/libicuuc.so.64
libicudata.so.64 => /usr/lib64/libicudata.so.64
libreadline.so.8 => /lib64/libreadline.so.8
libncurses.so.6 => /lib64/libncurses.so.6
libform.so.6 => /usr/lib64/libform.so.6
libz.so.1 => /lib64/libz.so.1
librt.so.1 => /lib64/librt.so.1
libssl.so.1.1 => /usr/lib64/libssl.so.1.1
libcrypto.so.1.1 => /usr/lib64/libcrypto.so.1.1
libdl.so.2 => /lib64/libdl.so.2
ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
libpthread.so.0 => /lib64/libpthread.so.0
libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgcc_s.so.1
libunwind-x86_64.so.8 => /usr/lib64/libunwind-x86_64.so.8
libunwind.so.8 => /usr/lib64/libunwind.so.8
libgomp.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgomp.so.1
libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libstdc++.so.6
libm.so.6 => /lib64/libm.so.6
libc.so.6 => /lib64/libc.so.6
Expected: dynamic libssl, libcrypto (ok).
$ cmake . -DCMAKE_BUILD_TYPE=Debug -DENABLE_BACKTRACE=ON -DENABLE_DIST=ON -DBUILD_STATIC=ON && make -j
$ lddtree src/tarantool
tarantool => src/tarantool (interpreter => /lib64/ld-linux-x86-64.so.2)
librt.so.1 => /lib64/librt.so.1
libssl.so.1.1 => /usr/lib64/libssl.so.1.1
libz.so.1 => /lib64/libz.so.1
libcrypto.so.1.1 => /usr/lib64/libcrypto.so.1.1
libdl.so.2 => /lib64/libdl.so.2
libpthread.so.0 => /lib64/libpthread.so.0
libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgcc_s.so.1
libm.so.6 => /lib64/libm.so.6
libc.so.6 => /lib64/libc.so.6
ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
Expected: dynamic libssl, libcrypto (ok).
$ cmake . -DCMAKE_BUILD_TYPE=Debug -DENABLE_BACKTRACE=ON -DENABLE_DIST=ON -DOPENSSL_USE_STATIC_LIBS=ON && make -j
$ lddtree src/tarantool
tarantool => src/tarantool (interpreter => /lib64/ld-linux-x86-64.so.2)
libicui18n.so.64 => /usr/lib64/libicui18n.so.64
libicuuc.so.64 => /usr/lib64/libicuuc.so.64
libicudata.so.64 => /usr/lib64/libicudata.so.64
libreadline.so.8 => /lib64/libreadline.so.8
libncurses.so.6 => /lib64/libncurses.so.6
libform.so.6 => /usr/lib64/libform.so.6
libz.so.1 => /lib64/libz.so.1
librt.so.1 => /lib64/librt.so.1
libdl.so.2 => /lib64/libdl.so.2
ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
libpthread.so.0 => /lib64/libpthread.so.0
libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgcc_s.so.1
libunwind-x86_64.so.8 => /usr/lib64/libunwind-x86_64.so.8
libunwind.so.8 => /usr/lib64/libunwind.so.8
libgomp.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgomp.so.1
libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libstdc++.so.6
libm.so.6 => /lib64/libm.so.6
libc.so.6 => /lib64/libc.so.6
Expected: static libssl, libcrypto (ok).
$ cmake . -DCMAKE_BUILD_TYPE=Debug -DENABLE_BACKTRACE=ON -DENABLE_DIST=ON -DBUILD_STATIC=ON -DOPENSSL_USE_STATIC_LIBS=ON && make -j
$ lddtree src/tarantool
tarantool => src/tarantool (interpreter => /lib64/ld-linux-x86-64.so.2)
librt.so.1 => /lib64/librt.so.1
libdl.so.2 => /lib64/libdl.so.2
libpthread.so.0 => /lib64/libpthread.so.0
libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgcc_s.so.1
libm.so.6 => /lib64/libm.so.6
libc.so.6 => /lib64/libc.so.6
ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
Expected: static libssl, libcrypto (ok).
^ permalink raw reply [flat|nested] 6+ messages in thread
* [tarantool-patches] Re: [PATCH 0/2] Build libcurl statically
2019-08-19 22:54 ` [tarantool-patches] Re: [PATCH 0/2] Build libcurl statically Alexander Turenko
@ 2019-08-20 7:51 ` Георгий Кириченко
0 siblings, 0 replies; 6+ messages in thread
From: Георгий Кириченко @ 2019-08-20 7:51 UTC (permalink / raw)
To: tarantool-patches; +Cc: Alexander Turenko, Alexander V . Tikhonov, Mergen Imeev
[-- Attachment #1: Type: text/plain, Size: 10351 bytes --]
Alexander, Mergen thank you very much.
Ok to push
On Tuesday, August 20, 2019 1:54:36 AM MSK Alexander Turenko wrote:
> > https://github.com/tarantool/tarantool/issues/4318
> > https://github.com/tarantool/tarantool/tree/imeevma/gh-4318-link-libcurl-s
> > tatically-full-ci
> >
> > CI now fails, because some SQL tests were not updated properly on
> > master. I'll rebase the branch when it will be fixed and will ensure
> > that everything work.
>
> CI is now okay.
>
> ----
>
> Georgy asks me to ensure that openssl links statically when it is
> requested with -DOPENSSL_USE_STATIC_LIBS=ON CMake option (correct me if
> I misunderstood something).
>
> I had performed several builds on my Gentoo box on master
> (2.3.0-26-gd0e38d59f) and
> imeevma/gh-4318-link-libcurl-statically-full-ci (2.3.0-23-gdcd4795bb)
> branches.
>
> The following patch was temporary applied to pass builds with
> -DOPENSSL_USE_STATIC_LIBS=ON, but without -DBUILD_STATIC=ON (it is
> needed both on master and on the feature branch).
>
> | diff --git a/CMakeLists.txt b/CMakeLists.txt
> | index bfb15effb..4b542e655 100644
> | --- a/CMakeLists.txt
> | +++ b/CMakeLists.txt
> | @@ -329,6 +329,9 @@ endif()
> |
> | if(BUILD_STATIC)
> |
> | find_library(Z_LIBRARY libz.a)
> | set(OPENSSL_LIBRARIES ${OPENSSL_LIBRARIES} ${Z_LIBRARY})
> |
> | +elseif(NOT BUILD_STATIC AND OPENSSL_USE_STATIC_LIBS)
> | + find_library(Z_LIBRARY z)
> | + set(OPENSSL_LIBRARIES ${OPENSSL_LIBRARIES} ${Z_LIBRARY})
> |
> | endif()
> |
> | #
>
> (I don't sure I understood how it works, so I'll think about it, will
> file an issue and will send a patch later separately.)
>
> The raw results are below, they looks okay for me. Georgy, can you,
> please, look into them and answer whether it answers your question?
>
> WBR, Alexander Turenko.
>
> master
> ------
>
> $ cmake . -DCMAKE_BUILD_TYPE=Debug -DENABLE_BACKTRACE=ON -DENABLE_DIST=ON &&
> make -j $ lddtree src/tarantool
> tarantool => src/tarantool (interpreter => /lib64/ld-linux-x86-64.so.2)
> tarantool => src/tarantool (interpreter => /lib64/ld-linux-x86-64.so.2)
> libicui18n.so.64 => /usr/lib64/libicui18n.so.64
> libicuuc.so.64 => /usr/lib64/libicuuc.so.64
> libicudata.so.64 => /usr/lib64/libicudata.so.64
> libreadline.so.8 => /lib64/libreadline.so.8
> libncurses.so.6 => /lib64/libncurses.so.6
> libform.so.6 => /usr/lib64/libform.so.6
> libcurl.so.4 => /usr/lib64/libcurl.so.4
> libnghttp2.so.14 => //usr/lib64/libnghttp2.so.14
> libz.so.1 => /lib64/libz.so.1
> libssl.so.1.1 => /usr/lib64/libssl.so.1.1
> libcrypto.so.1.1 => /usr/lib64/libcrypto.so.1.1
> libdl.so.2 => /lib64/libdl.so.2
> ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
> librt.so.1 => /lib64/librt.so.1
> libpthread.so.0 => /lib64/libpthread.so.0
> libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgcc_s.so.1
> libunwind-x86_64.so.8 => /usr/lib64/libunwind-x86_64.so.8
> libunwind.so.8 => /usr/lib64/libunwind.so.8
> libgomp.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgomp.so.1
> libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libstdc++.so.6
> libm.so.6 => /lib64/libm.so.6
> libc.so.6 => /lib64/libc.so.6
>
> Expected: dynamic libssl, libcrypto (ok).
>
> $ cmake . -DCMAKE_BUILD_TYPE=Debug -DENABLE_BACKTRACE=ON -DENABLE_DIST=ON
> -DBUILD_STATIC=ON && make -j $ lddtree src/tarantool
> tarantool => src/tarantool (interpreter => /lib64/ld-linux-x86-64.so.2)
> libssl.so.1.1 => /usr/lib64/libssl.so.1.1
> libz.so.1 => /lib64/libz.so.1
> libcrypto.so.1.1 => /usr/lib64/libcrypto.so.1.1
> libdl.so.2 => /lib64/libdl.so.2
> libpthread.so.0 => /lib64/libpthread.so.0
> librt.so.1 => /lib64/librt.so.1
> libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgcc_s.so.1
> libm.so.6 => /lib64/libm.so.6
> libc.so.6 => /lib64/libc.so.6
> ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
>
> Expected: dynamic libssl, libcrypto (ok).
>
> $ cmake . -DCMAKE_BUILD_TYPE=Debug -DENABLE_BACKTRACE=ON -DENABLE_DIST=ON
> -DOPENSSL_USE_STATIC_LIBS=ON && make -j $ lddtree src/tarantool
> tarantool => src/tarantool (interpreter => /lib64/ld-linux-x86-64.so.2)
> libicui18n.so.64 => /usr/lib64/libicui18n.so.64
> libicuuc.so.64 => /usr/lib64/libicuuc.so.64
> libicudata.so.64 => /usr/lib64/libicudata.so.64
> libreadline.so.8 => /lib64/libreadline.so.8
> libncurses.so.6 => /lib64/libncurses.so.6
> libform.so.6 => /usr/lib64/libform.so.6
> libcurl.so.4 => /usr/lib64/libcurl.so.4
> libnghttp2.so.14 => //usr/lib64/libnghttp2.so.14
> libssl.so.1.1 => //usr/lib64/libssl.so.1.1
> libcrypto.so.1.1 => //usr/lib64/libcrypto.so.1.1
> libdl.so.2 => /lib64/libdl.so.2
> ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
> libz.so.1 => /lib64/libz.so.1
> librt.so.1 => /lib64/librt.so.1
> libpthread.so.0 => /lib64/libpthread.so.0
> libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgcc_s.so.1
> libunwind-x86_64.so.8 => /usr/lib64/libunwind-x86_64.so.8
> libunwind.so.8 => /usr/lib64/libunwind.so.8
> libgomp.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgomp.so.1
> libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libstdc++.so.6
> libm.so.6 => /lib64/libm.so.6
> libc.so.6 => /lib64/libc.so.6
>
> Expected: static libssl, libcrypto (ok).
>
> Note: System libcurl is linked dynamically into tarantool and links its
> dependencies libssl/libcrypto dynamically too. We cannot change a system
> library. So it is also expected behaviour (but only for master, when we does
> not build libcurl ourself).
>
> $ cmake . -DCMAKE_BUILD_TYPE=Debug -DENABLE_BACKTRACE=ON -DENABLE_DIST=ON
> -DBUILD_STATIC=ON -DOPENSSL_USE_STATIC_LIBS=ON && make -j $ lddtree
> src/tarantool
> tarantool => src/tarantool (interpreter => /lib64/ld-linux-x86-64.so.2)
> libdl.so.2 => /lib64/libdl.so.2
> libpthread.so.0 => /lib64/libpthread.so.0
> librt.so.1 => /lib64/librt.so.1
> libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgcc_s.so.1
> libm.so.6 => /lib64/libm.so.6
> libc.so.6 => /lib64/libc.so.6
> ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
>
> Expected: static libssl, libcrypto (ok).
>
> imeevma/gh-4318-link-libcurl-statically-full-ci
> -----------------------------------------------
>
> $ cmake . -DCMAKE_BUILD_TYPE=Debug -DENABLE_BACKTRACE=ON -DENABLE_DIST=ON &&
> make -j $ lddtree src/tarantool
> tarantool => src/tarantool (interpreter => /lib64/ld-linux-x86-64.so.2)
> tarantool => src/tarantool (interpreter => /lib64/ld-linux-x86-64.so.2)
> libicui18n.so.64 => /usr/lib64/libicui18n.so.64
> libicuuc.so.64 => /usr/lib64/libicuuc.so.64
> libicudata.so.64 => /usr/lib64/libicudata.so.64
> libreadline.so.8 => /lib64/libreadline.so.8
> libncurses.so.6 => /lib64/libncurses.so.6
> libform.so.6 => /usr/lib64/libform.so.6
> libz.so.1 => /lib64/libz.so.1
> librt.so.1 => /lib64/librt.so.1
> libssl.so.1.1 => /usr/lib64/libssl.so.1.1
> libcrypto.so.1.1 => /usr/lib64/libcrypto.so.1.1
> libdl.so.2 => /lib64/libdl.so.2
> ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
> libpthread.so.0 => /lib64/libpthread.so.0
> libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgcc_s.so.1
> libunwind-x86_64.so.8 => /usr/lib64/libunwind-x86_64.so.8
> libunwind.so.8 => /usr/lib64/libunwind.so.8
> libgomp.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgomp.so.1
> libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libstdc++.so.6
> libm.so.6 => /lib64/libm.so.6
> libc.so.6 => /lib64/libc.so.6
>
> Expected: dynamic libssl, libcrypto (ok).
>
> $ cmake . -DCMAKE_BUILD_TYPE=Debug -DENABLE_BACKTRACE=ON -DENABLE_DIST=ON
> -DBUILD_STATIC=ON && make -j $ lddtree src/tarantool
> tarantool => src/tarantool (interpreter => /lib64/ld-linux-x86-64.so.2)
> librt.so.1 => /lib64/librt.so.1
> libssl.so.1.1 => /usr/lib64/libssl.so.1.1
> libz.so.1 => /lib64/libz.so.1
> libcrypto.so.1.1 => /usr/lib64/libcrypto.so.1.1
> libdl.so.2 => /lib64/libdl.so.2
> libpthread.so.0 => /lib64/libpthread.so.0
> libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgcc_s.so.1
> libm.so.6 => /lib64/libm.so.6
> libc.so.6 => /lib64/libc.so.6
> ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
>
> Expected: dynamic libssl, libcrypto (ok).
>
> $ cmake . -DCMAKE_BUILD_TYPE=Debug -DENABLE_BACKTRACE=ON -DENABLE_DIST=ON
> -DOPENSSL_USE_STATIC_LIBS=ON && make -j $ lddtree src/tarantool
> tarantool => src/tarantool (interpreter => /lib64/ld-linux-x86-64.so.2)
> libicui18n.so.64 => /usr/lib64/libicui18n.so.64
> libicuuc.so.64 => /usr/lib64/libicuuc.so.64
> libicudata.so.64 => /usr/lib64/libicudata.so.64
> libreadline.so.8 => /lib64/libreadline.so.8
> libncurses.so.6 => /lib64/libncurses.so.6
> libform.so.6 => /usr/lib64/libform.so.6
> libz.so.1 => /lib64/libz.so.1
> librt.so.1 => /lib64/librt.so.1
> libdl.so.2 => /lib64/libdl.so.2
> ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
> libpthread.so.0 => /lib64/libpthread.so.0
> libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgcc_s.so.1
> libunwind-x86_64.so.8 => /usr/lib64/libunwind-x86_64.so.8
> libunwind.so.8 => /usr/lib64/libunwind.so.8
> libgomp.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgomp.so.1
> libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libstdc++.so.6
> libm.so.6 => /lib64/libm.so.6
> libc.so.6 => /lib64/libc.so.6
>
> Expected: static libssl, libcrypto (ok).
>
> $ cmake . -DCMAKE_BUILD_TYPE=Debug -DENABLE_BACKTRACE=ON -DENABLE_DIST=ON
> -DBUILD_STATIC=ON -DOPENSSL_USE_STATIC_LIBS=ON && make -j $ lddtree
> src/tarantool
> tarantool => src/tarantool (interpreter => /lib64/ld-linux-x86-64.so.2)
> librt.so.1 => /lib64/librt.so.1
> libdl.so.2 => /lib64/libdl.so.2
> libpthread.so.0 => /lib64/libpthread.so.0
> libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgcc_s.so.1
> libm.so.6 => /lib64/libm.so.6
> libc.so.6 => /lib64/libc.so.6
> ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
>
> Expected: static libssl, libcrypto (ok).
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [tarantool-patches] Re: [PATCH 0/2] Build libcurl statically
2019-08-16 2:32 [tarantool-patches] [PATCH 0/2] Build libcurl statically Alexander Turenko
` (2 preceding siblings ...)
2019-08-19 22:54 ` [tarantool-patches] Re: [PATCH 0/2] Build libcurl statically Alexander Turenko
@ 2019-08-22 8:42 ` Kirill Yukhin
3 siblings, 0 replies; 6+ messages in thread
From: Kirill Yukhin @ 2019-08-22 8:42 UTC (permalink / raw)
To: tarantool-patches
Cc: Georgy Kirichenko, Alexander Turenko, Alexander V . Tikhonov,
Mergen Imeev
Hello,
On 16 Aug 05:32, Alexander Turenko wrote:
> We decided to build libcurl statically to avoid problems with libcurl
> versions that Linux distributives ships (see the list below). I also did
> this for Mac OS and FreeBSD to provide more or less uniform build and
> dependencies list across OSes.
>
> This patchset holds libcurl-7.65.3. AFAIK there is no problems on this
> version that affects our built-in http client. We tested this version
> (also linked statically to tarantool) against the performance
> degradation we observed by our customers on CentOS 7 (#4397) and it
> works good. The following list of issues re built-in http client will
> become unrelevant after this patchset:
>
> * #4180 ('httpc: redirects are broken with libcurl-7.30 and older');
> * #4389 ('libcurl memory leak');
> * #4397 ('HTTPS seem to be unstable').
>
> I didn't close them from a commit however, because it would be good to
> do a little extra work on them: at least bisect and understand what is a
> cause of a problem. Say, it is possible that a problem caused by a
> libcurl build option, but not a specific version. This information would
> be useful to be sure we really don't affected by the issues and will not
> step into the problems in the future.
>
> The patchset contains two patches.
>
> The first one workarounds a systemd issue that affects built-in pwd
> module when tarantool is linked against libcurl w/o GSS API support
> (this is how we build libcurl to link it statically). The problem
> appears on Fedora 29. This is prerequisite to push the second patch.
>
> The second patch enables static libcurl build, enables it by default and
> adjusts all relevant scripts and dependencies.
>
> https://github.com/tarantool/tarantool/issues/4318
> https://github.com/tarantool/tarantool/tree/imeevma/gh-4318-link-libcurl-statically-full-ci
I've checked the patchset into 1.10, 2.1, 2.2 and master.
--
Regards, Kirill Yukhin
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-08-22 8:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-16 2:32 [tarantool-patches] [PATCH 0/2] Build libcurl statically Alexander Turenko
2019-08-16 2:32 ` [tarantool-patches] [PATCH 1/2] lua: workaround pwd.getpwall() issue on Fedora 29 Alexander Turenko
2019-08-16 2:32 ` [tarantool-patches] [PATCH 2/2] build: link libcurl statically from a submodule Alexander Turenko
2019-08-19 22:54 ` [tarantool-patches] Re: [PATCH 0/2] Build libcurl statically Alexander Turenko
2019-08-20 7:51 ` Георгий Кириченко
2019-08-22 8:42 ` Kirill Yukhin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox