* [tarantool-patches] [PATCH v1] Fix static build
@ 2019-06-05 13:20 Alexander V. Tikhonov
2019-06-10 7:48 ` [tarantool-patches] " Alexander Turenko
2019-06-13 8:19 ` Kirill Yukhin
0 siblings, 2 replies; 4+ messages in thread
From: Alexander V. Tikhonov @ 2019-06-05 13:20 UTC (permalink / raw)
To: Alexander Turenko; +Cc: Alexander V. Tikhonov, tarantool-patches
Added to cmake environment CMAKE_DL_LIBS (The name of the library
that has dlopen and dlclose in it, usually -ldl) to openssl build
to add DL library, to fix the following fails:
Linking CXX executable crypto.test
/usr/local/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
dso_dlfcn.c:(.text+0x11): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x24): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x2f): undefined reference to `dlclose'
/usr/local/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
dso_dlfcn.c:(.text+0x334): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x3f2): undefined reference to `dlerror'
/usr/local/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
dso_dlfcn.c:(.text+0x459): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x4c9): undefined reference to `dlclose'
dso_dlfcn.c:(.text+0x502): undefined reference to `dlerror'
/usr/local/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr':
dso_dlfcn.c:(.text+0x5a1): undefined reference to `dladdr'
dso_dlfcn.c:(.text+0x601): undefined reference to `dlerror'
/usr/local/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':
dso_dlfcn.c:(.text+0x662): undefined reference to `dlclose'
collect2: error: ld returned 1 exit status
make[2]: *** [test/unit/crypto.test] Error 1
make[1]: *** [test/unit/CMakeFiles/crypto.test.dir/all] Error 2
Closes #4245
---
Github: https://github.com/tarantool/tarantool/compare/avtikhon/gh-4245-static-build
Issue: https://github.com/tarantool/tarantool/issues/4245
cmake/FindOpenSSL.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmake/FindOpenSSL.cmake b/cmake/FindOpenSSL.cmake
index 8cd22cc8d..f3ee1de24 100644
--- a/cmake/FindOpenSSL.cmake
+++ b/cmake/FindOpenSSL.cmake
@@ -177,7 +177,7 @@ if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
endif ()
endif ()
-set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} )
+set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} ${CMAKE_DL_LIBS})
foreach(_comp IN LISTS OpenSSL_FIND_COMPONENTS)
if(_comp STREQUAL "Crypto")
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tarantool-patches] Re: [PATCH v1] Fix static build
2019-06-05 13:20 [tarantool-patches] [PATCH v1] Fix static build Alexander V. Tikhonov
@ 2019-06-10 7:48 ` Alexander Turenko
2019-06-13 8:19 ` Kirill Yukhin
1 sibling, 0 replies; 4+ messages in thread
From: Alexander Turenko @ 2019-06-10 7:48 UTC (permalink / raw)
To: Alexander V. Tikhonov; +Cc: tarantool-patches, Kirill Yukhin
Thanks!
Using ${CMAKE_DL_LIBS} here is the right thing, because, say, FreeBSD 10
does not contain libdl.
The patch looks good for me.
Kirill, please proceed. I would push it down to 1.10.
WBR, Alexander Turenko.
On Fri, Jun 07, 2019 at 06:55:37AM +0300, Alexander V. Tikhonov wrote:
> Added to cmake environment CMAKE_DL_LIBS (The name of the library
> that has dlopen and dlclose in it, usually -ldl) to openssl build
> to add DL library, to fix the following fails:
>
> Linking CXX executable crypto.test
> /usr/local/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
> dso_dlfcn.c:(.text+0x11): undefined reference to `dlopen'
> dso_dlfcn.c:(.text+0x24): undefined reference to `dlsym'
> dso_dlfcn.c:(.text+0x2f): undefined reference to `dlclose'
> /usr/local/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
> dso_dlfcn.c:(.text+0x334): undefined reference to `dlsym'
> dso_dlfcn.c:(.text+0x3f2): undefined reference to `dlerror'
> /usr/local/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
> dso_dlfcn.c:(.text+0x459): undefined reference to `dlopen'
> dso_dlfcn.c:(.text+0x4c9): undefined reference to `dlclose'
> dso_dlfcn.c:(.text+0x502): undefined reference to `dlerror'
> /usr/local/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr':
> dso_dlfcn.c:(.text+0x5a1): undefined reference to `dladdr'
> dso_dlfcn.c:(.text+0x601): undefined reference to `dlerror'
> /usr/local/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':
> dso_dlfcn.c:(.text+0x662): undefined reference to `dlclose'
> collect2: error: ld returned 1 exit status
> make[2]: *** [test/unit/crypto.test] Error 1
> make[1]: *** [test/unit/CMakeFiles/crypto.test.dir/all] Error 2
>
> Closes #4245
> ---
>
> Github: https://github.com/tarantool/tarantool/compare/avtikhon/gh-4245-static-build
> Issue: https://github.com/tarantool/tarantool/issues/4245
>
> cmake/FindOpenSSL.cmake | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cmake/FindOpenSSL.cmake b/cmake/FindOpenSSL.cmake
> index 8cd22cc8d..f3ee1de24 100644
> --- a/cmake/FindOpenSSL.cmake
> +++ b/cmake/FindOpenSSL.cmake
> @@ -177,7 +177,7 @@ if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
> endif ()
> endif ()
>
> -set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} )
> +set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} ${CMAKE_DL_LIBS})
>
> foreach(_comp IN LISTS OpenSSL_FIND_COMPONENTS)
> if(_comp STREQUAL "Crypto")
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tarantool-patches] Re: [PATCH v1] Fix static build
2019-06-05 13:20 [tarantool-patches] [PATCH v1] Fix static build Alexander V. Tikhonov
2019-06-10 7:48 ` [tarantool-patches] " Alexander Turenko
@ 2019-06-13 8:19 ` Kirill Yukhin
2019-06-13 9:47 ` Alexander Turenko
1 sibling, 1 reply; 4+ messages in thread
From: Kirill Yukhin @ 2019-06-13 8:19 UTC (permalink / raw)
To: tarantool-patches; +Cc: Alexander Turenko, Alexander V. Tikhonov
Hello,
On 07 Jun 06:55, Alexander V. Tikhonov wrote:
> Added to cmake environment CMAKE_DL_LIBS (The name of the library
> that has dlopen and dlclose in it, usually -ldl) to openssl build
> to add DL library, to fix the following fails:
>
> Linking CXX executable crypto.test
> /usr/local/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
> dso_dlfcn.c:(.text+0x11): undefined reference to `dlopen'
> dso_dlfcn.c:(.text+0x24): undefined reference to `dlsym'
> dso_dlfcn.c:(.text+0x2f): undefined reference to `dlclose'
> /usr/local/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
> dso_dlfcn.c:(.text+0x334): undefined reference to `dlsym'
> dso_dlfcn.c:(.text+0x3f2): undefined reference to `dlerror'
> /usr/local/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
> dso_dlfcn.c:(.text+0x459): undefined reference to `dlopen'
> dso_dlfcn.c:(.text+0x4c9): undefined reference to `dlclose'
> dso_dlfcn.c:(.text+0x502): undefined reference to `dlerror'
> /usr/local/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr':
> dso_dlfcn.c:(.text+0x5a1): undefined reference to `dladdr'
> dso_dlfcn.c:(.text+0x601): undefined reference to `dlerror'
> /usr/local/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':
> dso_dlfcn.c:(.text+0x662): undefined reference to `dlclose'
> collect2: error: ld returned 1 exit status
> make[2]: *** [test/unit/crypto.test] Error 1
> make[1]: *** [test/unit/CMakeFiles/crypto.test.dir/all] Error 2
>
> Closes #4245
I've checked your patch into 2.1 and master.
--
Regards, Kirill Yukhin
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tarantool-patches] Re: [PATCH v1] Fix static build
2019-06-13 8:19 ` Kirill Yukhin
@ 2019-06-13 9:47 ` Alexander Turenko
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Turenko @ 2019-06-13 9:47 UTC (permalink / raw)
To: Kirill Yukhin; +Cc: tarantool-patches, Alexander V. Tikhonov
On Thu, Jun 13, 2019 at 11:19:01AM +0300, Kirill Yukhin wrote:
> Hello,
>
> On 07 Jun 06:55, Alexander V. Tikhonov wrote:
> > Added to cmake environment CMAKE_DL_LIBS (The name of the library
> > that has dlopen and dlclose in it, usually -ldl) to openssl build
> > to add DL library, to fix the following fails:
> >
> > Linking CXX executable crypto.test
> > /usr/local/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
> > dso_dlfcn.c:(.text+0x11): undefined reference to `dlopen'
> > dso_dlfcn.c:(.text+0x24): undefined reference to `dlsym'
> > dso_dlfcn.c:(.text+0x2f): undefined reference to `dlclose'
> > /usr/local/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
> > dso_dlfcn.c:(.text+0x334): undefined reference to `dlsym'
> > dso_dlfcn.c:(.text+0x3f2): undefined reference to `dlerror'
> > /usr/local/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
> > dso_dlfcn.c:(.text+0x459): undefined reference to `dlopen'
> > dso_dlfcn.c:(.text+0x4c9): undefined reference to `dlclose'
> > dso_dlfcn.c:(.text+0x502): undefined reference to `dlerror'
> > /usr/local/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr':
> > dso_dlfcn.c:(.text+0x5a1): undefined reference to `dladdr'
> > dso_dlfcn.c:(.text+0x601): undefined reference to `dlerror'
> > /usr/local/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':
> > dso_dlfcn.c:(.text+0x662): undefined reference to `dlclose'
> > collect2: error: ld returned 1 exit status
> > make[2]: *** [test/unit/crypto.test] Error 1
> > make[1]: *** [test/unit/CMakeFiles/crypto.test.dir/all] Error 2
> >
> > Closes #4245
>
> I've checked your patch into 2.1 and master.
I think we should fix static build on 1.10 too.
WBR, Alexander Turenko.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-13 9:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-05 13:20 [tarantool-patches] [PATCH v1] Fix static build Alexander V. Tikhonov
2019-06-10 7:48 ` [tarantool-patches] " Alexander Turenko
2019-06-13 8:19 ` Kirill Yukhin
2019-06-13 9:47 ` Alexander Turenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox