From fb20797b6237054f3d16ff94a665cbad4cbe3293 Mon Sep 17 00:00:00 2001 From: Colin Patrick Mccabe Date: Mon, 15 Dec 2014 16:16:02 -0800 Subject: [PATCH] HADOOP-11410. Make the rpath of libhadoop.so configurable (cmccabe) --- hadoop-common-project/hadoop-common/CHANGES.txt | 2 ++ hadoop-common-project/hadoop-common/pom.xml | 3 ++- hadoop-common-project/hadoop-common/src/CMakeLists.txt | 6 +++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index c5a4144e98..193d9cb786 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -434,6 +434,8 @@ Release 2.7.0 - UNRELEASED HADOOP-10476) Bumping the findbugs version to 3.0.0. (wheat9) + HADOOP-11410. Make the rpath of libhadoop.so configurable (cmccabe) + OPTIMIZATIONS HADOOP-11323. WritableComparator#compare keeps reference to byte array. diff --git a/hadoop-common-project/hadoop-common/pom.xml b/hadoop-common-project/hadoop-common/pom.xml index 6a63ccdb03..713905ea43 100644 --- a/hadoop-common-project/hadoop-common/pom.xml +++ b/hadoop-common-project/hadoop-common/pom.xml @@ -530,6 +530,7 @@ false true false + @@ -601,7 +602,7 @@ - + diff --git a/hadoop-common-project/hadoop-common/src/CMakeLists.txt b/hadoop-common-project/hadoop-common/src/CMakeLists.txt index 29fa2b8f50..ddb3abf4dc 100644 --- a/hadoop-common-project/hadoop-common/src/CMakeLists.txt +++ b/hadoop-common-project/hadoop-common/src/CMakeLists.txt @@ -267,8 +267,12 @@ IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux") # dlopen will look in the directory containing libhadoop.so. # However, $ORIGIN is not supported by all operating systems. # + set(RPATH "\$ORIGIN/") + if (EXTRA_LIBHADOOP_RPATH) + set(RPATH "${RPATH}:${EXTRA_LIBHADOOP_RPATH}/") + endif(EXTRA_LIBHADOOP_RPATH) SET_TARGET_PROPERTIES(hadoop - PROPERTIES INSTALL_RPATH "\$ORIGIN/") + PROPERTIES INSTALL_RPATH "${RPATH}") ENDIF() target_link_dual_libraries(hadoop