You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@htrace.apache.org by cm...@apache.org on 2015/06/20 00:14:36 UTC
incubator-htrace git commit: HTRACE-197. htraced build: set RUNPATH
if possible (cmccabe)
Repository: incubator-htrace
Updated Branches:
refs/heads/master f32b54236 -> a9fb49945
HTRACE-197. htraced build: set RUNPATH if possible (cmccabe)
Project: http://git-wip-us.apache.org/repos/asf/incubator-htrace/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-htrace/commit/a9fb4994
Tree: http://git-wip-us.apache.org/repos/asf/incubator-htrace/tree/a9fb4994
Diff: http://git-wip-us.apache.org/repos/asf/incubator-htrace/diff/a9fb4994
Branch: refs/heads/master
Commit: a9fb49945c7a134b557ff7871ca1b9fe37e6f077
Parents: f32b542
Author: Colin P. Mccabe <cm...@apache.org>
Authored: Fri Jun 19 15:08:30 2015 -0700
Committer: Colin P. Mccabe <cm...@apache.org>
Committed: Fri Jun 19 15:14:29 2015 -0700
----------------------------------------------------------------------
htrace-htraced/go/gobuild.sh | 14 ++++++++++++++
1 file changed, 14 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/a9fb4994/htrace-htraced/go/gobuild.sh
----------------------------------------------------------------------
diff --git a/htrace-htraced/go/gobuild.sh b/htrace-htraced/go/gobuild.sh
index 121d55b..0c5ae54 100755
--- a/htrace-htraced/go/gobuild.sh
+++ b/htrace-htraced/go/gobuild.sh
@@ -32,6 +32,18 @@ die() {
exit 1
}
+set_rpath() {
+ WHAT=$1
+ which patchelf &> /dev/null
+ if [ $? -ne 0 ]; then
+ echo "You must install the patchelf command to set RPATH."
+ else
+ if ! patchelf --set-rpath '$ORIGIN/' "${WHAT}"; then
+ echo "patchelf failed for ${WHAT}"
+ fi
+ fi
+}
+
ACTION=install
if [ $# -gt 0 ]; then
ACTION="${1}"
@@ -109,6 +121,8 @@ install)
# Make a symlink to web src dir so can do development in-situ out
# of build dir. This is ugly but blame go build.
ln -fs "../../htrace-webapp/src/main/web" "${GOBIN}/../"
+ # Set the RPATH to make bundling leveldb and snappy easier.
+ set_rpath "${GOBIN}/htraced"
;;
bench)
go test org/apache/htrace/... ${TAGS} -test.bench=. "$@"