diff options
Diffstat (limited to 'misc/onnx')
| -rw-r--r-- | misc/onnx/Makefile | 1 | ||||
| -rw-r--r-- | misc/onnx/files/patch-CMakeLists.txt | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/misc/onnx/Makefile b/misc/onnx/Makefile index 7788b1d24ef9..3087145e8f7d 100644 --- a/misc/onnx/Makefile +++ b/misc/onnx/Makefile @@ -1,6 +1,7 @@ PORTNAME= onnx DISTVERSIONPREFIX= v DISTVERSION= 1.19.1 +PORTREVISION= 1 CATEGORIES= misc # machine-learning MAINTAINER= yuri@FreeBSD.org diff --git a/misc/onnx/files/patch-CMakeLists.txt b/misc/onnx/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..f1e4a2c51f35 --- /dev/null +++ b/misc/onnx/files/patch-CMakeLists.txt @@ -0,0 +1,28 @@ +-- remove visibility settings to fix run-time of PyTorch with ONNX +-- 'import torch' fails otherwise with undefined symbols from ONNX +-- https://github.com/pytorch/pytorch/issues/167525 + +--- CMakeLists.txt.orig 2025-11-11 00:00:00 UTC ++++ CMakeLists.txt +@@ -419,8 +419,8 @@ foreach(_proto_src ${ONNX_PROTO_SRCS}) + endforeach() + + # Hide all symbols we don't need +-set_target_properties(onnx_proto PROPERTIES CXX_VISIBILITY_PRESET hidden) +-set_target_properties(onnx_proto PROPERTIES VISIBILITY_INLINES_HIDDEN 1) ++#set_target_properties(onnx_proto PROPERTIES CXX_VISIBILITY_PRESET hidden) ++#set_target_properties(onnx_proto PROPERTIES VISIBILITY_INLINES_HIDDEN 1) + + set(LINKED_PROTOBUF_TARGET protobuf::libprotobuf) + if(ONNX_USE_LITE_PROTO) +@@ -459,8 +459,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "AIX") + else() + add_library(onnx ${ONNX_SRCS}) + endif() +-set_target_properties(onnx PROPERTIES CXX_VISIBILITY_PRESET hidden) +-set_target_properties(onnx PROPERTIES VISIBILITY_INLINES_HIDDEN ON) ++#set_target_properties(onnx PROPERTIES CXX_VISIBILITY_PRESET hidden) ++#set_target_properties(onnx PROPERTIES VISIBILITY_INLINES_HIDDEN ON) + + target_link_libraries(onnx PUBLIC onnx_proto) + add_onnx_global_defines(onnx) |
