onnxruntime icon indicating copy to clipboard operation
onnxruntime copied to clipboard

[Build] build python wheel fails

Open DaniAffCH opened this issue 1 year ago • 1 comments

Describe the issue

Building the wheel from source fails on Ubuntu 22, but it builds successfully when using the tagged release v1.18.0.

Urgency

No response

Target platform

linux-x86_64

Build script

./build.sh --config Debug --enable_pybind --build_wheel --build_shared_lib

Error / output

error: no matching function for call to ‘pybind11::dtype::dtype(NPY_TYPES)’
  173 |   py::array result(py::dtype(NPY_OBJECT), tensor.Shape().GetDims());

[...]
: error: no matching function for call to ‘pybind11::dtype::dtype(const int&)’
  197 |   pybind11::array result(py::dtype(numpy_type), tensor.Shape().GetDims(),
[...]
/home/daniaffch/Desktop/gsoc/onnxruntime/onnxruntime/python/onnxruntime_pybind_state.cc:197:36: error: invalid conversion from ‘int’ to ‘const char*’ [-fpermissive]
  197 |   pybind11::array result(py::dtype(numpy_type), tensor.Shape().GetDims(),

Visual Studio Version

No response

GCC / Compiler Version

11.4.0

DaniAffCH avatar Jun 22 '24 21:06 DaniAffCH

@DaniAffCH, It seems to be related to numpy version. Could you try different numpy version (1.26 vs 2.0) with main branch as well?

tianleiwu avatar Jun 25 '24 17:06 tianleiwu

@tianleiwu thank you for the support. I tried both versions of numpy but the same issue persists.

DaniAffCH avatar Jul 06 '24 09:07 DaniAffCH

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

github-actions[bot] avatar Aug 05 '24 15:08 github-actions[bot]

@tianleiwu thank you for the support. I tried both versions of numpy but the same issue persists.

@DaniAffCH Hello, I was wondering if you solved this issue? I met the same issue,

LeehanLee avatar Jul 25 '25 06:07 LeehanLee

Applying stale label due to no activity in 30 days

Applying stale label due to no activity in 30 days

Closing issue due to no activity in 30 days