Closed InstantWindy closed 2 years ago
It looks like the C++ files required for submodlib were not built successfully.
Can you please try with GCC 5.2 or greater and ensure that the pybind11 version you have satisfies requirements.txt?
I update the version of GCC, then successfully. Thanks.
Installation environment:
Error: ` /tmp/pip-build-env-m7fawz9p/overlay/lib/python3.8/site-packages/pybind11/include/pybind11/numpy.h:1195:51: error: ‘is_pod_struct’ is not a member of ‘pybind11::detail’ /tmp/pip-build-env-m7fawz9p/overlay/lib/python3.8/site-packages/pybind11/include/pybind11/numpy.h:1195:74: error: template argument 1 is invalid struct compare_buffer_info<T, detail::enable_if_t<detail::is_pod_struct::value>> {
^
/tmp/pip-build-env-m7fawz9p/overlay/lib/python3.8/site-packages/pybind11/include/pybind11/numpy.h:1195:77: error: template argument 2 is invalid
struct compare_buffer_info<T, detail::enable_if_t<detail::is_pod_struct::value>> {
^
/tmp/pip-build-env-m7fawz9p/overlay/lib/python3.8/site-packages/pybind11/include/pybind11/numpy.h:1195:82: error: expected unqualified-id before ‘>’ token
struct compare_buffer_info<T, detail::enable_if_t<detail::is_pod_struct::value>> {
^
/tmp/pip-build-env-m7fawz9p/overlay/lib/python3.8/site-packages/pybind11/include/pybind11/numpy.h:1392:19: error: ‘is_pod_struct’ was not declared in this scope
static_assert(is_pod_struct::value,
^
/tmp/pip-build-env-m7fawz9p/overlay/lib/python3.8/site-packages/pybind11/include/pybind11/numpy.h:1392:34: error: expected primary-expression before ‘>’ token
static_assert(is_pod_struct::value,
^
/tmp/pip-build-env-m7fawz9p/overlay/lib/python3.8/site-packages/pybind11/include/pybind11/numpy.h:1392:35: error: ‘::value’ has not been declared
static_assert(is_pod_struct::value,
^
cpp/submod/FacilityLocation2.cpp: In member function ‘void FacilityLocation2::pybind_init(ll, const pybind11::array_t&, bool, const std::unordered_set&, bool)’:
cpp/submod/FacilityLocation2.cpp:77:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t idx = 0; idx < num_rows; idx++) {
^
cpp/submod/FacilityLocation2.cpp:78:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t idy = 0; idy < num_columns; idy++) {
^
In file included from cpp/submod/FacilityLocation2.cpp:10:0:
cpp/submod/FacilityLocation2.h: In constructor ‘FacilityLocation2::FacilityLocation2(ll, const std::vector<std::vector >&, bool, const std::unordered_set&, bool)’:
cpp/submod/FacilityLocation2.h:39:33: warning: ‘FacilityLocation2::denseKernel’ will be initialized after [-Wreorder]
std::vector<std::vector>denseKernel; //size nmaster X n
^
cpp/submod/FacilityLocation2.h:32:7: warning: ‘bool FacilityLocation2::partial’ [-Wreorder]
bool partial; //if masked implementation is desired, relevant to be used in ClusteredFunction
^
cpp/submod/FacilityLocation2.cpp:125:1: warning: when initialized here [-Wreorder]
FacilityLocation2::FacilityLocation2(ll n, std::vector<std::vector> const &denseKernel, bool partial, std::unorderedset const &ground , bool separateMaster): n(n), mode(dense), denseKernel(denseKernel), partial(partial), separateMaster(separateMaster_) {
^
In file included from cpp/submod/FacilityLocation2.cpp:10:0:
cpp/submod/FacilityLocation2.h: In constructor ‘FacilityLocation2::FacilityLocation2(ll, const std::vector<std::unorderedset >&, const std::vector<std::vector<std::vector > >&, const std::vector&)’:
cpp/submod/FacilityLocation2.h:47:17: warning: ‘FacilityLocation2::clusterIndexMap’ will be initialized after [-Wreorder]
std::vectorclusterIndexMap; //mapping from datapont index to index in cluster kernel, size = n
^
In file included from cpp/submod/FacilityLocation2.cpp:10:0:
cpp/submod/FacilityLocation2.h:32:7: warning: ‘bool FacilityLocation2::partial’ [-Wreorder]
bool partial; //if masked implementation is desired, relevant to be used in ClusteredFunction
^
cpp/submod/FacilityLocation2.cpp:228:1: warning: when initialized here [-Wreorder]
FacilityLocation2::FacilityLocation2(ll n , std::vector<std::unorderedset> const &clusters ,std::vector<std::vector<std::vector>> const &clusterKernels, std::vector const &clusterIndexMap ): n(n_), mode(clustered), numclusters(clusters.size()), clusters(clusters), clusterKernels(clusterKernels), clusterIndexMap(clusterIndexMap_), partial(false), separateMaster(false) {
^
In file included from cpp/submod/FacilityLocation2.cpp:10:0:
cpp/submod/FacilityLocation2.h: In copy constructor ‘FacilityLocation2::FacilityLocation2(const FacilityLocation2&)’:
cpp/submod/FacilityLocation2.h:39:33: warning: ‘FacilityLocation2::denseKernel’ will be initialized after [-Wreorder]
std::vector<std::vector>denseKernel; //size n_master X n
^
cpp/submod/FacilityLocation2.h:32:7: warning: ‘bool FacilityLocation2::partial’ [-Wreorder]
bool partial; //if masked implementation is desired, relevant to be used in ClusteredFunction
^
cpp/submod/FacilityLocation2.cpp:268:1: warning: when initialized here [-Wreorder]
FacilityLocation2::FacilityLocation2(const FacilityLocation2& f)
^
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for submodlib Failed to build submodlib ERROR: Could not build wheels for submodlib, which is required to install pyproject.toml-based projects ` So how to tackle it?