Skip to content

Commit

Permalink
python modules shall dynamicly link to libstdc++ (#1423)
Browse files Browse the repository at this point in the history
python modules shall dynamicly link to libstdc++

- [x] Bug Fix (non-breaking change which fixes an issue)
  • Loading branch information
yuzhichang authored Jul 2, 2024
1 parent 8e12e38 commit 00c7e23
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
run: |
sudo rm -f cmake-build-release/*.deb cmake-build-release/*.rpm cmake-build-release/*.gz
sed -i "s/^version = \".*\"/version = \"$(echo $RELEASE_TAG | cut -c2-)\"/" pyproject.toml
sudo docker exec infinity_build bash -c "cd /infinity/ && rm -f dist/* && /usr/local/bin/pip3.10 wheel . -v -w dist --config-settings=wheel.py-api=cp310 --config-settings=build-dir='cmake-build-release' && /usr/local/bin/pip3.11 wheel . -v -w dist --config-settings=wheel.py-api=cp311 --config-settings=build-dir='cmake-build-release' && /usr/local/bin/pip3.12 wheel . -v -w dist --config-settings=wheel.py-api=cp312 --config-settings=build-dir='cmake-build-release' && auditwheel repair --plat manylinux_2_17_x86_64 dist/infinity*.whl"
sudo docker exec infinity_build bash -c "cd /infinity/ && rm -rf dist wheelhouse && /usr/local/bin/pip3.10 wheel . -v -w dist --config-settings=wheel.py-api=cp310 --config-settings=build-dir='cmake-build-release' && /usr/local/bin/pip3.11 wheel . -v -w dist --config-settings=wheel.py-api=cp311 --config-settings=build-dir='cmake-build-release' && /usr/local/bin/pip3.12 wheel . -v -w dist --config-settings=wheel.py-api=cp312 --config-settings=build-dir='cmake-build-release' && mkdir wheelhouse && cp dist/infinity*.whl wheelhouse && wheel tags --remove --platform-tag manylinux_2_17_x86_64 wheelhouse/infinity*linux_x86_64.whl"
- name: Publish package distributions to PyPI
if: startsWith(github.ref, 'refs/tags/v')
Expand Down
6 changes: 2 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,9 @@ target_link_libraries(embedded_infinity_ext PRIVATE
jma
opencc
)
target_link_options(embedded_infinity_ext PRIVATE -static-libstdc++ -static-libgcc)

#if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
# target_link_libraries(embedded_infinity_ext PRIVATE libasan.a)
#endif ()
# WARN: python modules shall dynamicly link to libstdc++!!!
#target_link_options(embedded_infinity_ext PRIVATE -static-libstdc++ -static-libgcc)

target_link_directories(embedded_infinity_ext PUBLIC "${CMAKE_BINARY_DIR}/lib")
target_link_directories(embedded_infinity_ext PUBLIC "${CMAKE_BINARY_DIR}/third_party/oatpp/src/")
Expand Down
30 changes: 12 additions & 18 deletions src/executor/operator/physical_scan/physical_knn_scan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,36 @@

module;

#include "type/complex/row_id.h"
#include <string>

module physical_knn_scan;

import stl;
import query_context;
import operator_state;
import physical_operator_type;
import base_table_ref;
import table_entry;
import block_column_entry;
import segment_index_entry;
import load_meta;
import knn_expression;
import data_type;
import common_query_filter;
import physical_filter_scan_base;

import logger;
import operator_state;
import global_block_id;
import block_index;
import base_table_ref;
import knn_scan_data;
import knn_filter;
import vector_buffer;
import knn_distance;
import third_party;
import txn;
import infinity_exception;
import default_values;
import segment_iter;
import knn_expression;
import column_expression;

import index_base;
import buffer_manager;
import merge_knn;
import knn_result_handler;
Expand All @@ -47,23 +52,12 @@ import annivfflat_index_data;
import buffer_handle;
import data_block;
import bitmask;
import bitmask_buffer;
import column_vector;
import expression_evaluator;
import expression_state;
import index_hnsw;
import status;
import hnsw_alg;
import knn_expression;
import value;
import status;
import buffer_obj;
import create_index_info;
import knn_expr;
import chunk_index_entry;
import internal_types;
import block_entry;
import segment_index_entry;
import segment_entry;
import abstract_hnsw;

Expand Down
7 changes: 0 additions & 7 deletions src/executor/operator/physical_scan/physical_knn_scan.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,15 @@ module;
export module physical_knn_scan;

import stl;

import query_context;
import operator_state;
import physical_operator;
import physical_operator_type;
import base_expression;
import global_block_id;
import base_table_ref;
import table_entry;
import block_column_entry;
import segment_index_entry;
import block_index;
import load_meta;
import knn_expression;
import infinity_exception;
import internal_types;
import data_type;
import common_query_filter;
import physical_filter_scan_base;
Expand Down

0 comments on commit 00c7e23

Please sign in to comment.