Skip to content

Commit

Permalink
fix: Undefined symbol in libmilvus_storage.so
Browse files Browse the repository at this point in the history
Signed-off-by: chyezh <chyezh@outlook.com>
  • Loading branch information
chyezh committed Nov 7, 2024
1 parent 55a9909 commit 9db9022
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ if (WITH_OPENDAL)
list(APPEND LINK_LIBS opendal)
endif()

# azure build on linux will generate repeated symbol, which will generate undefined symbol on libmilvus_storage.so
# set a linker script here to use code symbol but not undefined symbol.
# U _ZN5Azure4Core4Uuid10CreateUuidEv
# 0000000000000350 T _ZN5Azure4Core4Uuid10CreateUuidEv
if (LINUX)
target_link_options(milvus-storage PRIVATE -T${CMAKE_SOURCE_DIR}/azure.ld)
endif()
target_link_libraries(milvus-storage PUBLIC ${LINK_LIBS})

if (WITH_UT)
Expand Down
88 changes: 88 additions & 0 deletions cpp/azure.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
EXTERN(T _ZN5Azure4Core4Uuid10CreateUuidEv)
EXTERN(T _ZN5Azure4Core11Diagnostics9_internal3Log10g_logLevelE)
EXTERN(T _ZN5Azure4Core11Diagnostics9_internal3Log18g_isLoggingEnabledE)
EXTERN(T _ZN5Azure4Core11Diagnostics9_internal3Log5WriteENS1_6Logger5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE)
EXTERN(T _ZN5Azure4Core15OperationStatus10NotStartedE)
EXTERN(T _ZN5Azure4Core15OperationStatus6FailedE)
EXTERN(T _ZN5Azure4Core15OperationStatus7RunningE)
EXTERN(T _ZN5Azure4Core15OperationStatus9CancelledE)
EXTERN(T _ZN5Azure4Core15OperationStatus9SucceededE)
EXTERN(T _ZN5Azure4Core22RequestFailedExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE)
EXTERN(T _ZN5Azure4Core22RequestFailedExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE)
EXTERN(T _ZN5Azure4Core2IO10BodyStream11ReadToCountEPhmRKNS0_7ContextE)
EXTERN(T _ZN5Azure4Core2IO10BodyStream9ReadToEndERKNS0_7ContextE)
EXTERN(T _ZN5Azure4Core2IO14FileBodyStreamC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE)
EXTERN(T _ZN5Azure4Core2IO14FileBodyStreamD1Ev)
EXTERN(T _ZN5Azure4Core3Url6DecodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE)
EXTERN(T _ZN5Azure4Core3Url6EncodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_)
EXTERN(T _ZN5Azure4Core3UrlC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE)
EXTERN(T _ZN5Azure4Core4Http10HttpMethod3GetE)
EXTERN(T _ZN5Azure4Core4Http10HttpMethod3PutE)
EXTERN(T _ZN5Azure4Core4Http10HttpMethod4HeadE)
EXTERN(T _ZN5Azure4Core4Http10HttpMethod4PostE)
EXTERN(T _ZN5Azure4Core4Http10HttpMethod5PatchE)
EXTERN(T _ZN5Azure4Core4Http10HttpMethod6DeleteE)
EXTERN(T _ZN5Azure4Core4Http11RawResponse9SetHeaderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_)
EXTERN(T _ZN5Azure4Core4Http7_detail18UserAgentGenerator17GenerateUserAgentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_SB_)
EXTERN(T _ZN5Azure4Core4Http7Request12RemoveHeaderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE)
EXTERN(T _ZN5Azure4Core4Http7Request9GetHeaderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE)
EXTERN(T _ZN5Azure4Core4Http7Request9SetHeaderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_)
EXTERN(T _ZN5Azure4Core4Http7RequestC1ENS1_10HttpMethodENS0_3UrlE)
EXTERN(T _ZN5Azure4Core4Http7RequestC1ENS1_10HttpMethodENS0_3UrlEb)
EXTERN(T _ZN5Azure4Core4Http8Policies14NextHttpPolicy4SendERNS1_7RequestERKNS0_7ContextE)
EXTERN(T _ZN5Azure4Core4Http8Policies7_detail27g_defaultAllowedHttpHeadersB5cxx11E)
EXTERN(T _ZN5Azure4Core4Http8Policies7_detail35g_defaultAllowedHttpQueryParametersB5cxx11E)
EXTERN(T _ZN5Azure4Core4Http8Policies9_internal15TransportPolicyC1ERKNS2_16TransportOptionsE)
EXTERN(T _ZN5Azure4Core7Convert12Base64DecodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE)
EXTERN(T _ZN5Azure4Core7Convert12Base64EncodeB5cxx11ERKSt6vectorIhSaIhEE)
EXTERN(T _ZN5Azure4Core9_internal11Environment11GetVariableB5cxx11EPKc)
EXTERN(T _ZN5Azure4Core9_internal17AzureNoReturnPathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE)
EXTERN(T _ZN5Azure4ETag3AnyEv)
EXTERN(T _ZN5Azure7Storage16StorageException18CreateFromResponseESt10unique_ptrINS_4Core4Http11RawResponseESt14default_deleteIS5_EE)
EXTERN(T _ZN5Azure7Storage9_internal10FileReaderC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE)
EXTERN(T _ZN5Azure7Storage9_internal10FileReaderD1Ev)
EXTERN(T _ZN5Azure7Storage9_internal10FileWriter5WriteEPKhml)
EXTERN(T _ZN5Azure7Storage9_internal10FileWriterC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE)
EXTERN(T _ZN5Azure7Storage9_internal10FileWriterD1Ev)
EXTERN(T _ZN5Azure7Storage9_internal10HmacSha256ERKSt6vectorIhSaIhEES6_)
EXTERN(T _ZN5Azure7Storage9_internal13UrlEncodePathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE)
EXTERN(T _ZN5Azure7Storage9_internal21ParseConnectionStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE)
EXTERN(T _ZN5Azure7Storage9_internal23UrlEncodeQueryParameterERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE)
EXTERN(T _ZN5Azure7Storage9_internal26GetDefaultScopeForAudienceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE)
EXTERN(T _ZN5Azure7Storage9_internal29SecondaryHostReplicaStatusKeyE)
EXTERN(T _ZN5Azure7Storage9_internal32ReliableStreamClientRequestIdKeyE)
EXTERN(T _ZN5Azure7Storage9_internal9XmlReader4ReadEv)
EXTERN(T _ZN5Azure7Storage9_internal9XmlReaderC1EPKcm)
EXTERN(T _ZN5Azure7Storage9_internal9XmlReaderD1Ev)
EXTERN(T _ZN5Azure7Storage9_internal9XmlWriter11GetDocumentB5cxx11Ev)
EXTERN(T _ZN5Azure7Storage9_internal9XmlWriter5WriteENS1_7XmlNodeE)
EXTERN(T _ZN5Azure7Storage9_internal9XmlWriterC1Ev)
EXTERN(T _ZN5Azure7Storage9_internal9XmlWriterD1Ev)
EXTERN(T _ZN5Azure8DateTime16SystemClockEpochE)
EXTERN(T _ZN5Azure8DateTime5ParseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10DateFormatE)
EXTERN(T _ZN5Azure8DateTimeC1Esaaaaaiaaab)
EXTERN(T _ZNK5Azure4Core2IO14FileBodyStream6LengthEv)
EXTERN(T _ZNK5Azure4Core3Url14GetAbsoluteUrlB5cxx11Ev)
EXTERN(T _ZNK5Azure4Core3Url14GetRelativeUrlB5cxx11Ev)
EXTERN(T _ZNK5Azure4Core4Http11RawResponse10GetHeadersB5cxx11Ev)
EXTERN(T _ZNK5Azure4Core4Http11RawResponse13GetStatusCodeEv)
EXTERN(T _ZNK5Azure4Core4Http11RawResponse15GetReasonPhraseB5cxx11Ev)
EXTERN(T _ZNK5Azure4Core4Http7Request10GetHeadersB5cxx11Ev)
EXTERN(T _ZNK5Azure4Core4Http7Request9GetMethodEv)
EXTERN(T _ZNK5Azure4Core7Context11GetDeadlineEv)
EXTERN(T _ZNK5Azure7Storage9_internal15SharedKeyPolicy12GetSignatureB5cxx11ERKNS_4Core4Http7RequestE)
EXTERN(T _ZNK5Azure8DateTime8ToStringB5cxx11ENS0_10DateFormatE)
EXTERN(T _ZNK5Azure8DateTime8ToStringB5cxx11ENS0_10DateFormatENS0_18TimeFractionFormatE)
EXTERN(T _ZNK5Azure8DateTimecvNSt6chrono10time_pointINS1_3_V212system_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEEEv)
EXTERN(T _ZTVN5Azure4Core2IO16MemoryBodyStreamE)
EXTERN(T _ZTVN5Azure4Core2IO9_internal26RandomAccessFileBodyStreamE)
EXTERN(T _ZTVN5Azure4Core4Http8Policies9_internal11RetryPolicyE)
EXTERN(T _ZTVN5Azure4Core4Http8Policies9_internal15TelemetryPolicyE)
EXTERN(T _ZTVN5Azure4Core4Http8Policies9_internal15TransportPolicyE)
EXTERN(T _ZTVN5Azure4Core4Http8Policies9_internal21RequestActivityPolicyE)
EXTERN(T _ZTVN5Azure4Core4Http8Policies9_internal31BearerTokenAuthenticationPolicyE)
EXTERN(T _ZTVN5Azure4Core4Http8Policies9_internal9LogPolicyE)
EXTERN(T _ZTVN5Azure7Storage9_internal14ReliableStreamE)
EXTERN(T _ZTVN5Azure7Storage9_internal21StoragePerRetryPolicyE)
EXTERN(T _ZTVN5Azure7Storage9_internal30StorageSwitchToSecondaryPolicyE)
EXTERN(T _ZTVN5Azure7Storage9_internal38StorageBearerTokenAuthenticationPolicyE)

0 comments on commit 9db9022

Please sign in to comment.