elephaint / pgbm

Probabilistic Gradient Boosting Machines
Apache License 2.0
143 stars 20 forks source link

Fix install from source in gcc12 (noexcept) #24

Closed kevindarby closed 1 year ago

kevindarby commented 1 year ago

Fix noexcept error in gcc12 env

[7/8] Cythonizing pgbm/sklearn/splitting.pyx

Error compiling Cython file:

... if n_used_bins <= 1: free(cat_infos) return

    qsort(cat_infos, n_used_bins, sizeof(categorical_info),
          compare_cat_infos)
          ^

pgbm/sklearn/splitting.pyx:1089:14: Cannot assign type 'int (const void , const void ) except? -1 nogil' to 'int ()(const void , const void *) noexcept nogil'

Error compiling Cython file:

... if n_used_bins <= 1: free(cat_infos) return

    qsort(cat_infos, n_used_bins, sizeof(categorical_info),
          compare_cat_infos)
          ^