You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2016/08/25 15:36:38 UTC
incubator-impala git commit: IMPALA-3979: Fix dynamic linking for
Impala
Repository: incubator-impala
Updated Branches:
refs/heads/master 05b19bb84 -> 8cab36cf6
IMPALA-3979: Fix dynamic linking for Impala
When building Impala, the user can choose between two different
build modes: static and dynamically linked libraries. The first
one is used for release builds, while the latter one is used
mainly locally for developers to shorten build times.
However, for some time now, the shared build has been broken in
some configurations. This patch fixes this issue. The main
solution is to move the webserver into the Util library and to
remove the manual linking of Util into the error-utils-test.
Change-Id: I2fb1efd600bfaf17de730186fc80a0dbd976a049
Reviewed-on: http://gerrit.cloudera.org:8080/4108
Tested-by: Internal Jenkins
Reviewed-by: Tim Armstrong <ta...@cloudera.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/8cab36cf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/8cab36cf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/8cab36cf
Branch: refs/heads/master
Commit: 8cab36cf61aa315bc8d8fffa24ce73f9f64227ba
Parents: 05b19bb
Author: Martin Grund <mg...@apache.org>
Authored: Wed Aug 24 05:26:03 2016 +0000
Committer: Tim Armstrong <ta...@cloudera.com>
Committed: Thu Aug 25 15:35:25 2016 +0000
----------------------------------------------------------------------
be/CMakeLists.txt | 12 +++++++-----
be/src/util/CMakeLists.txt | 8 +-------
2 files changed, 8 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/8cab36cf/be/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index 0bbe4f4..6aff0b3 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -275,7 +275,6 @@ set (IMPALA_LINK_LIBS
ThriftSaslTransport
Udf
Util
- Webserver
${WL_END_GROUP}
)
@@ -294,7 +293,6 @@ if (BUILD_SHARED_LIBS)
Scheduling
Catalog
ResourceBroker
- Webserver
ImpalaThrift
GlobalFlags
Common
@@ -302,8 +300,7 @@ if (BUILD_SHARED_LIBS)
)
endif ()
-# Add all external dependencies. They should come after the impala libs.
-set (IMPALA_LINK_LIBS ${IMPALA_LINK_LIBS}
+set (IMPALA_DEPENDENCIES
${SNAPPY_STATIC_LIB}
${LZ4_STATIC_LIB}
${RE2_STATIC_LIB}
@@ -314,6 +311,7 @@ set (IMPALA_LINK_LIBS ${IMPALA_LINK_LIBS}
${LDAP_LIBRARY}
${LBER_LIBRARY}
ThriftSaslTransport
+ ${OPENSSL_LIBS}
gutil
glogstatic
gflagsstatic
@@ -324,7 +322,11 @@ set (IMPALA_LINK_LIBS ${IMPALA_LINK_LIBS}
${LIBBZ2}
${AVRO_STATIC_LIB}
${JAVA_JVM_LIBRARY}
- kudu_client
+ kudu_client)
+
+# Add all external dependencies. They should come after the impala libs.
+set (IMPALA_LINK_LIBS ${IMPALA_LINK_LIBS}
+ ${IMPALA_DEPENDENCIES}
-lrt
-ldl # Needed for LLVM
)
http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/8cab36cf/be/src/util/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/be/src/util/CMakeLists.txt b/be/src/util/CMakeLists.txt
index dc2df01..da682f4 100644
--- a/be/src/util/CMakeLists.txt
+++ b/be/src/util/CMakeLists.txt
@@ -83,14 +83,11 @@ add_library(Util
time.cc
tuple-row-compare.cc
url-parser.cc
-)
-add_dependencies(Util thrift-deps gen_ir_descriptions)
-
-add_library(Webserver STATIC
${SQUEASEL_SRC_DIR}/squeasel.c
webserver.cc
${MUSTACHE_SRC_DIR}/mustache.cc
)
+add_dependencies(Util thrift-deps gen_ir_descriptions)
# Squeasel requires C99 compatibility to build.
SET_SOURCE_FILES_PROPERTIES(${SQUEASEL_SRC_DIR}/squeasel.c
@@ -101,8 +98,6 @@ add_library(loggingsupport SHARED
logging-support.cc
)
-target_link_libraries(Webserver pthread dl Util ${OPENSSL_LIBS})
-
add_executable(parquet-reader parquet-reader.cc)
target_link_libraries(parquet-reader ${IMPALA_LINK_LIBS})
@@ -132,7 +127,6 @@ ADD_BE_TEST(redactor-config-parser-test)
ADD_BE_TEST(redactor-test)
ADD_BE_TEST(redactor-unconfigured-test)
ADD_BE_TEST(error-util-test)
-target_link_libraries(error-util-test Util)
ADD_BE_TEST(proc-info-test)
ADD_BE_TEST(lru-cache-test)
ADD_BE_TEST(filesystem-util-test)