Skip to content

Commit e34071f

Browse files
authored
Fix the static stdc++ reference. (#75)
* Fix the static stdc++ reference. * Install libstdc++-static in centos. * Tune timeout. * Tune timeout. * Fix path.
1 parent 05cb42e commit e34071f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/pull_request.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ jobs:
148148
case ${{ matrix.os }} in
149149
centos7)
150150
# install GCC4.8 by yum to build example
151-
yum -y update && yum -y install gcc gcc-c++
151+
yum -y update && yum -y install gcc gcc-c++ libstdc++-static
152152
pushd examples
153153
mkdir build
154154
cmake \
@@ -167,7 +167,7 @@ jobs:
167167
cmake --build build/ -j $(nproc)
168168
# if the example use the g++ under /opt/vesoft/toolset, need to replace the low version libstdc++.so
169169
rm /usr/lib/x86_64-linux-gnu/libstdc++.so.6
170-
ln -s /opt/vesoft/toolset/clang/9.0.0/lib64/libstdc++.so /usr/lib/x86_64-linux-gnu/libstdc++.so.6
170+
ln -s /opt/vesoft/toolset/clang/10.0.0/lib64/libstdc++.so /usr/lib/x86_64-linux-gnu/libstdc++.so.6
171171
LD_LIBRARY_PATH=/usr/local/nebula/lib64:/usr/local/nebula/lib:$LD_LIBRARY_PATH ./build/session_example graphd:9669
172172
popd
173173
;;

examples/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ else()
2424
add_compile_options(-D_GLIBCXX_USE_CXX11_ABI=1)
2525
endif()
2626

27+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libstdc++")
2728

2829
# This project only depends on the nebula-client headers/library
2930
include_directories(${NEBULA_HOME}/include)

src/client/tests/SessionTest.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ TEST_F(SessionTest, InvalidAddress) {
143143

144144
TEST_F(SessionTest, Data) {
145145
nebula::ConnectionPool pool;
146-
nebula::Config c{10, 0, 100, 0, "", false};
146+
nebula::Config c{10, 0, 300, 0, "", false};
147147
pool.init({kServerHost ":9669"}, c);
148148
auto session = pool.getSession("root", "nebula");
149149
ASSERT_TRUE(session.valid());
@@ -160,7 +160,7 @@ TEST_F(SessionTest, Data) {
160160
resp = session.execute(
161161
"INSERT VERTEX geo VALUES 'v101':(ST_Point(3, 8), ST_Point(4, 6), "
162162
"ST_GeogFromText('LINESTRING(0 1, 2 3)'), ST_GeogFromText('POLYGON((0 1, 1 2, 2 3, 0 1))'))");
163-
ASSERT_EQ(resp.errorCode, nebula::ErrorCode::SUCCEEDED);
163+
ASSERT_EQ(resp.errorCode, nebula::ErrorCode::SUCCEEDED) << *resp.errorMsg;
164164

165165
// execute
166166
resp = session.execute(

0 commit comments

Comments
 (0)