File: soversion.patch

package info (click to toggle)
onnx 1.20.0-3
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 62,540 kB
  • sloc: python: 77,643; cpp: 60,445; sh: 52; makefile: 51; javascript: 1
file content (25 lines) | stat: -rw-r--r-- 1,179 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Description: give the shared objects a soversion and remove -fvisibility=hidden
 Hidden symbols lead to undefined references, disabling is the easiest way.
Forward: not-needed
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -443,8 +443,8 @@
 add_dependencies(onnx_object onnx_proto_object)
 target_include_directories(onnx_object PUBLIC
   $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
-set_target_properties(onnx_object PROPERTIES CXX_VISIBILITY_PRESET hidden)
-set_target_properties(onnx_object PROPERTIES VISIBILITY_INLINES_HIDDEN ON)
+#set_target_properties(onnx_object PROPERTIES CXX_VISIBILITY_PRESET hidden)
+#set_target_properties(onnx_object PROPERTIES VISIBILITY_INLINES_HIDDEN ON)
 target_include_directories(onnx_object PUBLIC $<BUILD_INTERFACE:${ONNX_ROOT}>)
 add_onnx_global_defines(onnx_object)
 target_link_libraries(onnx_proto_object PUBLIC ${LINKED_PROTOBUF_TARGET})
@@ -593,6 +593,8 @@
 if(ONNX_BUILD_TESTS)
   include(${ONNX_ROOT}/cmake/unittest.cmake)
 endif()
+set_target_properties(onnx PROPERTIES VERSION 1 SOVERSION 1)
+set_target_properties(onnx_proto PROPERTIES VERSION 1 SOVERSION 1)
 
 include(cmake/summary.cmake)
 onnx_print_configuration_summary()