microsoft / microsoft/onnxruntime

[Build] croos compile

Open
#32,064 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

build stale
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 11h
Merged PRs (30d)
184

Description

### Describe the issue

error compile openwrt glibc

### Urgency

_No response_

### Target platform

openwrt

### Build script

CMAKE_OPTIONS += \
-DONNX_BUILD_PYTHON=ON \
-Donnxruntime_BUILD_SHARED_LIB=ON \
-Donnxruntime_BUILD_UNIT_TESTS=OFF \
-Donnxruntime_ENABLE_PYTHON=ON

### Error / output

flatbuffers_utils.cc:203:34: error: unused variable 'dim' [-Werror=unused-variable]

error: ignoring return value of 'bool google::protobuf::MessageLite::SerializeToOstream(std::ostream*) const', declared with attribute 'nodiscard'

### Visual Studio Version

_No response_

### GCC / Compiler Version

gcc 14.3.0
protobuf 35.1
onnxruntime 1.29.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported OpenWrt glibc cross-compilation configuration in the issue and inspect flatbuffers_utils.cc around line 203. Reproduce the build using GCC 14.3.0, protobuf 35.1, and ONNX Runtime 1.29.0, then determine whether the unused-variable and ignored-return-value errors can be addressed without breaking the configured build; done means the build completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.