Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] json dependency update request #23512

Closed
ranjitshs opened this issue Jan 28, 2025 · 8 comments · Fixed by #23589
Closed

[Build] json dependency update request #23512

ranjitshs opened this issue Jan 28, 2025 · 8 comments · Fixed by #23589
Labels
build build issues; typically submitted using template

Comments

@ranjitshs
Copy link
Contributor

Describe the issue

With cmake master branch, I see below error while building.
This issue is for updating the json package dependency.

CMake Error at /home/buildusr/jenkins/workspace/onnxruntime-openxl/onnxruntime/build/Linux/RelWithDebInfo/_deps/nlohmann_json-src/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


CMake Warning in CMakeLists.txt:
  CMAKE_SKIP_INSTALL_RULES was enabled even though installation rules have
  been specified

Urgency

Not urgent.

Target platform

Power PC. AIX(OS)

Build script

AIX build steps. https://onnxruntime.ai/docs/build/inferencing.html

Error / output

Mentioned in description.

Visual Studio Version

No response

GCC / Compiler Version

No response

@ranjitshs ranjitshs added the build build issues; typically submitted using template label Jan 28, 2025
@ranjitshs
Copy link
Contributor Author

@snnn @tianleiwu
FYI.
is it okay to update json package dependencies ?

@snnn
Copy link
Member

snnn commented Jan 28, 2025

What is the error? And what's your cmake version?

@snnn
Copy link
Member

snnn commented Jan 28, 2025

We are using 3.10.5. The latest one is 3.11.3. Would it solve the problem?

@tianleiwu
Copy link
Contributor

I think it is fine to upgrade to 3.11.3. In its release note (https://github.com/nlohmann/json/releases/tag/v3.11.3), it mentioned it in bug fixes.

@ranjitshs
Copy link
Contributor Author

ranjitshs commented Jan 29, 2025

@snnn @tianleiwu
Yes. 3.11.3 is working fine with the latest cmake main branch.
The steps I used to hit the error is like below.

  • First build latest cmake main branch
  • Using the built cmake , try to build onnxruntime.

By using the below changes, it's looking good.

diff --git a/cmake/deps.txt b/cmake/deps.txt
index c73d9a4e35..593136b2e5 100644
--- a/cmake/deps.txt
+++ b/cmake/deps.txt
@@ -30,7 +30,7 @@ google_benchmark;https://github.com/google/benchmark/archive/refs/tags/v1.8.5.zi
 googletest;https://github.com/google/googletest/archive/refs/tags/v1.15.0.zip;9d2d0af8d77ac726ea55d44a8fa727ec98311349
 #xnnpack 2024.09.04
 googlexnnpack;https://github.com/google/XNNPACK/archive/fe98e0b93565382648129271381c14d6205255e3.zip;14f61dcf17cec2cde34ba2dcf61d6f24bf6059f3
-json;https://github.com/nlohmann/json/archive/refs/tags/v3.10.5.zip;f257f8dc27c5b8c085dc887b40cddd18ae1f725c
+json;https://github.com/nlohmann/json/archive/refs/tags/v3.11.3.zip;5e88795165cc8590138d1f47ce94ee567b85b4d6

How deps.txt is updated ?
is it okay to raise PR with above change ? Any other consideration for updating deps.txt ?

@snnn
Copy link
Member

snnn commented Jan 29, 2025

I will make a PR.

@snnn
Copy link
Member

snnn commented Feb 5, 2025

It looks like ONNX Runtime extension https://github.com/microsoft/onnxruntime-extensions does not work with this new json version.

I got the following error message:

  In file included from /mnt/vss/_work/1/b/wasm_inferencing/Debug/_deps/extensions-src/operators/tokenizer/bpe_kernels.cc:10:
  /mnt/vss/_work/1/b/wasm_inferencing/Debug/_deps/extensions-src/operators/tokenizer/tokenizer_jsconfig.hpp:109:22: error: no viable overloaded '='
    109 |         vocab_stream = std::make_unique<std::istringstream>(vocab_str);
        |         ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /mnt/vss/_work/1/s/cmake/external/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__memory/unique_ptr.h:206:67: note: candidate function not viable: no known conversion from 'unique_ptr<std::basic_istringstream<char>, default_delete<std::basic_istringstream<char>>>' to 'unique_ptr<std::istream, default_delete<std::istream>>' for 1st argument
    206 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(unique_ptr&& __u) _NOEXCEPT {
        |                                                                   ^         ~~~~~~~~~~~~~~~~
  /mnt/vss/_work/1/s/cmake/external/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__memory/unique_ptr.h:216:67: note: candidate template ignored: requirement 'is_convertible<std::basic_istringstream<char, std::char_traits<char>, std::allocator<char>> *, std::istream *>::value' was not satisfied [with _Up = std::basic_istringstream<char>, _Ep = std::default_delete<std::basic_istringstream<char>>]
    216 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT {
        |                                                                   ^
  /mnt/vss/_work/1/s/cmake/external/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__memory/unique_ptr.h:238:67: note: candidate function not viable: no known conversion from 'typename __unique_if<basic_istringstream<char>>::__unique_single' (aka 'unique_ptr<std::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>>') to 'nullptr_t' (aka 'std::nullptr_t') for 1st argument
    238 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(nullptr_t) _NOEXCEPT {
        |                                                                   ^         ~~~~~~~~~
  /mnt/vss/_work/1/s/cmake/external/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__memory/unique_ptr.h:124:59: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'unique_ptr<std::basic_istringstream<char>, default_delete<std::basic_istringstream<char>>>' to 'const unique_ptr<std::istream, default_delete<std::istream>>' for 1st argument
    124 | class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {
        |                                                           ^~~~~~~~~~
  In file included from /mnt/vss/_work/1/b/wasm_inferencing/Debug/_deps/extensions-src/operators/tokenizer/bpe_kernels.cc:10:
  /mnt/vss/_work/1/b/wasm_inferencing/Debug/_deps/extensions-src/operators/tokenizer/tokenizer_jsconfig.hpp:115:22: error: no viable overloaded '='
    115 |         vocab_stream = std::make_unique<std::istringstream>(vocab_str);

https://dev.azure.com/onnxruntime/onnxruntime/_build/results?buildId=1607173&view=logs&j=990616d7-1f75-5fe5-5c67-c84a39482fba&t=67a495a8-8444-507d-6780-4eb1ddef3707&l=3045

@wenbingl , could you please help take a look?

@wenbingl
Copy link
Member

wenbingl commented Feb 6, 2025

It looks like ONNX Runtime extension https://github.com/microsoft/onnxruntime-extensions does not work with this new json version.

I got the following error message:

  In file included from /mnt/vss/_work/1/b/wasm_inferencing/Debug/_deps/extensions-src/operators/tokenizer/bpe_kernels.cc:10:
  /mnt/vss/_work/1/b/wasm_inferencing/Debug/_deps/extensions-src/operators/tokenizer/tokenizer_jsconfig.hpp:109:22: error: no viable overloaded '='
    109 |         vocab_stream = std::make_unique<std::istringstream>(vocab_str);
        |         ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /mnt/vss/_work/1/s/cmake/external/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__memory/unique_ptr.h:206:67: note: candidate function not viable: no known conversion from 'unique_ptr<std::basic_istringstream<char>, default_delete<std::basic_istringstream<char>>>' to 'unique_ptr<std::istream, default_delete<std::istream>>' for 1st argument
    206 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(unique_ptr&& __u) _NOEXCEPT {
        |                                                                   ^         ~~~~~~~~~~~~~~~~
  /mnt/vss/_work/1/s/cmake/external/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__memory/unique_ptr.h:216:67: note: candidate template ignored: requirement 'is_convertible<std::basic_istringstream<char, std::char_traits<char>, std::allocator<char>> *, std::istream *>::value' was not satisfied [with _Up = std::basic_istringstream<char>, _Ep = std::default_delete<std::basic_istringstream<char>>]
    216 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT {
        |                                                                   ^
  /mnt/vss/_work/1/s/cmake/external/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__memory/unique_ptr.h:238:67: note: candidate function not viable: no known conversion from 'typename __unique_if<basic_istringstream<char>>::__unique_single' (aka 'unique_ptr<std::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>>') to 'nullptr_t' (aka 'std::nullptr_t') for 1st argument
    238 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(nullptr_t) _NOEXCEPT {
        |                                                                   ^         ~~~~~~~~~
  /mnt/vss/_work/1/s/cmake/external/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__memory/unique_ptr.h:124:59: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'unique_ptr<std::basic_istringstream<char>, default_delete<std::basic_istringstream<char>>>' to 'const unique_ptr<std::istream, default_delete<std::istream>>' for 1st argument
    124 | class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {
        |                                                           ^~~~~~~~~~
  In file included from /mnt/vss/_work/1/b/wasm_inferencing/Debug/_deps/extensions-src/operators/tokenizer/bpe_kernels.cc:10:
  /mnt/vss/_work/1/b/wasm_inferencing/Debug/_deps/extensions-src/operators/tokenizer/tokenizer_jsconfig.hpp:115:22: error: no viable overloaded '='
    115 |         vocab_stream = std::make_unique<std::istringstream>(vocab_str);

https://dev.azure.com/onnxruntime/onnxruntime/_build/results?buildId=1607173&view=logs&j=990616d7-1f75-5fe5-5c67-c84a39482fba&t=67a495a8-8444-507d-6780-4eb1ddef3707&l=3045

@wenbingl , could you please help take a look?

microsoft/onnxruntime-extensions#885

@snnn snnn closed this as completed in 9ba5619 Feb 10, 2025
ashrit-ms pushed a commit that referenced this issue Feb 11, 2025
### Description
Update pybind and json to the latest. 

### Motivation and Context
Resolve #23512
guschmue pushed a commit that referenced this issue Mar 6, 2025
### Description
Update pybind and json to the latest. 

### Motivation and Context
Resolve #23512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build issues; typically submitted using template
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants