Skip to content

Commit e709d15

Browse files
author
caijieming-baidu
authored
Merge pull request #1088 from 00k/deps
fix .travis.yml & update sofa-pbrpc to 1.1.1 & remove ubuntu_build.sh
2 parents fc42786 + bf19072 commit e709d15

File tree

5 files changed

+65
-152
lines changed

5 files changed

+65
-152
lines changed

.travis.yml

Lines changed: 21 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,28 @@
11
language: cpp
22
compiler: gcc
3-
install:
4-
- sudo apt-get update
5-
- sudo apt-get install libboost-dev uuid-dev
6-
7-
- wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
8-
- tar xf protobuf-2.6.1.tar.gz
9-
- ( cd protobuf-2.6.1 && ./configure --with-pic && make -j4 && sudo make install && sudo ldconfig )
10-
11-
- git clone https://github.com/google/snappy
12-
- ( cd snappy && sh ./autogen.sh && ./configure --with-pic && make -j4 && sudo make install && sudo ldconfig )
13-
14-
- git clone https://github.com/BaiduPS/sofa-pbrpc
15-
- ( cd sofa-pbrpc && make -j4 && make install )
16-
17-
- wget http://www.us.apache.org/dist/zookeeper/stable/zookeeper-3.4.7.tar.gz
18-
- tar zxvf zookeeper-3.4.7.tar.gz
19-
- ( cd zookeeper-3.4.7/src/c && ./configure --disable-shared --with-pic && make -j4 && sudo make install )
20-
21-
- wget https://github.com/gflags/gflags/archive/v2.1.2.tar.gz
22-
- tar xf v2.1.2.tar.gz
23-
- ( cd gflags-2.1.2 && cmake -DGFLAGS_NAMESPACE=google -DCMAKE_CXX_FLAGS=-fPIC && make -j4 && sudo make install )
3+
addons:
4+
apt:
5+
packages:
6+
- gdb
7+
- apport
248

25-
- git clone https://github.com/google/glog
26-
- ( cd glog && git checkout v0.3.3 && ./configure --disable-shared --with-pic && make -j4 && sudo make install )
27-
28-
- wget --no-check-certificate https://googletest.googlecode.com/files/gtest-1.7.0.zip
29-
- unzip gtest-1.7.0.zip
30-
- ( cd gtest-1.7.0 && ./configure --disable-shared --with-pic && make -j4 && sudo cp -a lib/.libs/* /usr/lib && sudo cp -a include/gtest /usr/include )
9+
before_install:
10+
- ulimit -c unlimited -S
11+
- ulimit -a
3112

32-
- wget http://download.savannah.gnu.org/releases/libunwind/libunwind-0.99-beta.tar.gz
33-
- tar zxvf libunwind-0.99-beta.tar.gz
34-
- ( cd libunwind-0.99-beta && ./configure CFLAGS=-U_FORTIFY_SOURCE --with-pic && make -j4 && sudo make install )
35-
36-
- wget https://googledrive.com/host/0B6NtGsLhIcf7MWxMMF9JdTN3UVk/gperftools-2.2.1.tar.gz
37-
- tar zxvf gperftools-2.2.1.tar.gz
38-
- ( cd gperftools-2.2.1 && ./configure --with-pic && make -j4 && sudo make install && sudo ldconfig )
39-
40-
- git clone https://github.com/fxsjy/ins
41-
- (cd ins && PBRPC_PATH=../sofa-pbrpc/output/ make sdk )
42-
43-
before_script:
44-
- sed -i 's/^SOFA_PBRPC_PREFIX=.*/SOFA_PBRPC_PREFIX=.\/sofa-pbrpc\/output/' depends.mk
45-
- sed -i 's/^PROTOBUF_PREFIX=.*/PROTOBUF_PREFIX=\/usr\/local/' depends.mk
46-
- sed -i 's/^SNAPPY_PREFIX=.*/SNAPPY_PREFIX=\/usr\/local/' depends.mk
47-
- sed -i 's/^ZOOKEEPER_PREFIX=.*/ZOOKEEPER_PREFIX=\/usr\/local/' depends.mk
48-
- sed -i 's/^GFLAGS_PREFIX=.*/GFLAGS_PREFIX=\/usr\/local/' depends.mk
49-
- sed -i 's/^GLOG_PREFIX=.*/GLOG_PREFIX=\/usr\/local/' depends.mk
50-
- sed -i 's/^GTEST_PREFIX=.*/GTEST_PREFIX=.\/thirdparty/' depends.mk
51-
- sed -i 's/^GPERFTOOLS_PREFIX=.*/GPERFTOOLS_PREFIX=\/usr\/local/' depends.mk
52-
- sed -i 's/^BOOST_INCDIR=.*/BOOST_INCDIR=\/usr\/local\/include/' depends.mk
53-
- sed -i 's/^INS_PREFIX=.*/INS_PREFIX=.\/ins\/output/' depends.mk
13+
install:
14+
- bash -x build.sh origin
5415

5516
script:
56-
- make -j4
5717
- make check
18+
- bash -x ft_test.sh
19+
20+
after_failure:
21+
- find . -name 'core.*' -print
22+
- for core_file in $(find test_output -name 'core*' -print); do
23+
echo "${core_file}";
24+
tmp=${core_file#*core.}; exe_name=${tmp%.*};
25+
echo "${core_file} is generated by ${exe_name}"
26+
gdb ${exe_name} ${core_file} -ex "thread apply all bt" -ex "set pagination 0" -batch;
27+
done
28+

build.conf

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ MIRROR=$1
88
BOOST_VERSION=1_58_0
99
PROTOBUF_VERSION=2.6.1
1010
SNAPPY_VERSION=1.1.3
11-
SOFA_PBRPC_VERSION=1.1.0
11+
SOFA_PBRPC_VERSION=1.1.1
1212
ZOOKEEPER_VERSION=3.4.9
1313
CMAKE_VERSION=3.2.1
1414
GFLAGS_VERSION=2.1.2
@@ -20,47 +20,47 @@ INS_VERSION=0.14
2020
NOSE_VERSION=1.3.7
2121

2222
if [ $MIRROR == "china" ]; then
23-
BOOST_URL=http://mirrors.163.com/gentoo/distfiles/boost_1_58_0.tar.bz2
24-
PROTOBUF_URL=http://mirrors.163.com/gentoo/distfiles/protobuf-2.6.1.tar.bz2
25-
SNAPPY_URL=http://mirrors.163.com/gentoo/distfiles/snappy-1.1.3.tar.gz
26-
SOFA_PBRPC_URL=https://github.com/baidu/sofa-pbrpc/archive/v1.1.0.tar.gz
27-
ZOOKEEPER_URL=http://mirrors.163.com/gentoo/distfiles/zookeeper-3.4.9.tar.gz
28-
CMAKE_URL=https://github.com/Kitware/CMake/archive/v3.2.1.tar.gz
29-
GFLAGS_URL=https://github.com/schuhschuh/gflags/archive/v2.1.2.tar.gz
30-
GLOG_URL=https://github.com/google/glog/archive/v0.3.3.tar.gz
31-
GTEST_URL=https://github.com/google/googletest/archive/release-1.8.0.tar.gz
32-
LIBUNWIND_URL=http://mirrors.163.com/gentoo/distfiles/libunwind-0.99.tar.gz
33-
GPERFTOOLS_URL=https://github.com/00k/gperftools/raw/master/gperftools-2.5.tar.gz
34-
INS_URL=https://github.com/baidu/ins/archive/0.14.tar.gz
35-
NOSE_URL=http://mirrors.163.com/gentoo/distfiles/nose-1.3.7.tar.gz
23+
BOOST_URL=http://mirrors.163.com/gentoo/distfiles/boost_${BOOST_VERSION}.tar.bz2
24+
PROTOBUF_URL=http://mirrors.163.com/gentoo/distfiles/protobuf-${PROTOBUF_VERSION}.tar.bz2
25+
SNAPPY_URL=http://mirrors.163.com/gentoo/distfiles/snappy-${SNAPPY_VERSION}.tar.gz
26+
SOFA_PBRPC_URL=https://github.com/baidu/sofa-pbrpc/archive/v${SOFA_PBRPC_VERSION}.tar.gz
27+
ZOOKEEPER_URL=http://mirrors.163.com/gentoo/distfiles/zookeeper-${ZOOKEEPER_VERSION}.tar.gz
28+
CMAKE_URL=https://github.com/Kitware/CMake/archive/v${CMAKE_VERSION}.tar.gz
29+
GFLAGS_URL=https://github.com/schuhschuh/gflags/archive/v${GFLAGS_VERSION}.tar.gz
30+
GLOG_URL=https://github.com/google/glog/archive/v${GLOG_VERSION}.tar.gz
31+
GTEST_URL=https://github.com/google/googletest/archive/release-${GTEST_VERSION}.tar.gz
32+
LIBUNWIND_URL=http://mirrors.163.com/gentoo/distfiles/libunwind-${LIBUNWIND_VERSION}.tar.gz
33+
GPERFTOOLS_URL=https://github.com/00k/gperftools/raw/master/gperftools-${GPERFTOOLS_VERSION}.tar.gz
34+
INS_URL=https://github.com/baidu/ins/archive/${INS_VERSION}.tar.gz
35+
NOSE_URL=http://mirrors.163.com/gentoo/distfiles/nose-${NOSE_VERSION}.tar.gz
3636
elif [ $MIRROR == "origin" ]; then
37-
BOOST_URL=http://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.tar.bz2
38-
PROTOBUF_URL=https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.bz2
39-
SNAPPY_URL=https://github.com/google/snappy/releases/download/1.1.3/snappy-1.1.3.tar.gz
40-
SOFA_PBRPC_URL=https://github.com/baidu/sofa-pbrpc/archive/v1.1.0.tar.gz
41-
ZOOKEEPER_URL=http://www-us.apache.org/dist/zookeeper/zookeeper-3.4.9/zookeeper-3.4.9.tar.gz
42-
CMAKE_URL=https://github.com/Kitware/CMake/archive/v3.2.1.tar.gz
43-
GFLAGS_URL=https://github.com/schuhschuh/gflags/archive/v2.1.2.tar.gz
44-
GLOG_URL=https://github.com/google/glog/archive/v0.3.3.tar.gz
45-
GTEST_URL=https://github.com/google/googletest/archive/release-1.8.0.tar.gz
46-
LIBUNWIND_URL=http://download.savannah.gnu.org/releases/libunwind/libunwind-0.99.tar.gz
47-
GPERFTOOLS_URL=https://github.com/gperftools/gperftools/releases/download/gperftools-2.5/gperftools-2.5.tar.gz
48-
INS_URL=https://github.com/baidu/ins/archive/0.14.tar.gz
49-
NOSE_URL=http://mirrors.163.com/gentoo/distfiles/nose-1.3.7.tar.gz
37+
BOOST_URL=http://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_${BOOST_VERSION}.tar.bz2
38+
PROTOBUF_URL=https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-${PROTOBUF_VERSION}.tar.bz2
39+
SNAPPY_URL=https://github.com/google/snappy/releases/download/${SNAPPY_VERSION}/snappy-${SNAPPY_VERSION}.tar.gz
40+
SOFA_PBRPC_URL=https://github.com/baidu/sofa-pbrpc/archive/v${SOFA_PBRPC_VERSION}.tar.gz
41+
ZOOKEEPER_URL=http://www-us.apache.org/dist/zookeeper/zookeeper-${ZOOKEEPER_VERSION}/zookeeper-${ZOOKEEPER_VERSION}.tar.gz
42+
CMAKE_URL=https://github.com/Kitware/CMake/archive/v${CMAKE_VERSION}.tar.gz
43+
GFLAGS_URL=https://github.com/schuhschuh/gflags/archive/v${GFLAGS_VERSION}.tar.gz
44+
GLOG_URL=https://github.com/google/glog/archive/v${GLOG_VERSION}.tar.gz
45+
GTEST_URL=https://github.com/google/googletest/archive/release-${GTEST_VERSION}.tar.gz
46+
LIBUNWIND_URL=http://download.savannah.gnu.org/releases/libunwind/libunwind-${LIBUNWIND_VERSION}.tar.gz
47+
GPERFTOOLS_URL=https://github.com/gperftools/gperftools/releases/download/gperftools-${GPERFTOOLS_VERSION}/gperftools-${GPERFTOOLS_VERSION}.tar.gz
48+
INS_URL=https://github.com/baidu/ins/archive/${INS_VERSION}.tar.gz
49+
NOSE_URL=http://mirrors.163.com/gentoo/distfiles/nose-${NOSE_VERSION}.tar.gz
5050
elif [ $MIRROR == "baidu" ]; then
51-
BOOST_URL=http://gitlab.baidu.com/baidups/third/raw/master/boost_1_58_0.tar.bz2
52-
PROTOBUF_URL=http://gitlab.baidu.com/baidups/third/raw/master/protobuf-2.6.1.tar.bz2
53-
SNAPPY_URL=http://gitlab.baidu.com/baidups/third/raw/master/snappy-1.1.3.tar.gz
54-
SOFA_PBRPC_URL=http://gitlab.baidu.com/baidups/third/raw/master/sofa-pbrpc-1.1.0.tar.gz
55-
ZOOKEEPER_URL=http://gitlab.baidu.com/baidups/third/raw/master/zookeeper-3.4.9.tar.gz
56-
CMAKE_URL=http://gitlab.baidu.com/baidups/third/raw/master/CMake-3.2.1.tar.gz
57-
GFLAGS_URL=http://gitlab.baidu.com/baidups/third/raw/master/gflags-2.1.2.tar.gz
58-
GLOG_URL=http://gitlab.baidu.com/baidups/third/raw/master/glog-0.3.3.tar.gz
59-
GTEST_URL=http://gitlab.baidu.com/baidups/third/raw/master/googletest-release-1.8.0.tar.gz
60-
LIBUNWIND_URL=http://gitlab.baidu.com/baidups/third/raw/master/libunwind-0.99.tar.gz
61-
GPERFTOOLS_URL=http://gitlab.baidu.com/baidups/third/raw/master/gperftools-2.5.tar.gz
62-
INS_URL=http://gitlab.baidu.com/baidups/third/raw/master/ins-0.14.tar.gz
63-
NOSE_URL=http://gitlab.baidu.com/baidups/third/raw/master/nose-1.3.7.tar.gz
51+
BOOST_URL=http://gitlab.baidu.com/baidups/third/raw/master/boost_${BOOST_VERSION}.tar.bz2
52+
PROTOBUF_URL=http://gitlab.baidu.com/baidups/third/raw/master/protobuf-${PROTOBUF_VERSION}.tar.bz2
53+
SNAPPY_URL=http://gitlab.baidu.com/baidups/third/raw/master/snappy-${SNAPPY_VERSION}.tar.gz
54+
SOFA_PBRPC_URL=http://gitlab.baidu.com/baidups/third/raw/master/sofa-pbrpc-${SOFA_PBRPC_VERSION}.tar.gz
55+
ZOOKEEPER_URL=http://gitlab.baidu.com/baidups/third/raw/master/zookeeper-${ZOOKEEPER_VERSION}.tar.gz
56+
CMAKE_URL=http://gitlab.baidu.com/baidups/third/raw/master/CMake-${CMAKE_VERSION}.tar.gz
57+
GFLAGS_URL=http://gitlab.baidu.com/baidups/third/raw/master/gflags-${GFLAGS_VERSION}.tar.gz
58+
GLOG_URL=http://gitlab.baidu.com/baidups/third/raw/master/glog-${GLOG_VERSION}.tar.gz
59+
GTEST_URL=http://gitlab.baidu.com/baidups/third/raw/master/googletest-release-${GTEST_VERSION}.tar.gz
60+
LIBUNWIND_URL=http://gitlab.baidu.com/baidups/third/raw/master/libunwind-${LIBUNWIND_VERSION}.tar.gz
61+
GPERFTOOLS_URL=http://gitlab.baidu.com/baidups/third/raw/master/gperftools-${GPERFTOOLS_VERSION}.tar.gz
62+
INS_URL=http://gitlab.baidu.com/baidups/third/raw/master/ins-${INS_VERSION}.tar.gz
63+
NOSE_URL=http://gitlab.baidu.com/baidups/third/raw/master/nose-${NOSE_VERSION}.tar.gz
6464
else
6565
return 1
6666
fi

build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,8 @@ if [ ! -f "${FLAG_DIR}/nose_${NOSE_VERSION}" ] \
212212
wget --no-check-certificate -O nose-${NOSE_VERSION}.tar.gz ${NOSE_URL}
213213
tar zxf nose-${NOSE_VERSION}.tar.gz --recursive-unlink
214214
cd nose-${NOSE_VERSION}
215-
python setup.py build
216-
cp -af build/script*/nosetests ${DEPS_PREFIX}/bin
217-
cp -arf build/lib/nose ${DEPS_PREFIX}/lib
215+
export PYTHONPATH=${DEPS_PREFIX}/lib
216+
python setup.py install --prefix=. --install-scripts=${DEPS_PREFIX}/bin --install-lib=${DEPS_PREFIX}/lib
218217
cd -
219218
touch "${FLAG_DIR}/nose_${NOSE_VERSION}"
220219
fi
@@ -240,4 +239,5 @@ sed -i "s:^INS_PREFIX=.*:INS_PREFIX=$DEPS_PREFIX:" depends.mk
240239
# build tera
241240
########################################
242241

242+
make clean
243243
make -j4

internal_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
sh -$- build.sh baidu
3+
source ./build.sh baidu

ubuntu_build.sh

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)