[Tarantool-patches] [PATCH v3 1/3] test: fix for OpenSuSE luajit tests build

Alexander V. Tikhonov avtikhon at tarantool.org
Wed Jul 8 17:39:41 MSK 2020


Found that OpenSUSE toolchain adds '--no-undefined' linked flag leading
to fails while building tests. The changes suppress this flag since
dynamic libraries are loaded via Tarantool executable and use its
symbols. So it is completely OK to have undefined symbols at build time.
Feel free to adjust it on your own.

Needed for #4562
---

Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4562-suse-pack-full-ci
Issue: https://github.com/tarantool/tarantool/issues/4562

 test/CMakeLists.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 697d1b21d..93de3d68b 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -23,6 +23,11 @@ endfunction()
 add_compile_flags("C;CXX"
     "-Wno-unused-parameter")
 
+# The dynamic libraries will be loaded from tarantool executable
+# and will use symbols from it. So it is completely okay to have
+# unresolved symbols at build time.
+string(REPLACE "-Wl,--no-undefined" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
+
 if(POLICY CMP0037)
     if(CMAKE_VERSION VERSION_LESS 3.11)
         # cmake below 3.11 reserves name test. Use old policy.
-- 
2.17.1



More information about the Tarantool-patches mailing list