Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the static stdc++ reference. #75

Merged
merged 5 commits into from
Dec 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
case ${{ matrix.os }} in
centos7)
# install GCC4.8 by yum to build example
yum -y update && yum -y install gcc gcc-c++
yum -y update && yum -y install gcc gcc-c++ libstdc++-static
pushd examples
mkdir build
cmake \
Expand All @@ -167,7 +167,7 @@ jobs:
cmake --build build/ -j $(nproc)
# if the example use the g++ under /opt/vesoft/toolset, need to replace the low version libstdc++.so
rm /usr/lib/x86_64-linux-gnu/libstdc++.so.6
ln -s /opt/vesoft/toolset/clang/9.0.0/lib64/libstdc++.so /usr/lib/x86_64-linux-gnu/libstdc++.so.6
ln -s /opt/vesoft/toolset/clang/10.0.0/lib64/libstdc++.so /usr/lib/x86_64-linux-gnu/libstdc++.so.6
LD_LIBRARY_PATH=/usr/local/nebula/lib64:/usr/local/nebula/lib:$LD_LIBRARY_PATH ./build/session_example graphd:9669
popd
;;
Expand Down
1 change: 1 addition & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ else()
add_compile_options(-D_GLIBCXX_USE_CXX11_ABI=1)
endif()

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

# This project only depends on the nebula-client headers/library
include_directories(${NEBULA_HOME}/include)
Expand Down
4 changes: 2 additions & 2 deletions src/client/tests/SessionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ TEST_F(SessionTest, InvalidAddress) {

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

// execute
resp = session.execute(
Expand Down