Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B45F3200B27 for ; Wed, 18 May 2016 00:04:53 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B3167160A25; Tue, 17 May 2016 22:04:53 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DD551160A20 for ; Wed, 18 May 2016 00:04:52 +0200 (CEST) Received: (qmail 92183 invoked by uid 500); 17 May 2016 22:04:45 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 90590 invoked by uid 99); 17 May 2016 22:04:44 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 May 2016 22:04:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1ABA7E947E; Tue, 17 May 2016 22:04:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: eclark@apache.org To: commits@hbase.apache.org Date: Tue, 17 May 2016 22:05:07 -0000 Message-Id: <5aaf95ea03984471b0c23b21ea9548f1@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [25/50] hbase git commit: HBASE-15401 Add Zookeeper to third party archived-at: Tue, 17 May 2016 22:04:53 -0000 HBASE-15401 Add Zookeeper to third party Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/94efc1de Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/94efc1de Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/94efc1de Branch: refs/heads/HBASE-14850 Commit: 94efc1de153ff02792648b7d8a9d93db4b93e22e Parents: 70d43eb Author: Elliott Clark Authored: Mon Mar 7 14:58:21 2016 -0800 Committer: Elliott Clark Committed: Tue May 17 15:02:24 2016 -0700 ---------------------------------------------------------------------- hbase-native-client/Dockerfile | 26 ++++++++- hbase-native-client/third-party/BUCK | 96 ++++++++++++++----------------- 2 files changed, 68 insertions(+), 54 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/94efc1de/hbase-native-client/Dockerfile ---------------------------------------------------------------------- diff --git a/hbase-native-client/Dockerfile b/hbase-native-client/Dockerfile index 5f17f04..1364d22 100644 --- a/hbase-native-client/Dockerfile +++ b/hbase-native-client/Dockerfile @@ -15,8 +15,30 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM pjameson/buck-folly-watchman +FROM cpp_update -RUN apt-get install -y libprotobuf-dev protobuf-compiler clang-format-3.7 vim maven inetutils-ping +ARG CC=/usr/bin/gcc-5 +ARG CXX=/usr/bin/g++-5 +ARG CFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -g -fno-omit-frame-pointer -O3 -pthread" +ARG CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -g -fno-omit-frame-pointer -O3 -pthread" + +RUN apt-get install -y clang-format-3.7 vim maven inetutils-ping +RUN git clone --depth 1 --branch v2.6.1 https://github.com/google/protobuf.git /usr/src/protobuf && \ + cd /usr/src/protobuf/ && \ + ./autogen.sh && \ + ./configure --disable-shared && \ + make && \ + make check && \ + make install +RUN cd /usr/src && \ + wget http://www-us.apache.org/dist/zookeeper/zookeeper-3.4.8/zookeeper-3.4.8.tar.gz && \ + tar zxf zookeeper-3.4.8.tar.gz && \ + rm -rf zookeeper-3.4.8.tar.gz && \ + cd zookeeper-3.4.8 && \ + cd src/c && \ + ./configure --disable-shared && \ + make && \ + make install && \ + make clean WORKDIR /usr/local/src/hbase/hbase-native-client http://git-wip-us.apache.org/repos/asf/hbase/blob/94efc1de/hbase-native-client/third-party/BUCK ---------------------------------------------------------------------- diff --git a/hbase-native-client/third-party/BUCK b/hbase-native-client/third-party/BUCK index b7baa86..e577a5f 100644 --- a/hbase-native-client/third-party/BUCK +++ b/hbase-native-client/third-party/BUCK @@ -15,68 +15,60 @@ # See the License for the specific language governing permissions and # limitations under the License. -def add_system_libs(names = []): +def add_system_libs(names = [], lib_dir = "/usr/lib/x86_64-linux-gnu", deps = [], exported_linker_flags = []): rules = [] for name in names: - prebuilt_cxx_library( - name = name, - lib_name = name, - lib_dir = "/usr/lib/x86_64-linux-gnu", - visibility = [ 'PUBLIC', ], - ) - rules.append(":" + name) - + gen_rule_name = "gen_lib{}".format(name) + genrule( + name = gen_rule_name, + out = gen_rule_name, + bash = "mkdir -p $OUT && cp {}/lib{}.* $OUT".format(lib_dir,name), + ) + prebuilt_cxx_library( + name = name, + lib_name = name, + lib_dir = '$(location :{})'.format(gen_rule_name), + force_static = True, + deps = deps, + visibility = [ 'PUBLIC' ], + exported_linker_flags = exported_linker_flags, + ) + rules.append(":" + name) return rules system_libs = [ + "unwind", + "lzma", +] +local_libs = [ "double-conversion", "glog", - "protobuf", "gflags", - "unwind", - "lzma", + "protobuf", + "zookeeper_mt", "boost_regex", ] -tp_dep_rules = add_system_libs(system_libs) -prebuilt_cxx_library( - name = "folly", - lib_name = "folly", - lib_dir = "/usr/local/lib", - deps = tp_dep_rules, - exported_linker_flags = [ - "-pthread", - "-lstdc++", - ], - visibility = [ - 'PUBLIC', - ] -) -prebuilt_cxx_library( - name = "follybenchmark", - lib_name = "follybenchmark", - lib_dir = "/usr/local/lib", - deps = tp_dep_rules + [":folly"], - exported_linker_flags = [ - "-pthread", - "-lstdc++", - ], - visibility = [ - 'PUBLIC', - ] -) -prebuilt_cxx_library( - name = "wangle", - lib_name = "wangle", - lib_dir = "/usr/local/lib", - deps = tp_dep_rules + [":folly"], - exported_linker_flags = [ - "-pthread", - "-lstdc++", - ], - visibility = [ - 'PUBLIC', - ] -) + +tp_dep_rules = add_system_libs(system_libs) \ + + add_system_libs(local_libs, lib_dir = "/usr/local/lib") +folly = add_system_libs( + ['folly'], + lib_dir = '/usr/local/lib', + deps = tp_dep_rules, + exported_linker_flags = [ "-pthread", "-lstdc++",] + ) +folly_bench = add_system_libs( + ['follybenchmark'], + lib_dir = '/usr/local/lib', + deps = tp_dep_rules + folly, + exported_linker_flags = [ "-pthread", "-lstdc++",] + ) +wangle = add_system_libs( + ['wangle'], + lib_dir = '/usr/local/lib', + deps = tp_dep_rules + folly, + exported_linker_flags = [ "-pthread", "-lstdc++",] + ) cxx_library( name = 'google-test', srcs = [