GNU bug report logs -
#65630
[PATCH] gnu: onnx: Update to 1.14.1
Previous Next
Reported by: Andy Tai <atai <at> atai.org>
Date: Wed, 30 Aug 2023 16:41:02 UTC
Severity: normal
Tags: patch
Merged with 65650
Done: Greg Hogan <code <at> greghogan.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Thu, 24 Apr 2025 10:27:51 -0400
with message-id <CA+3U0ZmNtkGrB4ee=shBBGxKNCgcCDE3qW7BmMARGs2m+V6aww <at> mail.gmail.com>
and subject line Re: [bug#65630]
has caused the debbugs.gnu.org bug report #65630,
regarding [PATCH] gnu: onnx-optimizer: Update to 0.3.17
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
65630: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65630
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
* gnu/packages/machine-learning.scm (onnx-optimizer): Update to 0.3.17
* gnu/packages/patches/onnx-optimizer-system-library.patch:
Adapt to onnx-optimizer 0.3.17
---
gnu/packages/machine-learning.scm | 6 +--
.../onnx-optimizer-system-library.patch | 39 ++++++++-----------
2 files changed, 19 insertions(+), 26 deletions(-)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 626afeb030..eef12ecb4d 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1118,8 +1118,8 @@ (define-public python-onnx
(define-public onnx-optimizer
(package
(name "onnx-optimizer")
- ;; Note: 0.2.x is *more* recent than 1.5.0.
- (version "0.2.6")
+ ;; Note: 0.2.x or 0.3.x is *more* recent than 1.5.0.
+ (version "0.3.17")
(home-page "https://github.com/onnx/optimizer")
(source (origin
(method git-fetch)
@@ -1128,7 +1128,7 @@ (define-public onnx-optimizer
(commit (string-append "v" version))))
(sha256
(base32
- "1wkqqdxcxpfbf8zpbdfdd3zz5jkw775g31gyykj11z4y6pp659l6"))
+ "0j8civ0vf2vxyk5ihb9zxvwsqv8yzbfmkg42rnxwf59gdzgz48li"))
(file-name (git-file-name name version))
(patches (search-patches "onnx-optimizer-system-library.patch"))
(modules '((guix build utils)))
diff --git a/gnu/packages/patches/onnx-optimizer-system-library.patch b/gnu/packages/patches/onnx-optimizer-system-library.patch
index 5c592597e0..9c888cc846 100644
--- a/gnu/packages/patches/onnx-optimizer-system-library.patch
+++ b/gnu/packages/patches/onnx-optimizer-system-library.patch
@@ -1,42 +1,35 @@
-Arrange so that onnx-optimizer (1) uses our own ONNX build,
+Arrange so that onnx-optimizer (1) uses our own ONNX build,
(2) builds as a shared library, and (3) links against the shared
libraries of ONNX.
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c2e48b35..8af51076 100644
+index 00633856..c6f3188d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -9,8 +9,6 @@ endif(NOT MSVC)
-
- set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-
+@@ -27,8 +27,6 @@ if(NOT ONNX_OPT_USE_SYSTEM_PROTOBUF)
+ endif()
+
+
-set(ONNX_ROOT ${PROJECT_SOURCE_DIR}/third_party/onnx)
--add_subdirectory(${ONNX_ROOT})
-
+-add_subdirectory_if_no_target(${ONNX_ROOT} ${ONNX_TARGET_NAME})
+
file(READ "${PROJECT_SOURCE_DIR}/VERSION_NUMBER" ONNX_OPTIMIZER_VERSION)
string(STRIP "${ONNX_OPTIMIZER_VERSION}" ONNX_OPTIMIZER_VERSION)
-@@ -21,14 +19,18 @@ file(GLOB_RECURSE onnx_opt_srcs "onnxoptimizer/*.cc"
- list(REMOVE_ITEM onnx_opt_srcs "${PROJECT_SOURCE_DIR}/onnxoptimizer/cpp2py_export.cc")
-
- add_library(onnx_optimizer ${onnx_opt_srcs})
--target_link_libraries(onnx_optimizer PUBLIC onnx)
-+target_link_libraries(onnx_optimizer PUBLIC onnx onnx_proto)
- target_include_directories(onnx_optimizer PUBLIC
- $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
+@@ -47,8 +45,12 @@ target_include_directories(onnx_optimizer PUBLIC
$<INSTALL_INTERFACE:include>
)
-
+
+# These cpp macros must be defined so the ONNX headers behave
+# correctly.
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DONNX_ML=1 -DONNX_NAMESPACE=onnx")
+
- add_executable(onnx_optimizer_exec examples/onnx_optimizer_exec.cpp)
+ onnxopt_add_executable(onnx_optimizer_exec examples/onnx_optimizer_exec.cpp)
-target_link_libraries(onnx_optimizer_exec onnx_optimizer)
+target_link_libraries(onnx_optimizer_exec onnx_optimizer protobuf)
-
- if(BUILD_ONNX_PYTHON)
- if("${PY_EXT_SUFFIX}" STREQUAL "")
-@@ -79,11 +81,10 @@ if(BUILD_ONNX_PYTHON)
+
+
+ file(GLOB onnx_opt_c_api_srcs "onnxoptimizer/c_api/*.cc"
+@@ -112,11 +114,10 @@ if(BUILD_ONNX_PYTHON)
PRIVATE $<TARGET_OBJECTS:onnx_optimizer>)
else()
# Assume everything else is like gcc
@@ -49,5 +42,5 @@ index c2e48b35..8af51076 100644
+ PROPERTIES LINK_FLAGS
+ "-Wl,-rpath=${CMAKE_INSTALL_PREFIX}/lib")
endif()
-
+
target_link_libraries(onnx_opt_cpp2py_export PRIVATE onnx_optimizer)
base-commit: 74d72046bdc1ed6c859565570d0db58d20c9ddd7
prerequisite-patch-id: 829815d0ecb2dcb88c93fa4a09340cb889be4adb
--
2.41.0
[Message part 3 (message/rfc822, inline)]
On Thu, Jan 4, 2024 at 9:12 AM Sharlatan Hellseher
<sharlatanus <at> gmail.com> wrote:
>
> Hi,
>
> name: onnx
> version: 1.12.0
>
> Is broken on commit:
>
> guix describe
> Generation 498 Jan 04 2024 10:55:58 (current)
> guix 7b0863f
> repository URL: https://git.savannah.gnu.org/git/guix.git
> branch: master
> commit: 7b0863f07a113caef26fea13909bd97d250b629e
>
> phase `make-test-directory-writable' succeeded after 0.0 seconds
> starting phase `check'
> running "python setup.py" with command "test" and parameters ()
> running pytest
> /gnu/store/91wasjkmy50p8fq0rf9jby80mnmq1fxr-python-3.10.7/lib/python3.10/site-packages/setuptools/command/easy_install.py:144:
> EasyInstallDeprecationWarning: easy_install command is deprecated. Use
> build and pip and other standards-based tools.
> warnings.warn(
> /gnu/store/91wasjkmy50p8fq0rf9jby80mnmq1fxr-python-3.10.7/lib/python3.10/site-packages/setuptools/command/install.py:34:
> SetuptoolsDeprecationWarning: setup.py install is deprecated. Use
> build and pip and other standards-based tools.
> warnings.warn(
> Searching for protobuf<=3.20.1,>=3.12.2
> Reading https://pypi.org/simple/protobuf/
> Download error on https://pypi.org/simple/protobuf/: [Errno -3]
> Temporary failure in name resolution -- Some packages may not be
> found!
> Couldn't find index page for 'protobuf' (maybe misspelled?)
> Scanning index of all packages (this may take a while)
> Reading https://pypi.org/simple/
> Download error on https://pypi.org/simple/: [Errno -3] Temporary
> failure in name resolution -- Some packages may not be found!
> No local packages or working download links found for protobuf<=3.20.1,>=3.12.2
>
> It would be nice to have it fixed with this update.
>
> Thanks,
> Oleg
>
> --
> … наш разум - превосходная объяснительная машина которая способна
> найти смысл почти в чем угодно, истолковать любой феномен, но
> совершенно не в состоянии принять мысль о непредсказуемости.
Closing as onnx is currently at version 1.17.0 and successfully
building. Looks to have been updated in #75708.
This bug report was last modified 29 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.