Skip to content

Build failed: 'numeric_limits' is not a member of 'std' #690

@Catty2014

Description

@Catty2014
platform: Arch Linux
gcc version 12.1.1 20220730 (GCC) 

When buildling package, gcc throws error:

In file included from src/cluster/bsas.cpp:10:
./include/pyclustering/cluster/bsas.hpp:92:44: error: 'numeric_limits' is not a member of 'std'
   92 |         double        m_distance    = std::numeric_limits<double>::max();   /**< Distance between the cluster and a specific point. */
      |                                            ^~~~~~~~~~~~~~
./include/pyclustering/cluster/bsas.hpp:92:59: error: expected primary-expression before 'double'
   92 |         double        m_distance    = std::numeric_limits<double>::max();   /**< Distance between the cluster and a specific point. */
      |                                                           ^~~~~~
make[1]: *** [ccore.mk:154: obj/ccore/64-bit/cluster/bsas.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from ./include/pyclustering/cluster/mbsas.hpp:12,
                 from src/cluster/mbsas.cpp:10:
./include/pyclustering/cluster/bsas.hpp:92:44: error: 'numeric_limits' is not a member of 'std'
   92 |         double        m_distance    = std::numeric_limits<double>::max();   /**< Distance between the cluster and a specific point. */
      |                                            ^~~~~~~~~~~~~~
./include/pyclustering/cluster/bsas.hpp:92:59: error: expected primary-expression before 'double'
   92 |         double        m_distance    = std::numeric_limits<double>::max();   /**< Distance between the cluster and a specific point. */
      |                                                           ^~~~~~
make[1]: *** [ccore.mk:154: obj/ccore/64-bit/cluster/mbsas.o] Error 1
src/cluster/agglomerative.cpp: In member function 'void pyclustering::clst::agglomerative::merge_by_average_link()':
src/cluster/agglomerative.cpp:89:44: error: 'numeric_limits' is not a member of 'std'
   89 |     double minimum_average_distance = std::numeric_limits<double>::max();
      |                                            ^~~~~~~~~~~~~~
src/cluster/agglomerative.cpp:89:59: error: expected primary-expression before 'double'
   89 |     double minimum_average_distance = std::numeric_limits<double>::max();
      |                                                           ^~~~~~
src/cluster/agglomerative.cpp: In member function 'void pyclustering::clst::agglomerative::merge_by_centroid_link()':
src/cluster/agglomerative.cpp:123:44: error: 'numeric_limits' is not a member of 'std'
  123 |     double minimum_average_distance = std::numeric_limits<double>::max();
      |                                            ^~~~~~~~~~~~~~
src/cluster/agglomerative.cpp:123:59: error: expected primary-expression before 'double'
  123 |     double minimum_average_distance = std::numeric_limits<double>::max();
      |                                                           ^~~~~~
src/cluster/agglomerative.cpp: In member function 'void pyclustering::clst::agglomerative::merge_by_complete_link()':
src/cluster/agglomerative.cpp:149:45: error: 'numeric_limits' is not a member of 'std'
  149 |     double minimum_complete_distance = std::numeric_limits<double>::max();
      |                                             ^~~~~~~~~~~~~~
src/cluster/agglomerative.cpp:149:60: error: expected primary-expression before 'double'
  149 |     double minimum_complete_distance = std::numeric_limits<double>::max();
      |                                                            ^~~~~~
src/cluster/agglomerative.cpp: In member function 'void pyclustering::clst::agglomerative::merge_by_signle_link()':
src/cluster/agglomerative.cpp:184:43: error: 'numeric_limits' is not a member of 'std'
  184 |     double minimum_single_distance = std::numeric_limits<double>::max();
      |                                           ^~~~~~~~~~~~~~
src/cluster/agglomerative.cpp:184:58: error: expected primary-expression before 'double'
  184 |     double minimum_single_distance = std::numeric_limits<double>::max();
      |                                                          ^~~~~~
src/cluster/agglomerative.cpp:193:54: error: 'numeric_limits' is not a member of 'std'
  193 |             double candidate_minimum_distance = std::numeric_limits<double>::max();
      |                                                      ^~~~~~~~~~~~~~
src/cluster/agglomerative.cpp:193:69: error: expected primary-expression before 'double'
  193 |             double candidate_minimum_distance = std::numeric_limits<double>::max();
      |                                                                     ^~~~~~
make[1]: *** [ccore.mk:154: obj/ccore/64-bit/cluster/agglomerative.o] Error 1
make[1]: Leaving directory '/tmp/makepkg/python-pyclustering-git/src/pyclustering/ccore'
make: *** [makefile:53: ccore_64bit] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions