Open hteeyeoh opened 11 months ago
opencv-python==4.6.0.66
There is no way to amend already released code (>1 year ago). Try to upgrade and verify the latest release.
note: 'std::uintptr_t' is defined in header ''; did you forget to '#include '?
Looks like compiler is broken in your build environment. Correct message should look like:
note: ‘uintptr_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
@opencv-alalek erm this one i tried in python 3.11-alpine based image.. it failed because of imcompatible of alpine version. Hence i tried to downgrade to python3.10-alpine image. Then it was working all the way until recently bumped into issue. I tried to install the unstructured[pdf] python module and underlying it install opencv. I do saw it download the latest version but due to pip runtime backtracing issue it will still downloading the old version to find the most suitable to match across all the dependencies. Hence i bumped to this problem and stuck.
For environment, i think im using the same system env which previously working. and since im working on docker images and i think those things will be independent as stated in Dockerfile.
While this is the numpy issue i saw when using python3.11-alpine as base image: ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11
Expected behaviour Successfully install opencv-python as usual in python:3.10-alpine image as usual
Actual behaviour Compilation failed
Steps to reproduce pip install opencv-python in python:3.10 alpine image
opencv-python = opencv-python==4.6.0.66 62.48 ninja: job failed: /usr/bin/c++ -I/tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ippicv/ippicv_lnx/icv/include -I/tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ippicv/ippicv_lnx/iw/include -I/tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ade/ade-0.1.1f/sources/ade/include -isystem /tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -std=c++11 -fPIC -MD -MT CMakeFiles/ade.dir/3rdparty/ade/ade-0.1.1f/sources/ade/source/topological_sort.cpp.o -MF CMakeFiles/ade.dir/3rdparty/ade/ade-0.1.1f/sources/ade/source/topological_sort.cpp.o.d -o CMakeFiles/ade.dir/3rdparty/ade/ade-0.1.1f/sources/ade/source/topological_sort.cpp.o -c /tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ade/ade-0.1.1f/sources/ade/source/topological_sort.cpp 62.48 In file included from /tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ade/ade-0.1.1f/sources/ade/include/ade/passes/topological_sort.hpp:17, 62.48 from /tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ade/ade-0.1.1f/sources/ade/source/topological_sort.cpp:7: 62.48 /tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ade/ade-0.1.1f/sources/ade/include/ade/typed_graph.hpp:101:10: error: 'uintptr_t' in namespace 'std' does not name a type 62.48 101 | std::uintptr_t m_srcGraph; 62.48 | ^(m_srcGraph);
62.48 | ^ > >, ade::Graph::HandleMapper>]'
62.48 /tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ade/ade-0.1.1f/sources/ade/source/topological_sort.cpp:39:40: required from here
62.48 /tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ade/ade-0.1.1f/sources/ade/include/ade/typed_graph.hpp:167:53: error: 'const class ade::TypedGraphade::passes::TopologicalSortData' has no member named 'm_srcGraph'
62.48 167 | return reinterpret_castade::Graph*(this->m_srcGraph);
62.48 |
~~~~ 62.48 /tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ade/ade-0.1.1f/sources/ade/include/ade/typed_graph.hpp:22:1: note: 'std::uintptr_t' is defined in header ''; did you forget to '#include '? 62.48 21 | #include "typed_metadata.hpp" 62.48 +++ |+#include 62.48 22 | 62.48 /tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ade/ade-0.1.1f/sources/ade/include/ade/typed_graph.hpp: In member function 'const ade::Graph& ade::ConstTypedGraph::getCGraph() const': 62.48 /tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ade/ade-0.1.1f/sources/ade/include/ade/typed_graph.hpp:106:53: error: 'm_srcGraph' was not declared in this scope 62.48 106 | return reinterpret_cast~~~~~ 62.48 /tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ade/ade-0.1.1f/sources/ade/include/ade/typed_graph.hpp: In constructor 'ade::ConstTypedGraph::ConstTypedGraph(const ade::Graph&)': 62.48 /tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ade/ade-0.1.1f/sources/ade/include/ade/typed_graph.hpp:122:9: error: class 'ade::ConstTypedGraph' does not have any field named 'm_srcGraph' 62.48 122 | m_srcGraph(reinterpret_caststd::uintptr_t(&graph)) 62.48 | ^~~~~~ 62.48 /tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ade/ade-0.1.1f/sources/ade/include/ade/typed_graph.hpp:122:42: error: 'uintptr_t' in namespace 'std' does not name a type 62.48 122 | m_srcGraph(reinterpret_caststd::uintptr_t(&graph)) 62.48 | ^~~~~ 62.48 /tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ade/ade-0.1.1f/sources/ade/include/ade/typed_graph.hpp:122:37: note: 'std::uintptr_t' is defined in header ''; did you forget to '#include '? 62.48 122 | m_srcGraph(reinterpret_caststd::uintptr_t(&graph)) 62.48 | ^~~ 62.48 /tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ade/ade-0.1.1f/sources/ade/include/ade/typed_graph.hpp: In constructor 'ade::ConstTypedGraph::ConstTypedGraph(const ade::ConstTypedGraph<OtherTypes ...>&)': 62.48 /tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ade/ade-0.1.1f/sources/ade/include/ade/typed_graph.hpp:130:9: error: class 'ade::ConstTypedGraph' does not have any field named 'm_srcGraph' 62.48 130 | m_srcGraph(other.m_srcGraph) 62.48 | ^~~~~~ 62.48 /tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ade/ade-0.1.1f/sources/ade/include/ade/typed_graph.hpp: In instantiation of 'ade::Graph& ade::TypedGraph::getGraph() const [with Types = {ade::passes::TopologicalSortData}]': 62.48 /tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ade/ade-0.1.1f/sources/ade/include/ade/typed_graph.hpp:238:16: required from 'ade::Graph::NodesListRange ade::TypedGraph::nodes() [with Types = {ade::passes::TopologicalSortData}; ade::Graph::NodesListRange = ade::util::Range::MapRange<ade::util::Range::IterRange<__gnu_cxx::__normal_iterator<std::shared_ptrade::Node, std::vector~~^~~~~~ 62.48 Note: Class cv::Feature2D has more than 1 base class (not supported by Python C extensions) 62.48 Bases: cv::Algorithm, cv::class, cv::Feature2D, cv::Algorithm 62.48 Only the first base class will be used 62.48 Note: Class cv::detail::GraphCutSeamFinder has more than 1 base class (not supported by Python C extensions) 62.48 Bases: cv::detail::GraphCutSeamFinderBase, cv::detail::SeamFinder 62.48 Only the first base class will be used 62.48 ninja: subcommand failed 62.48 Traceback (most recent call last): 62.48 File "/tmp/pip-build-env-z3sx64lf/overlay/lib/python3.10/site-packages/skbuild/setuptools_wrap.py", line 674, in setup 62.48 cmkr.make(make_args, install_target=cmake_install_target, env=env) 62.48 File "/tmp/pip-build-env-z3sx64lf/overlay/lib/python3.10/site-packages/skbuild/cmaker.py", line 697, in make 62.48 self.make_impl(clargs=clargs, config=config, source_dir=source_dir, install_target=install_target, env=env) 62.48 File "/tmp/pip-build-env-z3sx64lf/overlay/lib/python3.10/site-packages/skbuild/cmaker.py", line 742, in make_impl 62.48 raise SKBuildError(msg) 62.48 62.48 An error occurred while building with CMake. 62.48 Command: 62.48 /tmp/pip-build-env-z3sx64lf/overlay/lib/python3.10/site-packages/cmake/data/bin/cmake --build . --target install --config Release -- 62.48 Install target: 62.48 install 62.48 Source directory: 62.48 /tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a 62.48 Working directory: 62.48 /tmp/pip-install-ikpi2bfw/opencv-python_cd41126da3fb445da2c1bce7c2f69c2a/_skbuild/linux-x86_64-3.10/cmake-build 62.48 Please check the install target is valid and see CMake's output for more information. 62.48 62.48 [end of output] 62.48 62.48 note: This error originates from a subprocess, and is likely not a problem with pip. 62.48 ERROR: Failed building wheel for opencv-python 62.48 Successfully built unstructured-inference 62.48 Failed to build opencv-python 62.48 ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projectsIs it something newly added in the ade source that cause something broken? tmp/pip-install-tltrnbg7/opencv-python_218517a01db34d7aa0d9c09d5f167498/_skbuild/linux-x86_64-3.10/cmake-build/3rdparty/ade/ade-0.1.1f/sources/ade/include/ade/typed_graph.hpp:22:1: note: 'std::uintptr_t' is defined in header ''; did you forget to '#include '? 412.4 21 | #include "typed_metadata.hpp" 412.4 +++ |+#include 412.4 22 |