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 gcc14 cannot compile scikit-learn #28530

Closed
hswong3i opened this issue Feb 25, 2024 · 16 comments
Closed

BUILD gcc14 cannot compile scikit-learn #28530

hswong3i opened this issue Feb 25, 2024 · 16 comments
Labels
Bug Build / CI Needs Reproducible Code Issue requires reproducible code

Comments

@hswong3i
Copy link

hswong3i commented Feb 25, 2024

Describe the bug

When building 1.3.2+ with Fedora Rawhide at OBS, it is now failed with below error message (see https://build.opensuse.org/package/live_build_log/home:alvistack/scikit-learn-scikit-learn-1.4.1+post1/Fedora_Rawhide/x86_64):

running build_ext
building 'sklearn.metrics._dist_metrics' extension
gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -fPIC -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -I/usr/local/lib64/python3.12/site-packages/numpy/core/include -I/usr/include/python3.12 -c sklearn/metrics/_dist_metrics.c -o build/temp.linux-x86_64-cpython-312/sklearn/metrics/_dist_metrics.o -g0 -O2 -fopenmp
sklearn/metrics/_dist_metrics.c: In function ‘__pyx_pf_7sklearn_7metrics_13_dist_metrics_16DistanceMetric64_22_pairwise_sparse_dense’:
sklearn/metrics/_dist_metrics.c:29086:29: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
29086 |             __pyx_v_x2_data = ((&(*((__pyx_t_7sklearn_5utils_9_typedefs_float64_t const  *) ( /* dim=1 */ ((char *) (((__pyx_t_7sklearn_5utils_9_typedefs_float64_t const  *) ( /* dim=0 */ (__pyx_v_Y_data.data + __pyx_t_18 * __pyx_v_Y_data.strides[0]) )) + __pyx_t_19)) )))) + (__pyx_v_i2 * __pyx_v_n_features));
      |                             ^
sklearn/metrics/_dist_metrics.c: In function ‘__pyx_pf_7sklearn_7metrics_13_dist_metrics_16DistanceMetric64_24_pairwise_dense_sparse’:
sklearn/metrics/_dist_metrics.c:29871:27: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
29871 |           __pyx_v_x1_data = ((&(*((__pyx_t_7sklearn_5utils_9_typedefs_float64_t const  *) ( /* dim=1 */ ((char *) (((__pyx_t_7sklearn_5utils_9_typedefs_float64_t const  *) ( /* dim=0 */ (__pyx_v_X_data.data + __pyx_t_15 * __pyx_v_X_data.strides[0]) )) + __pyx_t_16)) )))) + (__pyx_v_i1 * __pyx_v_n_features));
      |                           ^
sklearn/metrics/_dist_metrics.c: In function ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_19EuclideanDistance64_dist_csr’:
sklearn/metrics/_dist_metrics.c:31532:90: error: passing argument 1 of ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_19EuclideanDistance64_rdist_csr’ from incompatible pointer type [-Wincompatible-pointer-types]
31532 |   __pyx_t_1 = __pyx_f_7sklearn_7metrics_13_dist_metrics_19EuclideanDistance64_rdist_csr(((struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *)__pyx_v_self), __pyx_v_x1_data, __pyx_v_x1_indices, __pyx_v_x2_data, __pyx_v_x2_indices, __pyx_v_x1_start, __pyx_v_x1_end, __pyx_v_x2_start, __pyx_v_x2_end, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7sklearn_5utils_9_typedefs_float64_t)-1.0))) __PYX_ERR(1, 1077, __pyx_L1_error)
      |                                                                                         ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                          |
      |                                                                                          struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *
sklearn/metrics/_dist_metrics.c:31165:213: note: expected ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_EuclideanDistance64 *’ but argument is of type ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *’
31165 | csr(CYTHON_UNUSED struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_EuclideanDistance64 *__pyx_v_self, __pyx_t_7sklearn_5utils_9_typedefs_float64_t const *__pyx_v_x1_data, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const *__pyx_v_x1_indices, __pyx_t_7sklearn_5utils_9_typedefs_float64_t const *__pyx_v_x2_data, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const *__pyx_v_x2_indices, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x1_start, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x1_end, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x2_start, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x2_end, CYTHON_UNUSED __pyx_t_7sklearn_5utils_9_typedefs_intp_t const __pyx_v_size) {
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

sklearn/metrics/_dist_metrics.c: In function ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_20SEuclideanDistance64_dist’:
sklearn/metrics/_dist_metrics.c:32037:87: error: passing argument 1 of ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_20SEuclideanDistance64_rdist’ from incompatible pointer type [-Wincompatible-pointer-types]
32037 |   __pyx_t_1 = __pyx_f_7sklearn_7metrics_13_dist_metrics_20SEuclideanDistance64_rdist(((struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *)__pyx_v_self), __pyx_v_x1, __pyx_v_x2, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7sklearn_5utils_9_typedefs_float64_t)-1.0))) __PYX_ERR(1, 1126, __pyx_L1_error)
      |                                                                                      ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                       |
      |                                                                                       struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *
sklearn/metrics/_dist_metrics.c:31938:197: note: expected ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_SEuclideanDistance64 *’ but argument is of type ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *’
31938 | Distance64_rdist(struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_SEuclideanDistance64 *__pyx_v_self, __pyx_t_7sklearn_5utils_9_typedefs_float64_t const *__pyx_v_x1, __pyx_t_7sklearn_5utils_9_typedefs_float64_t const *__pyx_v_x2, __pyx_t_7sklearn_5utils_9_typedefs_intp_t __pyx_v_size) {
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

sklearn/metrics/_dist_metrics.c: In function ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_20SEuclideanDistance64_dist_csr’:
sklearn/metrics/_dist_metrics.c:32852:91: error: passing argument 1 of ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_20SEuclideanDistance64_rdist_csr’ from incompatible pointer type [-Wincompatible-pointer-types]
32852 |   __pyx_t_1 = __pyx_f_7sklearn_7metrics_13_dist_metrics_20SEuclideanDistance64_rdist_csr(((struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *)__pyx_v_self), __pyx_v_x1_data, __pyx_v_x1_indices, __pyx_v_x2_data, __pyx_v_x2_indices, __pyx_v_x1_start, __pyx_v_x1_end, __pyx_v_x2_start, __pyx_v_x2_end, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7sklearn_5utils_9_typedefs_float64_t)-1.0))) __PYX_ERR(1, 1206, __pyx_L1_error)
      |                                                                                          ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                           |
      |                                                                                           struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *
sklearn/metrics/_dist_metrics.c:32461:201: note: expected ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_SEuclideanDistance64 *’ but argument is of type ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *’
32461 | ance64_rdist_csr(struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_SEuclideanDistance64 *__pyx_v_self, __pyx_t_7sklearn_5utils_9_typedefs_float64_t const *__pyx_v_x1_data, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const *__pyx_v_x1_indices, __pyx_t_7sklearn_5utils_9_typedefs_float64_t const *__pyx_v_x2_data, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const *__pyx_v_x2_indices, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x1_start, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x1_end, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x2_start, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x2_end, CYTHON_UNUSED __pyx_t_7sklearn_5utils_9_typedefs_intp_t const __pyx_v_size) {
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

sklearn/metrics/_dist_metrics.c: In function ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_19MinkowskiDistance64_dist’:
sklearn/metrics/_dist_metrics.c:34594:86: error: passing argument 1 of ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_19MinkowskiDistance64_rdist’ from incompatible pointer type [-Wincompatible-pointer-types]
34594 |   __pyx_t_1 = __pyx_f_7sklearn_7metrics_13_dist_metrics_19MinkowskiDistance64_rdist(((struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *)__pyx_v_self), __pyx_v_x1, __pyx_v_x2, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7sklearn_5utils_9_typedefs_float64_t)-1.0))) __PYX_ERR(1, 1457, __pyx_L1_error)
      |                                                                                     ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                      |
      |                                                                                      struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *
sklearn/metrics/_dist_metrics.c:34451:195: note: expected ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_MinkowskiDistance64 *’ but argument is of type ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *’
34451 | iDistance64_rdist(struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_MinkowskiDistance64 *__pyx_v_self, __pyx_t_7sklearn_5utils_9_typedefs_float64_t const *__pyx_v_x1, __pyx_t_7sklearn_5utils_9_typedefs_float64_t const *__pyx_v_x2, __pyx_t_7sklearn_5utils_9_typedefs_intp_t __pyx_v_size) {
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

sklearn/metrics/_dist_metrics.c: In function ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_19MinkowskiDistance64_dist_csr’:
sklearn/metrics/_dist_metrics.c:35609:90: error: passing argument 1 of ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_19MinkowskiDistance64_rdist_csr’ from incompatible pointer type [-Wincompatible-pointer-types]
35609 |   __pyx_t_1 = __pyx_f_7sklearn_7metrics_13_dist_metrics_19MinkowskiDistance64_rdist_csr(((struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *)__pyx_v_self), __pyx_v_x1_data, __pyx_v_x1_indices, __pyx_v_x2_data, __pyx_v_x2_indices, __pyx_v_x1_start, __pyx_v_x1_end, __pyx_v_x2_start, __pyx_v_x2_end, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7sklearn_5utils_9_typedefs_float64_t)-1.0))) __PYX_ERR(1, 1564, __pyx_L1_error)
      |                                                                                         ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                          |
      |                                                                                          struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *
sklearn/metrics/_dist_metrics.c:34998:199: note: expected ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_MinkowskiDistance64 *’ but argument is of type ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *’
34998 | tance64_rdist_csr(struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_MinkowskiDistance64 *__pyx_v_self, __pyx_t_7sklearn_5utils_9_typedefs_float64_t const *__pyx_v_x1_data, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const *__pyx_v_x1_indices, __pyx_t_7sklearn_5utils_9_typedefs_float64_t const *__pyx_v_x2_data, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const *__pyx_v_x2_indices, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x1_start, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x1_end, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x2_start, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x2_end, CYTHON_UNUSED __pyx_t_7sklearn_5utils_9_typedefs_intp_t const __pyx_v_size) {
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

sklearn/metrics/_dist_metrics.c: In function ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_21MahalanobisDistance64_dist’:
sklearn/metrics/_dist_metrics.c:36611:88: error: passing argument 1 of ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_21MahalanobisDistance64_rdist’ from incompatible pointer type [-Wincompatible-pointer-types]
36611 |   __pyx_t_1 = __pyx_f_7sklearn_7metrics_13_dist_metrics_21MahalanobisDistance64_rdist(((struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *)__pyx_v_self), __pyx_v_x1, __pyx_v_x2, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7sklearn_5utils_9_typedefs_float64_t)-1.0))) __PYX_ERR(1, 1649, __pyx_L1_error)
      |                                                                                       ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                        |
      |                                                                                        struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *
sklearn/metrics/_dist_metrics.c:36458:199: note: expected ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_MahalanobisDistance64 *’ but argument is of type ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *’
36458 | istance64_rdist(struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_MahalanobisDistance64 *__pyx_v_self, __pyx_t_7sklearn_5utils_9_typedefs_float64_t const *__pyx_v_x1, __pyx_t_7sklearn_5utils_9_typedefs_float64_t const *__pyx_v_x2, __pyx_t_7sklearn_5utils_9_typedefs_intp_t __pyx_v_size) {
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

sklearn/metrics/_dist_metrics.c: In function ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_21MahalanobisDistance64_dist_csr’:
sklearn/metrics/_dist_metrics.c:37439:92: error: passing argument 1 of ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_21MahalanobisDistance64_rdist_csr’ from incompatible pointer type [-Wincompatible-pointer-types]
37439 |  __pyx_t_1 = __pyx_f_7sklearn_7metrics_13_dist_metrics_21MahalanobisDistance64_rdist_csr(((struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *)__pyx_v_self), __pyx_v_x1_data, __pyx_v_x1_indices, __pyx_v_x2_data, __pyx_v_x2_indices, __pyx_v_x1_start, __pyx_v_x1_end, __pyx_v_x2_start, __pyx_v_x2_end, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7sklearn_5utils_9_typedefs_float64_t)-1.0))) __PYX_ERR(1, 1730, __pyx_L1_error)
      |                                                                                          ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                           |
      |                                                                                           struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *

sklearn/metrics/_dist_metrics.c:37035:203: note: expected ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_MahalanobisDistance64 *’ but argument is of type ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *’
37035 | nce64_rdist_csr(struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_MahalanobisDistance64 *__pyx_v_self, __pyx_t_7sklearn_5utils_9_typedefs_float64_t const *__pyx_v_x1_data, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const *__pyx_v_x1_indices, __pyx_t_7sklearn_5utils_9_typedefs_float64_t const *__pyx_v_x2_data, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const *__pyx_v_x2_indices, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x1_start, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x1_end, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x2_start, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x2_end, __pyx_t_7sklearn_5utils_9_typedefs_intp_t const __pyx_v_size) {
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

sklearn/metrics/_dist_metrics.c: In function ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_19HaversineDistance64_dist’:
sklearn/metrics/_dist_metrics.c:42467:86: error: passing argument 1 of ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_19HaversineDistance64_rdist’ from incompatible pointer type [-Wincompatible-pointer-types]
42467 |   __pyx_t_1 = __pyx_f_7sklearn_7metrics_13_dist_metrics_19HaversineDistance64_rdist(((struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *)__pyx_v_self), __pyx_v_x1, __pyx_v_x2, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7sklearn_5utils_9_typedefs_float64_t)-1.0))) __PYX_ERR(1, 2635, __pyx_L1_error)
      |                                                                                     ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                      |
      |                                                                                      struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *
sklearn/metrics/_dist_metrics.c:42396:209: note: expected ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_HaversineDistance64 *’ but argument is of type ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *’
42396 | ist(CYTHON_UNUSED struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_HaversineDistance64 *__pyx_v_self, __pyx_t_7sklearn_5utils_9_typedefs_float64_t const *__pyx_v_x1, __pyx_t_7sklearn_5utils_9_typedefs_float64_t const *__pyx_v_x2, CYTHON_UNUSED __pyx_t_7sklearn_5utils_9_typedefs_intp_t __pyx_v_size) {
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

sklearn/metrics/_dist_metrics.c: In function ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_19HaversineDistance64_dist_csr’:
sklearn/metrics/_dist_metrics.c:43002:90: error: passing argument 1 of ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_19HaversineDistance64_rdist_csr’ from incompatible pointer type [-Wincompatible-pointer-types]
43002 |   __pyx_t_1 = __pyx_f_7sklearn_7metrics_13_dist_metrics_19HaversineDistance64_rdist_csr(((struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *)__pyx_v_self), __pyx_v_x1_data, __pyx_v_x1_indices, __pyx_v_x2_data, __pyx_v_x2_indices, __pyx_v_x1_start, __pyx_v_x1_end, __pyx_v_x2_start, __pyx_v_x2_end, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7sklearn_5utils_9_typedefs_float64_t)-1.0))) __PYX_ERR(1, 2663, __pyx_L1_error)
      |                                                                                         ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                          |
      |                                                                                          struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *
sklearn/metrics/_dist_metrics.c:4493:213: note: expected ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_HaversineDistance64 *’ but argument is of type ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric64 *’
 4493 | csr(CYTHON_UNUSED struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_HaversineDistance64 *__pyx_v_self, __pyx_t_7sklearn_5utils_9_typedefs_float64_t const *__pyx_v_x1_data, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const *__pyx_v_x1_indices, __pyx_t_7sklearn_5utils_9_typedefs_float64_t const *__pyx_v_x2_data, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const *__pyx_v_x2_indices, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x1_start, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x1_end, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x2_start, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x2_end, CYTHON_UNUSED __pyx_t_7sklearn_5utils_9_typedefs_intp_t const __pyx_v_size); /* proto*/
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

sklearn/metrics/_dist_metrics.c: In function ‘__pyx_pf_7sklearn_7metrics_13_dist_metrics_16DistanceMetric32_22_pairwise_sparse_dense’:
sklearn/metrics/_dist_metrics.c:48708:29: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
48708 |             __pyx_v_x2_data = ((&(*((__pyx_t_7sklearn_5utils_9_typedefs_float32_t const  *) ( /* dim=1 */ ((char *) (((__pyx_t_7sklearn_5utils_9_typedefs_float32_t const  *) ( /* dim=0 */ (__pyx_v_Y_data.data + __pyx_t_18 * __pyx_v_Y_data.strides[0]) )) + __pyx_t_19)) )))) + (__pyx_v_i2 * __pyx_v_n_features));
      |                             ^
sklearn/metrics/_dist_metrics.c: In function ‘__pyx_pf_7sklearn_7metrics_13_dist_metrics_16DistanceMetric32_24_pairwise_dense_sparse’:
sklearn/metrics/_dist_metrics.c:49493:27: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
49493 |           __pyx_v_x1_data = ((&(*((__pyx_t_7sklearn_5utils_9_typedefs_float32_t const  *) ( /* dim=1 */ ((char *) (((__pyx_t_7sklearn_5utils_9_typedefs_float32_t const  *) ( /* dim=0 */ (__pyx_v_X_data.data + __pyx_t_15 * __pyx_v_X_data.strides[0]) )) + __pyx_t_16)) )))) + (__pyx_v_i1 * __pyx_v_n_features));
      |                           ^
sklearn/metrics/_dist_metrics.c: In function ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_19EuclideanDistance32_dist_csr’:
sklearn/metrics/_dist_metrics.c:51154:90: error: passing argument 1 of ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_19EuclideanDistance32_rdist_csr’ from incompatible pointer type [-Wincompatible-pointer-types]
51154 |   __pyx_t_1 = __pyx_f_7sklearn_7metrics_13_dist_metrics_19EuclideanDistance32_rdist_csr(((struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *)__pyx_v_self), __pyx_v_x1_data, __pyx_v_x1_indices, __pyx_v_x2_data, __pyx_v_x2_indices, __pyx_v_x1_start, __pyx_v_x1_end, __pyx_v_x2_start, __pyx_v_x2_end, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7sklearn_5utils_9_typedefs_float32_t)-1.0))) __PYX_ERR(1, 3657, __pyx_L1_error)
      |                                                                                         ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                          |
      |                                                                                          struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *
sklearn/metrics/_dist_metrics.c:50787:213: note: expected ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_EuclideanDistance32 *’ but argument is of type ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *’
50787 | csr(CYTHON_UNUSED struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_EuclideanDistance32 *__pyx_v_self, __pyx_t_7sklearn_5utils_9_typedefs_float32_t const *__pyx_v_x1_data, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const *__pyx_v_x1_indices, __pyx_t_7sklearn_5utils_9_typedefs_float32_t const *__pyx_v_x2_data, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const *__pyx_v_x2_indices, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x1_start, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x1_end, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x2_start, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x2_end, CYTHON_UNUSED __pyx_t_7sklearn_5utils_9_typedefs_intp_t const __pyx_v_size) {
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

sklearn/metrics/_dist_metrics.c: In function ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_20SEuclideanDistance32_dist’:
sklearn/metrics/_dist_metrics.c:51659:87: error: passing argument 1 of ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_20SEuclideanDistance32_rdist’ from incompatible pointer type [-Wincompatible-pointer-types]
51659 |   __pyx_t_1 = __pyx_f_7sklearn_7metrics_13_dist_metrics_20SEuclideanDistance32_rdist(((struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *)__pyx_v_self), __pyx_v_x1, __pyx_v_x2, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7sklearn_5utils_9_typedefs_float32_t)-1.0))) __PYX_ERR(1, 3706, __pyx_L1_error)
      |                                                                                      ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                       |
      |                                                                                       struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *
sklearn/metrics/_dist_metrics.c:51560:197: note: expected ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_SEuclideanDistance32 *’ but argument is of type ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *’
51560 | Distance32_rdist(struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_SEuclideanDistance32 *__pyx_v_self, __pyx_t_7sklearn_5utils_9_typedefs_float32_t const *__pyx_v_x1, __pyx_t_7sklearn_5utils_9_typedefs_float32_t const *__pyx_v_x2, __pyx_t_7sklearn_5utils_9_typedefs_intp_t __pyx_v_size) {
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

sklearn/metrics/_dist_metrics.c: In function ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_20SEuclideanDistance32_dist_csr’:
sklearn/metrics/_dist_metrics.c:52474:91: error: passing argument 1 of ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_20SEuclideanDistance32_rdist_csr’ from incompatible pointer type [-Wincompatible-pointer-types]
52474 |   __pyx_t_1 = __pyx_f_7sklearn_7metrics_13_dist_metrics_20SEuclideanDistance32_rdist_csr(((struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *)__pyx_v_self), __pyx_v_x1_data, __pyx_v_x1_indices, __pyx_v_x2_data, __pyx_v_x2_indices, __pyx_v_x1_start, __pyx_v_x1_end, __pyx_v_x2_start, __pyx_v_x2_end, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7sklearn_5utils_9_typedefs_float32_t)-1.0))) __PYX_ERR(1, 3786, __pyx_L1_error)
      |                                                                                          ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                           |
      |                                                                                           struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *
sklearn/metrics/_dist_metrics.c:52083:201: note: expected ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_SEuclideanDistance32 *’ but argument is of type ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *’
52083 | ance32_rdist_csr(struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_SEuclideanDistance32 *__pyx_v_self, __pyx_t_7sklearn_5utils_9_typedefs_float32_t const *__pyx_v_x1_data, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const *__pyx_v_x1_indices, __pyx_t_7sklearn_5utils_9_typedefs_float32_t const *__pyx_v_x2_data, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const *__pyx_v_x2_indices, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x1_start, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x1_end, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x2_start, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x2_end, CYTHON_UNUSED __pyx_t_7sklearn_5utils_9_typedefs_intp_t const __pyx_v_size) {
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

sklearn/metrics/_dist_metrics.c: In function ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_19MinkowskiDistance32_dist’:
sklearn/metrics/_dist_metrics.c:54216:86: error: passing argument 1 of ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_19MinkowskiDistance32_rdist’ from incompatible pointer type [-Wincompatible-pointer-types]
54216 |   __pyx_t_1 = __pyx_f_7sklearn_7metrics_13_dist_metrics_19MinkowskiDistance32_rdist(((struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *)__pyx_v_self), __pyx_v_x1, __pyx_v_x2, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7sklearn_5utils_9_typedefs_float32_t)-1.0))) __PYX_ERR(1, 4037, __pyx_L1_error)
      |                                                                                     ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                      |
      |                                                                                      struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *
sklearn/metrics/_dist_metrics.c:54073:195: note: expected ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_MinkowskiDistance32 *’ but argument is of type ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *’
54073 | iDistance32_rdist(struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_MinkowskiDistance32 *__pyx_v_self, __pyx_t_7sklearn_5utils_9_typedefs_float32_t const *__pyx_v_x1, __pyx_t_7sklearn_5utils_9_typedefs_float32_t const *__pyx_v_x2, __pyx_t_7sklearn_5utils_9_typedefs_intp_t __pyx_v_size) {
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

sklearn/metrics/_dist_metrics.c: In function ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_19MinkowskiDistance32_dist_csr’:
sklearn/metrics/_dist_metrics.c:55231:90: error: passing argument 1 of ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_19MinkowskiDistance32_rdist_csr’ from incompatible pointer type [-Wincompatible-pointer-types]
55231 |   __pyx_t_1 = __pyx_f_7sklearn_7metrics_13_dist_metrics_19MinkowskiDistance32_rdist_csr(((struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *)__pyx_v_self), __pyx_v_x1_data, __pyx_v_x1_indices, __pyx_v_x2_data, __pyx_v_x2_indices, __pyx_v_x1_start, __pyx_v_x1_end, __pyx_v_x2_start, __pyx_v_x2_end, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7sklearn_5utils_9_typedefs_float32_t)-1.0))) __PYX_ERR(1, 4144, __pyx_L1_error)
      |                                                                                         ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                          |
      |                                                                                          struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *
sklearn/metrics/_dist_metrics.c:54620:199: note: expected ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_MinkowskiDistance32 *’ but argument is of type ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *’
54620 | tance32_rdist_csr(struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_MinkowskiDistance32 *__pyx_v_self, __pyx_t_7sklearn_5utils_9_typedefs_float32_t const *__pyx_v_x1_data, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const *__pyx_v_x1_indices, __pyx_t_7sklearn_5utils_9_typedefs_float32_t const *__pyx_v_x2_data, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const *__pyx_v_x2_indices, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x1_start, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x1_end, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x2_start, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x2_end, CYTHON_UNUSED __pyx_t_7sklearn_5utils_9_typedefs_intp_t const __pyx_v_size) {
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

sklearn/metrics/_dist_metrics.c: In function ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_21MahalanobisDistance32_dist’:
sklearn/metrics/_dist_metrics.c:56233:88: error: passing argument 1 of ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_21MahalanobisDistance32_rdist’ from incompatible pointer type [-Wincompatible-pointer-types]
56233 |   __pyx_t_1 = __pyx_f_7sklearn_7metrics_13_dist_metrics_21MahalanobisDistance32_rdist(((struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *)__pyx_v_self), __pyx_v_x1, __pyx_v_x2, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7sklearn_5utils_9_typedefs_float32_t)-1.0))) __PYX_ERR(1, 4229, __pyx_L1_error)
      |                                                                                       ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                        |
      |                                                                                        struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *
sklearn/metrics/_dist_metrics.c:56080:199: note: expected ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_MahalanobisDistance32 *’ but argument is of type ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *’
56080 | istance32_rdist(struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_MahalanobisDistance32 *__pyx_v_self, __pyx_t_7sklearn_5utils_9_typedefs_float32_t const *__pyx_v_x1, __pyx_t_7sklearn_5utils_9_typedefs_float32_t const *__pyx_v_x2, __pyx_t_7sklearn_5utils_9_typedefs_intp_t __pyx_v_size) {
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

sklearn/metrics/_dist_metrics.c: In function ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_21MahalanobisDistance32_dist_csr’:
sklearn/metrics/_dist_metrics.c:57061:92: error: passing argument 1 of ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_21MahalanobisDistance32_rdist_csr’ from incompatible pointer type [-Wincompatible-pointer-types]
57061 |  __pyx_t_1 = __pyx_f_7sklearn_7metrics_13_dist_metrics_21MahalanobisDistance32_rdist_csr(((struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *)__pyx_v_self), __pyx_v_x1_data, __pyx_v_x1_indices, __pyx_v_x2_data, __pyx_v_x2_indices, __pyx_v_x1_start, __pyx_v_x1_end, __pyx_v_x2_start, __pyx_v_x2_end, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7sklearn_5utils_9_typedefs_float32_t)-1.0))) __PYX_ERR(1, 4310, __pyx_L1_error)
      |                                                                                          ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                           |
      |                                                                                           struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *

sklearn/metrics/_dist_metrics.c:56657:203: note: expected ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_MahalanobisDistance32 *’ but argument is of type ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *’
56657 | nce32_rdist_csr(struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_MahalanobisDistance32 *__pyx_v_self, __pyx_t_7sklearn_5utils_9_typedefs_float32_t const *__pyx_v_x1_data, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const *__pyx_v_x1_indices, __pyx_t_7sklearn_5utils_9_typedefs_float32_t const *__pyx_v_x2_data, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const *__pyx_v_x2_indices, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x1_start, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x1_end, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x2_start, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x2_end, __pyx_t_7sklearn_5utils_9_typedefs_intp_t const __pyx_v_size) {
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

sklearn/metrics/_dist_metrics.c: In function ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_19HaversineDistance32_dist’:
sklearn/metrics/_dist_metrics.c:62089:86: error: passing argument 1 of ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_19HaversineDistance32_rdist’ from incompatible pointer type [-Wincompatible-pointer-types]
62089 |   __pyx_t_1 = __pyx_f_7sklearn_7metrics_13_dist_metrics_19HaversineDistance32_rdist(((struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *)__pyx_v_self), __pyx_v_x1, __pyx_v_x2, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7sklearn_5utils_9_typedefs_float32_t)-1.0))) __PYX_ERR(1, 5215, __pyx_L1_error)
      |                                                                                     ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                      |
      |                                                                                      struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *
sklearn/metrics/_dist_metrics.c:62018:209: note: expected ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_HaversineDistance32 *’ but argument is of type ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *’
62018 | ist(CYTHON_UNUSED struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_HaversineDistance32 *__pyx_v_self, __pyx_t_7sklearn_5utils_9_typedefs_float32_t const *__pyx_v_x1, __pyx_t_7sklearn_5utils_9_typedefs_float32_t const *__pyx_v_x2, CYTHON_UNUSED __pyx_t_7sklearn_5utils_9_typedefs_intp_t __pyx_v_size) {
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

sklearn/metrics/_dist_metrics.c: In function ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_19HaversineDistance32_dist_csr’:
sklearn/metrics/_dist_metrics.c:62624:90: error: passing argument 1 of ‘__pyx_f_7sklearn_7metrics_13_dist_metrics_19HaversineDistance32_rdist_csr’ from incompatible pointer type [-Wincompatible-pointer-types]
62624 |   __pyx_t_1 = __pyx_f_7sklearn_7metrics_13_dist_metrics_19HaversineDistance32_rdist_csr(((struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *)__pyx_v_self), __pyx_v_x1_data, __pyx_v_x1_indices, __pyx_v_x2_data, __pyx_v_x2_indices, __pyx_v_x1_start, __pyx_v_x1_end, __pyx_v_x2_start, __pyx_v_x2_end, __pyx_v_size); if (unlikely(__pyx_t_1 == ((__pyx_t_7sklearn_5utils_9_typedefs_float32_t)-1.0))) __PYX_ERR(1, 5243, __pyx_L1_error)
      |                                                                                         ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                          |
      |                                                                                          struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *
sklearn/metrics/_dist_metrics.c:4561:213: note: expected ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_HaversineDistance32 *’ but argument is of type ‘struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_DistanceMetric32 *’
 4561 | csr(CYTHON_UNUSED struct __pyx_obj_7sklearn_7metrics_13_dist_metrics_HaversineDistance32 *__pyx_v_self, __pyx_t_7sklearn_5utils_9_typedefs_float32_t const *__pyx_v_x1_data, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const *__pyx_v_x1_indices, __pyx_t_7sklearn_5utils_9_typedefs_float32_t const *__pyx_v_x2_data, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const *__pyx_v_x2_indices, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x1_start, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x1_end, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x2_start, __pyx_t_7sklearn_5utils_9_typedefs_int32_t const __pyx_v_x2_end, CYTHON_UNUSED __pyx_t_7sklearn_5utils_9_typedefs_intp_t const __pyx_v_size); /* proto*/
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

error: command '/usr/bin/gcc' failed with exit code 1

Steps/Code to Reproduce

sudo -E podman run -ti --rm fedora:rawhide
yum update -y
yum install -y git gcc gcc-c++ python3-devel python3-pip python3-setuptools python3-wheel python3-Cython python3-numpy python3-scipy python3-joblib python3-threadpoolctl
git clone https://github.com/scikit-learn/scikit-learn.git
cd scikit-learn
git checkout 1.4.1.post1
python3 setup.py build

Fixes (see #28530 (comment)):

sudo -E podman run -ti --rm fedora:rawhide
yum update -y
yum install -y git gcc gcc-c++ python3-devel python3-pip python3-setuptools python3-wheel python3-Cython python3-numpy python3-scipy python3-joblib python3-threadpoolctl
git clone https://github.com/scikit-learn/scikit-learn.git
cd scikit-learn
git checkout main
find sklearn/metrics/_dist_metrics.pyx.tp -type f | xargs sed -i 's/cdef inline {{INPUT_DTYPE_t}} rdist/cdef {{INPUT_DTYPE_t}} rdist/g'
python3 setup.py build

Expected Results

Build successful.

Actual Results

As shown above.

Versions

1.4.1.post1
@hswong3i hswong3i added Bug Needs Triage Issue requires triage labels Feb 25, 2024
@adrinjalali
Copy link
Member

Not sure if relevant, but we now require cython=3.0.8 as minimum version. Otherwise I'm not sure.

Can you reproduce with a conda/mamba environment and give us the lock file?

@adrinjalali adrinjalali added Needs Reproducible Code Issue requires reproducible code and removed Needs Triage Issue requires triage labels Feb 26, 2024
@hswong3i
Copy link
Author

hswong3i commented Feb 26, 2024

Not sure if relevant, but we now require cython=3.0.8 as minimum version. Otherwise I'm not sure.

Fedora Rawhide python3-cython already with 3.0.8, see https://fedora.pkgs.org/rawhide/fedora-x86_64/python3-cython-3.0.8-1.fc40.x86_64.rpm.html

P.S. They just update Python3 to 3.12.2, see https://fedora.pkgs.org/rawhide/fedora-x86_64/python3-devel-3.12.2-1.fc40.x86_64.rpm.html

P.P.S. They also update GCC to 14.0.1, see https://fedora.pkgs.org/rawhide/fedora-x86_64/gcc-14.0.1-0.7.fc41.x86_64.rpm.html

[root@1cb73b6a89b4 /]# cython --version
Cython version 3.0.8

[root@1cb73b6a89b4 /]# python3 --version
Python 3.12.2

[root@1cb73b6a89b4 /]# gcc --version
gcc (GCC) 14.0.1 20240217 (Red Hat 14.0.1-0)
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[root@1cb73b6a89b4 /]# pip list installed
Package            Version
------------------ --------
appdirs            1.4.4
argcomplete        3.2.2
charset-normalizer 3.3.2
click              8.1.7
cloudpickle        3.0.0
Cython             3.0.8
dnf                4.19.0
idna               3.6
joblib             1.3.2
libcomps           0.1.20
libdnf             0.73.0
lz4                4.3.3
numpy              1.26.2
packaging          23.2
pip                23.3.2
pipx               1.4.3
platformdirs       3.11.0
pooch              1.5.2
psutil             5.9.8
PySocks            1.7.1
requests           2.31.0
rpm                4.19.1.1
SciPy              1.11.3
setuptools         69.0.3
threadpoolctl      3.3.0
urllib3            1.26.18
userpath           1.9.1
wheel              0.41.2

@adrinjalali
Copy link
Member

@lesteve would you know maybe?

@sergiopasra
Copy link
Contributor

I was about to report the same problem.

This is related with cython/cython#2747

This problem was mentioned in a bug open to keep track of the effort to remove all compilation warnings #24875 (search "Incompatible pointers types casts")

With gcc < 14 the code compiles with incompatible-pointer warning. But with gcc 14 that warning is an error.

Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=2261602

@adrinjalali
Copy link
Member

adrinjalali commented Feb 26, 2024

I see. GCC=14 hasn't landed on conda-forge yet, and not even on archlinux. So it's gonna be fun to fix.

@hswong3i
Copy link
Author

hswong3i commented Feb 26, 2024

How about temporarily passing -Wno-error=incompatible-pointer-types for now as https://wiki.gentoo.org/wiki/Modern_C_porting#-Wincompatible-pointer-types suggested?

Any hints for passing this to Cython to GCC, from our existing setup.py? I could give a try locally and let's test it?

Also see gentoo/gentoo@786a157

hswong3i added a commit to alvistack/scikit-learn-scikit-learn that referenced this issue Feb 26, 2024
    git clean -xdf
    git submodule sync
    git submodule update --init
    tar zcvf ../python-scikit-learn_1.4.1+post1.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp python-scikit-learn.spec ../python-scikit-learn_1.4.1+post1-1.spec
    cp ../python*-scikit-learn*1.4.1+post1*.{gz,xz,spec,dsc} /osc/home\:alvistack/scikit-learn-scikit-learn-1.4.1+post1/
    rm -rf ../python*-scikit-learn*1.4.1+post1*.* ../python*-sklearn*1.4.1+post1*.*

See scikit-learn#28530

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
hswong3i added a commit to alvistack/scikit-learn-scikit-learn that referenced this issue Feb 26, 2024
    git clean -xdf
    git submodule sync
    git submodule update --init
    tar zcvf ../python-scikit-learn_1.4.0.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp python-scikit-learn.spec ../python-scikit-learn_1.4.0-1.spec
    cp ../python*-scikit-learn*1.4.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/scikit-learn-scikit-learn-1.4.0/
    rm -rf ../python*-scikit-learn*1.4.0*.* ../python*-sklearn*1.4.0*.*

See scikit-learn#28530

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
hswong3i added a commit to alvistack/scikit-learn-scikit-learn that referenced this issue Feb 26, 2024
    git clean -xdf
    git submodule sync
    git submodule update --init
    tar zcvf ../python-scikit-learn_1.4.0.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp python-scikit-learn.spec ../python-scikit-learn_1.4.0-1.spec
    cp ../python*-scikit-learn*1.4.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/scikit-learn-scikit-learn-1.4.0/
    rm -rf ../python*-scikit-learn*1.4.0*.* ../python*-sklearn*1.4.0*.*

See scikit-learn#28530

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
hswong3i added a commit to alvistack/scikit-learn-scikit-learn that referenced this issue Feb 26, 2024
    git clean -xdf
    git submodule sync
    git submodule update --init
    tar zcvf ../python-scikit-learn_1.3.2.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp python-scikit-learn.spec ../python-scikit-learn_1.3.2-1.spec
    cp ../python*-scikit-learn*1.3.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/scikit-learn-scikit-learn-1.3.2/
    rm -rf ../python*-scikit-learn*1.3.2*.* ../python*-sklearn*1.3.2*.*

See scikit-learn#28530

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
hswong3i added a commit to alvistack/scikit-learn-scikit-learn that referenced this issue Feb 26, 2024
    git clean -xdf
    git submodule sync
    git submodule update --init
    tar zcvf ../python-scikit-learn_1.3.2.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp python-scikit-learn.spec ../python-scikit-learn_1.3.2-1.spec
    cp ../python*-scikit-learn*1.3.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/scikit-learn-scikit-learn-1.3.2/
    rm -rf ../python*-scikit-learn*1.3.2*.* ../python*-sklearn*1.3.2*.*

See scikit-learn#28530

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
hswong3i added a commit to alvistack/scikit-learn-scikit-learn that referenced this issue Feb 26, 2024
    git clean -xdf
    git submodule sync
    git submodule update --init
    tar zcvf ../python-scikit-learn_0.24.2.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp python-scikit-learn.spec ../python-scikit-learn_0.24.2-1.spec
    cp ../python*-scikit-learn*0.24.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/scikit-learn-scikit-learn-0.24.2/
    rm -rf ../python*-scikit-learn*0.24.2*.* ../python*-sklearn*0.24.2*.*

See scikit-learn#28530

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
@adrinjalali
Copy link
Member

@Micky774 @jjerphan would the fix (as opposed to ignoring the warning) be quick you think?

@jjerphan
Copy link
Member

jjerphan commented Feb 26, 2024

Hi,

Thank you for reporting this problem.

I think that this kind of warning (or error as of gcc 14) is inherent to Cython's implementation of class polymorphism and method dispatch.

For now, I recommend deactivating the warning and pursuing the discussion on cython/cython#2747.

@jjerphan jjerphan changed the title sklearn/metrics/_dist_metrics.c:31532:90: error: passing argument 1 of __pyx_f_7sklearn_7metrics_13_dist_metrics_19EuclideanDistance64_rdist_csr from incompatible pointer type [-Wincompatible-pointer-types] BUILD gcc14 cannot compile scikit-learn Feb 26, 2024
@sergiopasra
Copy link
Contributor

sergiopasra commented Feb 26, 2024

A posible workaround is to remove the inline in the definition of the rdist_csr and rdistmembers.

cdef inline {{INPUT_DTYPE_t}} rdist_csr(

With that change, cython generates correct code (I don't know why). But removing the inline can impact the performance.

@Micky774
Copy link
Contributor

IIRC we can also replace self.rdist(..) with <FinalClass>.rdist(self, ...) and manually ensure proper types are passed. I can't verify this as a solution right now, but may be able to take a look at it later. This should be quick to test.

@jjerphan
Copy link
Member

@sergiopasra : I think your proposal would be the best approach on the long-term if Cython is this used since it is unlikely that those methods are effectively inlined. Could you open a PR?

hswong3i added a commit to alvistack/scikit-learn-scikit-learn that referenced this issue Feb 27, 2024
    git clean -xdf
    git submodule sync
    git submodule update --init
    tar zcvf ../python-scikit-learn_0.24.2.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp python-scikit-learn.spec ../python-scikit-learn_0.24.2-1.spec
    cp ../python*-scikit-learn*0.24.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/scikit-learn-scikit-learn-0.24.2/
    rm -rf ../python*-scikit-learn*0.24.2*.* ../python*-sklearn*0.24.2*.*

See scikit-learn#28530

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
hswong3i added a commit to alvistack/scikit-learn-scikit-learn that referenced this issue Feb 27, 2024
    git clean -xdf
    git submodule sync
    git submodule update --init
    tar zcvf ../python-scikit-learn_1.4.1.post1.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp python-scikit-learn.spec ../python-scikit-learn_1.4.1.post1-1.spec
    cp ../python*-scikit-learn*1.4.1.post1*.{gz,xz,spec,dsc} /osc/home\:alvistack/scikit-learn-scikit-learn-1.4.1.post1/
    rm -rf ../python*-scikit-learn*1.4.1.post1*.* ../python*-sklearn*1.4.1.post1*.*

See scikit-learn#28530

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
@hswong3i
Copy link
Author

At least I could confirm that adding following lines making Fedora Rawhide working fine (see alvistack@75f6060#diff-d7bb055047e0934d04bfd2ce3f3be1476f609cebd726cc347fd87ba11d799b62R52-R54):

%build
export CFLAGS="%{optflags} -fno-strict-aliasing -Wno-error=incompatible-pointer-types"
%py3_build

hswong3i added a commit to alvistack/scikit-learn-scikit-learn that referenced this issue Feb 27, 2024
This is related with cython/cython#2747

This problem was mentioned in a bug open to keep track of the effort to remove all compilation warnings scikit-learn#24875 (search "Incompatible pointers types casts")

With gcc < 14 the code compiles with incompatible-pointer warning. But with gcc 14 that warning is an error.

Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=2261602

A posible workaround is to remove the inline in the definition of the rdist_csr and rdistmembers.

With that change, cython generates correct code (I don't know why). But removing the inline can impact the performance.

Fixes scikit-learn#28530

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
@hswong3i
Copy link
Author

A posible workaround is to remove the inline in the definition of the rdist_csr and rdistmembers.

@sergiopasra confirm this suggestion working fine:

sudo -E podman run -ti --rm fedora:rawhide
yum update -y
yum install -y git gcc gcc-c++ python3-devel python3-pip python3-setuptools python3-wheel python3-Cython python3-numpy python3-scipy python3-joblib python3-threadpoolctl
git clone https://github.com/scikit-learn/scikit-learn.git
cd scikit-learn
git checkout main
find sklearn/metrics/_dist_metrics.pyx.tp -type f | xargs sed -i 's/cdef inline {{INPUT_DTYPE_t}} rdist/cdef {{INPUT_DTYPE_t}} rdist/g'
python3 setup.py build

PR opened as #28541

@ogrisel
Copy link
Member

ogrisel commented Mar 20, 2024

I followed the "Steps/Code to Reproduce" to build with GCC 14 (on aarch64) and Cython 3.0.9 and I can no longer reproduce, which seems to confirms what @da-woods announced in #28541 (comment).

@sergiopasra do you confirm we can close this issue alongside with #28541?

@ogrisel
Copy link
Member

ogrisel commented Mar 22, 2024

Closing, feel free to reopen if you still experience the problem.

@ogrisel ogrisel closed this as completed Mar 22, 2024
@jjerphan
Copy link
Member

This must have been properly fixed by cython/cython#6085 which will feature in Cython 3.0.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Build / CI Needs Reproducible Code Issue requires reproducible code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants