Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH] static build: fix build on ubuntu
@ 2020-05-26 15:17 HustonMmmavr
  2020-06-09 16:33 ` Alexander Turenko
  2020-06-10  9:20 ` Kirill Yukhin
  0 siblings, 2 replies; 4+ messages in thread
From: HustonMmmavr @ 2020-05-26 15:17 UTC (permalink / raw)
  To: tarantool-patches, alexander.turenko

Fixed static build with '-DBUILD_STATIC=ON' option:

* Added cmake option CMAKE_DL_LIBS to icu library for
  test/unit tests binaries builds at file:
    cmake/FindICU.cmake
  due to fail:
    [ 84%] Linking CXX executable vy_point_lookup.test
    /usr/local/lib/libicuuc.a(putil.ao): In function `uprv_dl_open_62':
    putil.cpp:(.text+0x1a22): undefined reference to `dlopen'
    /usr/local/lib/libicuuc.a(putil.ao): In function `uprv_dlsym_func_62':
    putil.cpp:(.text+0x1a7d): undefined reference to `dlsym'
    /usr/local/lib/libicuuc.a(putil.ao): In function `uprv_dl_close_62':
    putil.cpp:(.text+0x1a61): undefined reference to `dlclose'
    collect2: error: ld returned 1 exit status

* Added cmake option CMAKE_DL_LIBS to gomp library for
  test/unit tests binaries builds at file:
    cmake/BuildMisc.cmake
  due to fail:
    [ 91%] Linking CXX executable bps_tree.test
    /usr/lib/gcc/x86_64-linux-gnu/7/libgomp.a(target.o): In function `gomp_target_init':
    (.text+0x8b): undefined reference to `dlopen'
    (.text+0xa2): undefined reference to `dlsym'
    (.text+0xd9): undefined reference to `dlclose'
    (.text+0x29b): undefined reference to `dlsym'
    (.text+0x2a8): undefined reference to `dlerror'
    (.text+0x2d0): undefined reference to `dlsym'
    (.text+0x2e9): undefined reference to `dlsym'
    (.text+0x300): undefined reference to `dlsym'
    (.text+0x317): undefined reference to `dlsym'
    (.text+0x330): undefined reference to `dlsym'
    /usr/lib/gcc/x86_64-linux-gnu/7/libgomp.a(target.o):(.text+0x34d): more undefined references to `dlsym' follow
    /usr/lib/gcc/x86_64-linux-gnu/7/libgomp.a(target.o): In function `gomp_target_init':
    (.text+0x9cc): undefined reference to `dlerror'
    collect2: error: ld returned 1 exit status

Close #5024
---
Issue: https://github.com/tarantool/tarantool/issues/5024
Branch: https://github.com/tarantool/tarantool/tree/HustonMmmavr/gh-5024-static-build-ubuntu
 cmake/BuildMisc.cmake | 2 +-
 cmake/FindICU.cmake   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmake/BuildMisc.cmake b/cmake/BuildMisc.cmake
index b4a3ca1fc..7b11acb11 100644
--- a/cmake/BuildMisc.cmake
+++ b/cmake/BuildMisc.cmake
@@ -39,7 +39,7 @@ macro(libmisc_build)
         else()
             set(GOMP_LIBRARY gomp)
         endif()
-        target_link_libraries(misc ${GOMP_LIBRARY} pthread)
+        target_link_libraries(misc ${GOMP_LIBRARY} pthread ${CMAKE_DL_LIBS})
     endif()
 
     unset(misc_src)
diff --git a/cmake/FindICU.cmake b/cmake/FindICU.cmake
index 26f0683f3..5bad41c70 100644
--- a/cmake/FindICU.cmake
+++ b/cmake/FindICU.cmake
@@ -50,7 +50,7 @@ include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(ICU
     REQUIRED_VARS ICU_INCLUDE_DIR ICU_LIBRARY_I18N ICU_LIBRARY_UC)
 set(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR})
-set(ICU_LIBRARIES ${ICU_LIBRARY_I18N} ${ICU_LIBRARY_UC} ${ICU_LIBRARY_DATA})
+set(ICU_LIBRARIES ${ICU_LIBRARY_I18N} ${ICU_LIBRARY_UC} ${ICU_LIBRARY_DATA} ${CMAKE_DL_LIBS})
 mark_as_advanced(ICU_INCLUDE_DIR ICU_INCLUDE_DIRS
         ICU_LIBRARY_I18N ICU_LIBRARY_UC ICU_LIBRARIES)
 
-- 
2.26.2

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Tarantool-patches] [PATCH] static build: fix build on ubuntu
  2020-05-26 15:17 [Tarantool-patches] [PATCH] static build: fix build on ubuntu HustonMmmavr
@ 2020-06-09 16:33 ` Alexander Turenko
  2020-06-10  8:24   ` Mavr Huston
  2020-06-10  9:20 ` Kirill Yukhin
  1 sibling, 1 reply; 4+ messages in thread
From: Alexander Turenko @ 2020-06-09 16:33 UTC (permalink / raw)
  To: HustonMmmavr; +Cc: tarantool-patches

LGTM.

I didn't verify it manually, but the change itself looks reasonable and
CI pass (except flaky tests and known Mac OS X problem on Travis-CI).

Sergey, can you look into the proposed change too?

Alexander (Tikhonov), we added a CI job to verify such things within
[1]. Can you, please, look how it appears that the job didn't catch the
problem?

> Issue: https://github.com/tarantool/tarantool/issues/5024
> Branch: https://github.com/tarantool/tarantool/tree/HustonMmmavr/gh-5024-static-build-ubuntu

Please, answer with a changelog entry for future release notes. We track
user-visible behaviour changes this way: bugfixes and features. When
there is a fix for some build target or configuration, we mention it
too.

It is just free form description of changes for a user to be placed on
the [releases page][2]. We highlight with @ChangeLog 'tag' to bring a
mainterner attention.

Since it is the regression, it would be good to mention, when the
problem appears (`git describe bad_commit` output), in the future
release notes.

For future patches: add it to a cover letter or under `---` for a
signleton patchset (but do not add to a commit message).

[1]: https://github.com/tarantool/tarantool/issues/4551
[2]: https://github.com/tarantool/tarantool/releases

WBR, Alexander Turenko.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Tarantool-patches] [PATCH] static build: fix build on ubuntu
  2020-06-09 16:33 ` Alexander Turenko
@ 2020-06-10  8:24   ` Mavr Huston
  0 siblings, 0 replies; 4+ messages in thread
From: Mavr Huston @ 2020-06-10  8:24 UTC (permalink / raw)
  To: Alexander Turenko; +Cc: tarantool-patches

[-- Attachment #1: Type: text/plain, Size: 1556 bytes --]

Thanks!

@ChangeLog

- Fixed static-build on ubuntu (gh-5024)

вт, 9 июн. 2020 г. в 19:33, Alexander Turenko <
alexander.turenko@tarantool.org>:

> LGTM.
>
> I didn't verify it manually, but the change itself looks reasonable and
> CI pass (except flaky tests and known Mac OS X problem on Travis-CI).
>
> Sergey, can you look into the proposed change too?
>
> Alexander (Tikhonov), we added a CI job to verify such things within
> [1]. Can you, please, look how it appears that the job didn't catch the
> problem?
>
> > Issue: https://github.com/tarantool/tarantool/issues/5024
> > Branch:
> https://github.com/tarantool/tarantool/tree/HustonMmmavr/gh-5024-static-build-ubuntu
>
> Please, answer with a changelog entry for future release notes. We track
> user-visible behaviour changes this way: bugfixes and features. When
> there is a fix for some build target or configuration, we mention it
> too.
>
> It is just free form description of changes for a user to be placed on
> the [releases page][2]. We highlight with @ChangeLog 'tag' to bring a
> mainterner attention.
>
> Since it is the regression, it would be good to mention, when the
> problem appears (`git describe bad_commit` output), in the future
> release notes.
>
> For future patches: add it to a cover letter or under `---` for a
> signleton patchset (but do not add to a commit message).
>
> [1]: https://github.com/tarantool/tarantool/issues/4551
> [2]: https://github.com/tarantool/tarantool/releases
>
> WBR, Alexander Turenko.
>

[-- Attachment #2: Type: text/html, Size: 2506 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Tarantool-patches] [PATCH] static build: fix build on ubuntu
  2020-05-26 15:17 [Tarantool-patches] [PATCH] static build: fix build on ubuntu HustonMmmavr
  2020-06-09 16:33 ` Alexander Turenko
@ 2020-06-10  9:20 ` Kirill Yukhin
  1 sibling, 0 replies; 4+ messages in thread
From: Kirill Yukhin @ 2020-06-10  9:20 UTC (permalink / raw)
  To: HustonMmmavr; +Cc: tarantool-patches, alexander.turenko

Hello,

On 26 май 18:17, HustonMmmavr wrote:
> Fixed static build with '-DBUILD_STATIC=ON' option:
> 
> * Added cmake option CMAKE_DL_LIBS to icu library for
>   test/unit tests binaries builds at file:
>     cmake/FindICU.cmake
>   due to fail:
>     [ 84%] Linking CXX executable vy_point_lookup.test
>     /usr/local/lib/libicuuc.a(putil.ao): In function `uprv_dl_open_62':
>     putil.cpp:(.text+0x1a22): undefined reference to `dlopen'
>     /usr/local/lib/libicuuc.a(putil.ao): In function `uprv_dlsym_func_62':
>     putil.cpp:(.text+0x1a7d): undefined reference to `dlsym'
>     /usr/local/lib/libicuuc.a(putil.ao): In function `uprv_dl_close_62':
>     putil.cpp:(.text+0x1a61): undefined reference to `dlclose'
>     collect2: error: ld returned 1 exit status
> 
> * Added cmake option CMAKE_DL_LIBS to gomp library for
>   test/unit tests binaries builds at file:
>     cmake/BuildMisc.cmake
>   due to fail:
>     [ 91%] Linking CXX executable bps_tree.test
>     /usr/lib/gcc/x86_64-linux-gnu/7/libgomp.a(target.o): In function `gomp_target_init':
>     (.text+0x8b): undefined reference to `dlopen'
>     (.text+0xa2): undefined reference to `dlsym'
>     (.text+0xd9): undefined reference to `dlclose'
>     (.text+0x29b): undefined reference to `dlsym'
>     (.text+0x2a8): undefined reference to `dlerror'
>     (.text+0x2d0): undefined reference to `dlsym'
>     (.text+0x2e9): undefined reference to `dlsym'
>     (.text+0x300): undefined reference to `dlsym'
>     (.text+0x317): undefined reference to `dlsym'
>     (.text+0x330): undefined reference to `dlsym'
>     /usr/lib/gcc/x86_64-linux-gnu/7/libgomp.a(target.o):(.text+0x34d): more undefined references to `dlsym' follow
>     /usr/lib/gcc/x86_64-linux-gnu/7/libgomp.a(target.o): In function `gomp_target_init':
>     (.text+0x9cc): undefined reference to `dlerror'
>     collect2: error: ld returned 1 exit status
> 
> Close #5024
> ---
> Issue: https://github.com/tarantool/tarantool/issues/5024
> Branch: https://github.com/tarantool/tarantool/tree/HustonMmmavr/gh-5024-static-build-ubuntu

I've checked your patch into 1.10, 2.3, 2.4 and master.

--
Regards, Kirill Yukhin

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-10  9:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26 15:17 [Tarantool-patches] [PATCH] static build: fix build on ubuntu HustonMmmavr
2020-06-09 16:33 ` Alexander Turenko
2020-06-10  8:24   ` Mavr Huston
2020-06-10  9:20 ` Kirill Yukhin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox