[tarantool-patches] Re: [PATCH 0/2] Build libcurl statically

Георгий Кириченко georgy at tarantool.org
Tue Aug 20 10:51:07 MSK 2019


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).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20190820/29c752a0/attachment.sig>


More information about the Tarantool-patches mailing list