[ https://issues.apache.org/jira/browse/IMPALA-11641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17979250#comment-17979250 ]
ASF subversion and git services commented on IMPALA-11641: ---------------------------------------------------------- Commit 0a55bf54e121ee6a2f0f36f8fb0a47a07cb10960 in impala's branch refs/heads/master from Joe McDonnell [ https://gitbox.apache.org/repos/asf?p=impala.git;h=0a55bf54e ] IMPALA-14066 (Part 3): Re-applying IMPALA-11640/IMPALA-11641: Workaround errors in shared library build on Ubuntu 18+ This commit re-applies IMPALA-11640/IMPALA-11641 to the Kudu files after the Kudu rebase to v1.17.1. The original commit message is below: Building with -so on Ubuntu 18 or higher fails due to an issue finding dlopen in unwind_safeness.cc: unwind_safeness.cc:76] Check failed: !error failed to find symbol dlopen unwind_safeness.cc is using dlsym to load the dlopen symbol so that it can wrap it with its own dlopen code. The Impala build has issues with the ordering of libraries, and this code does not find dlopen. This has previously happened with the dl_iterate_phdr symbol in Kudu. This is a problem starting with Ubuntu 18.04, because Ubuntu 16.04 uses a version of glibc that has a bug in reporting this error. Ubuntu 18.04 uses a newer glibc with a fix for the bug. See https://sourceware.org/bugzilla/show_bug.cgi?id=19509 . As a workaround for this issue, this tolerates not finding dlopen/dlclose when building with shared libraries. Impala shared libraries are not used in production, so this bypasses the issue. This also adds extra validation to make sure the symbols are non-null. Specifically, this adds another CHECK in dlsym_or_die to verify that the symbol is non-null. This also adds a DCHECK to verify that the symbol is non-null at dereference. This also fixes an issue where Boost was always using static libraries, even for shared library builds. This makes Boost use shared libraries for shared library builds. Testing: - The shared library build passes on Ubuntu 18 and Ubuntu 20 - Impala can boot and run queries with shared libraries Change-Id: I0034464a075b3add7ce591a36dab6fda334e6203 Reviewed-on: http://gerrit.cloudera.org:8080/19104 Reviewed-by: Daniel Becker <daniel.bec...@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Reviewed-on: http://gerrit.cloudera.org:8080/23009 Tested-by: Daniel Becker <daniel.bec...@cloudera.com> > When building with shared libraries, Boost should use shared libraries > ---------------------------------------------------------------------- > > Key: IMPALA-11641 > URL: https://issues.apache.org/jira/browse/IMPALA-11641 > Project: IMPALA > Issue Type: Bug > Components: Backend > Affects Versions: Impala 4.2.0 > Reporter: Joe McDonnell > Assignee: Joe McDonnell > Priority: Major > Fix For: Impala 4.2.0 > > > When building with shared libraries, Boost libraries are still statically > linked. > {noformat} > $ ./buildall.sh -so -skiptests -cmake_only > ... > -- Boost libraries: > /opt/Impala-Toolchain/toolchain-packages-gcc10.4.0/boost-1.74.0-p1/lib/libboost_thread.a-lpthread/opt/Impala-Toolchain/toolchain-packages-gcc10.4.0/boost-1.74.0-p1/lib/libboost_regex.a/opt/Impala-Toolchain/toolchain-packages-gcc10.4.0/boost-1.74.0-p1/lib/libboost_filesystem.a/opt/Impala-Toolchain/toolchain-packages-gcc10.4.0/boost-1.74.0-p1/lib/libboost_system.a/opt/Impala-Toolchain/toolchain-packages-gcc10.4.0/boost-1.74.0-p1/lib/libboost_date_time.a/opt/Impala-Toolchain/toolchain-packages-gcc10.4.0/boost-1.74.0-p1/lib/libboost_random.a/opt/Impala-Toolchain/toolchain-packages-gcc10.4.0/boost-1.74.0-p1/lib/libboost_locale.a/opt/Impala-Toolchain/toolchain-packages-gcc10.4.0/boost-1.74.0-p1/lib/libboost_chrono.a/opt/Impala-Toolchain/toolchain-packages-gcc10.4.0/boost-1.74.0-p1/lib/libboost_atomic.a > ...{noformat} > Binaries fail to startup due to being unable to find Boost symbols. This is > governed by this logic in CMake: > {noformat} > set(Boost_USE_STATIC_LIBS NOT ${BUILD_SHARED_LIBS}){noformat} > That doesn't seem to work. This should be changed to something like this: > {noformat} > if(BUILD_SHARED_LIBS) > set(Boost_USE_STATIC_LIBS OFF) > else() > set(Boost_USE_STATIC_LIBS ON) > endif(){noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org For additional commands, e-mail: issues-all-h...@impala.apache.org