Skip to content

Commit d9e0310

Browse files
201341wuhongsong
authored andcommitted
fix buildfs.sh failed an debian11
Signed-off-by: swj <[email protected]>
1 parent 26a51f0 commit d9e0310

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

buildfs.sh

+13-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,22 @@ then
77
exit
88
fi
99

10+
if [ `gcc -dumpversion | awk -F'.' '{print $1}'` -le 6 ]
11+
then
12+
bazelflags=''
13+
else
14+
bazelflags='--copt -faligned-new'
15+
fi
16+
1017
if [ "$1" = "debug" ]
1118
then
1219
DEBUG_FLAG="--compilation_mode=dbg"
1320
fi
1421

15-
bazel build curvefs/... --copt -DHAVE_ZLIB=1 ${DEBUG_FLAG} -s --define=with_glog=true --define=libunwind=true --copt -DGFLAGS_NS=google --copt -Wno-error=format-security --copt -DUSE_BTHREAD_MUTEX --copt -DCURVEVERSION=${curve_version} --linkopt -L/usr/local/lib
22+
bazel build curvefs/... --copt -DHAVE_ZLIB=1 ${DEBUG_FLAG} -s \
23+
--define=with_glog=true --define=libunwind=true --copt -DGFLAGS_NS=google --copt -Wno-error=format-security --copt \
24+
-DUSE_BTHREAD_MUTEX --copt -DCURVEVERSION=${curve_version} --linkopt -L/usr/local/lib ${bazelflags}
25+
1626
if [ $? -ne 0 ]
1727
then
1828
echo "build curvefs failed"
@@ -34,4 +44,5 @@ then
3444
echo "mds_test failed"
3545
exit
3646
fi
37-
fi
47+
fi
48+
echo "end compile"

0 commit comments

Comments
 (0)