You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/12/30 01:57:31 UTC
[GitHub] [iotdb] HTHou commented on a diff in pull request #8555: [IOTDB-4804] Cpp Client SDK bug-fix
HTHou commented on code in PR #8555:
URL: https://github.com/apache/iotdb/pull/8555#discussion_r1059213444
##########
client-cpp/compile_iotdb_session_lib.sh:
##########
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+thrift_bin=/usr/local/bin/thrift
+thrift_lib=/usr/local/lib
+
+### if you are compiling for 32bit CPU such as armv7l etc(maybe in an armv7l
+### server or using a cross-compile toolchain.
+### you should adefine ARCH32 to specify it.
+#
+# CXX_FLAGS_DEFINED="-DARCH32"
+
+CXX_FLAGS="-O2 -g -std=c++11 -lthrift"
+CXX_SO_FLAGS="-shared -fPIC"
+
+source_file="Session.cpp gen-cpp/common_types.cpp gen-cpp/IClientRPCService.cpp gen-cpp/client_types.cpp gen-cpp/IClientRPCService_server.skeleton.cpp"
+include_file="Session.h gen-cpp/common_types.h gen-cpp/IClientRPCService.h gen-cpp/client_types.h"
+
+common_thrift_dir=../thrift-commons/src/main/thrift
+client_thrift_dir=../thrift/src/main/thrift
+
+$thrift_bin --gen cpp -o src/main/ $common_thrift_dir/common.thrift
+$thrift_bin --gen cpp -o src/main/ -I $common_thrift_dir $client_thrift_dir/client.thrift
+
+cd src/main
+LD_LIBRARY_PATH=$thrift_lib g++ -Igen-cpp $CXX_FLAGS $CXX_SO_FLAGS $CXX_FLAGS_DEFINED -o libiotdb_session.so $source_file
+
+# back to iotdb/client-cpp
+cd ../../
+mkdir iotdb_cpp_client_sdk
+mkdir iotdb_cpp_client_sdk/include iotdb_cpp_client_sdk/lib
+cp $thrift_lib/libthrift-0.14.0.so iotdb_cpp_client_sdk/lib/
Review Comment:
We are using thrift 0.14.1 in IoTDB, why 0.14.0 here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org