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

unit_thread_pool.cc: add forgotten <random> include #4690

Merged
merged 4 commits into from
Feb 1, 2024

Conversation

barracuda156
Copy link
Contributor

@barracuda156 barracuda156 commented Jan 31, 2024

At least when building with gcc this source needs to include <random>, otherwise it fails to compile.


TYPE: NO_HISTORY
DESC: Add a missing include into unit_thread_pool.cc

@barracuda156
Copy link
Contributor Author

[ 53%] Building CXX object tiledb/common/thread_pool/test/CMakeFiles/unit_thread_pool.dir/unit_thread_pool.cc.o
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/tiledb/common/thread_pool/test/unit_thread_pool.cc:53:26: error: 'mt19937_64' in namespace 'std' does not name a type
   53 | thread_local static std::mt19937_64 generator;
      |                          ^~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/tiledb/common/thread_pool/test/unit_thread_pool.cc: In lambda function:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/tiledb/common/thread_pool/test/unit_thread_pool.cc:61:17: error: 'random_device' in namespace 'std' does not name a type
   61 |     static std::random_device rd;
      |                 ^~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/tiledb/common/thread_pool/test/unit_thread_pool.cc:62:17: error: 'mt19937' in namespace 'std' does not name a type
   62 |     static std::mt19937 gen(rd());
      |                 ^~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/tiledb/common/thread_pool/test/unit_thread_pool.cc:65:45: error: 'gen' was not declared in this scope; did you mean 'get'?
   65 |     generator_seed = generator_seed_arr[dis(gen)];
      |                                             ^~~
      |                                             get
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/tiledb/common/thread_pool/test/unit_thread_pool.cc: In function 'void set_generator_seed()':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/tiledb/common/thread_pool/test/unit_thread_pool.cc:78:5: error: 'generator' was not declared in this scope
   78 |     generator.seed(local_seed);
      |     ^~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/tiledb/common/thread_pool/test/unit_thread_pool.cc: In function 'std::size_t random_ms(std::size_t)':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/tiledb/common/thread_pool/test/unit_thread_pool.cc:92:23: error: 'generator' was not declared in this scope
   92 |   return distribution(generator);
      |                       ^~~~~~~~~
gmake[7]: *** [tiledb/common/thread_pool/test/CMakeFiles/unit_thread_pool.dir/build.make:90: tiledb/common/thread_pool/test/CMakeFiles/unit_thread_pool.dir/unit_thread_pool.cc.o] Error 1

@barracuda156
Copy link
Contributor Author

Same problem with bench_aggregators by the way:

[ 68%] Building CXX object tiledb/sm/query/readers/aggregators/test/CMakeFiles/unit_aggregators.dir/bench_aggregators.cc.o
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/tiledb/sm/query/readers/aggregators/test/bench_aggregators.cc:55:13: error: 'mt19937_64' in namespace 'std' does not name a type
   55 | static std::mt19937_64 generator;
      |             ^~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/tiledb/sm/query/readers/aggregators/test/bench_aggregators.cc: In lambda function:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/tiledb/sm/query/readers/aggregators/test/bench_aggregators.cc:60:17: error: 'random_device' in namespace 'std' does not name a type
   60 |     static std::random_device rd;
      |                 ^~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/tiledb/sm/query/readers/aggregators/test/bench_aggregators.cc:61:17: error: 'mt19937' in namespace 'std' does not name a type
   61 |     static std::mt19937 gen(rd());
      |                 ^~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/tiledb/sm/query/readers/aggregators/test/bench_aggregators.cc:64:45: error: 'gen' was not declared in this scope; did you mean 'get'?
   64 |     generator_seed = generator_seed_arr[dis(gen)];
      |                                             ^~~
      |                                             get
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/tiledb/sm/query/readers/aggregators/test/bench_aggregators.cc: In function 'T random(std::size_t)':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/tiledb/sm/query/readers/aggregators/test/bench_aggregators.cc:78:38: error: 'generator' was not declared in this scope
   78 |   return static_cast<T>(distribution(generator));
      |                                      ^~~~~~~~~

@barracuda156
Copy link
Contributor Author

And here:

/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc: In member function 'void CPPFixedTileMetadataFx<TestType>::write_fragment(uint64_t, tiledb_layout_t, bool, bool, uint64_t, bool, bool)':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:122:10: error: 'default_random_engine' is not a member of 'std'
  122 |     std::default_random_engine random_engine;
      |          ^~~~~~~~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:182:24: error: 'random_engine' was not declared in this scope
  182 |             val = dist(random_engine);
      |                        ^~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:187:34: error: 'random_engine' was not declared in this scope
  187 |             val = (TestType)dist(random_engine);
      |                                  ^~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:194:24: error: 'random_engine' was not declared in this scope
  194 |             val = dist(random_engine);
      |                        ^~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:199:34: error: 'random_engine' was not declared in this scope
  199 |             val = (TestType)dist(random_engine);
      |                                  ^~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:210:14: error: 'uniform_real_distribution' is not a member of 'std'; did you mean 'uniform_int_distribution'?
  210 |         std::uniform_real_distribution<TestType> dist(-10000, 10000);
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~
      |              uniform_int_distribution
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:210:48: error: expected primary-expression before '>' token
  210 |         std::uniform_real_distribution<TestType> dist(-10000, 10000);
      |                                                ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:210:50: error: there are no arguments to 'dist' that depend on a template parameter, so a declaration of 'dist' must be available [-fpermissive]
  210 |         std::uniform_real_distribution<TestType> dist(-10000, 10000);
      |                                                  ^~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:210:50: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:211:20: error: 'random_engine' was not declared in this scope
  211 |         val = dist(random_engine);
      |                    ^~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:211:15: error: there are no arguments to 'dist' that depend on a template parameter, so a declaration of 'dist' must be available [-fpermissive]
  211 |         val = dist(random_engine);
      |               ^~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc: In member function 'void CPPVarTileMetadataFx::write_fragment(uint64_t, tiledb_layout_t, bool, bool, bool, bool)':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:746:10: error: 'default_random_engine' is not a member of 'std'
  746 |     std::default_random_engine random_engine;
      |          ^~~~~~~~~~~~~~~~~~~~~
In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/../tiledb/sm/query/readers/aggregators/iaggregator.h:40,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/../tiledb/sm/query/query.h:53,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/../tiledb/sm/c_api/tiledb_struct_def.h:46,
                 from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:36:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/../tiledb/sm/query/readers/aggregators/tile_metadata.h: In instantiation of 'T tiledb::sm::TileMetadata::min_as() const [with T = std::basic_string_view<char>]':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:1016:9:   required from here
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/../tiledb/sm/query/readers/aggregators/tile_metadata.h:102:47: warning: narrowing conversion of '(storage_size_t)((const tiledb::sm::TileMetadata*)this)->tiledb::sm::TileMetadata::min_size_' from 'storage_size_t' {aka 'long long unsigned int'} to 'std::basic_string_view<char>::size_type' {aka 'long unsigned int'} [-Wnarrowing]
  102 |       return {static_cast<const char*>(min_), min_size_};
      |                                               ^~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/../tiledb/sm/query/readers/aggregators/tile_metadata.h: In instantiation of 'T tiledb::sm::TileMetadata::max_as() const [with T = std::basic_string_view<char>]':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:1017:9:   required from here
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/../tiledb/sm/query/readers/aggregators/tile_metadata.h:116:47: warning: narrowing conversion of '(storage_size_t)((const tiledb::sm::TileMetadata*)this)->tiledb::sm::TileMetadata::max_size_' from 'storage_size_t' {aka 'long long unsigned int'} to 'std::basic_string_view<char>::size_type' {aka 'long unsigned int'} [-Wnarrowing]
  116 |       return {static_cast<const char*>(max_), max_size_};
      |                                               ^~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc: In instantiation of 'void CPPFixedTileMetadataFx<TestType>::write_fragment(uint64_t, tiledb_layout_t, bool, bool, uint64_t, bool, bool) [with TestType = float; uint64_t = long long unsigned int]':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:685:46:   required from 'void CATCH2_INTERNAL_TEMPLATE_TEST_0<TestType>::test() [with TestType = float]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:652:1:   required from 'void {anonymous}::ns_CATCH2_INTERNAL_TEMPLATE_TEST_0::CATCH2_INTERNAL_TEMPLATE_TEST_1<Types>::reg_tests() [with Types = {std::byte, unsigned char, char, unsigned char, short unsigned int, unsigned int, long long unsigned int, signed char, short int, int, long long int, float, double}]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:652:1:   required from here
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:210:54: error: 'dist' was not declared in this scope
  210 |         std::uniform_real_distribution<TestType> dist(-10000, 10000);
      |                                                  ~~~~^~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:211:33: error: 'dist' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation
  211 |         val = dist(random_engine);
      |                                 ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:210:54: note: 'dist' declared here, later in the translation unit
  210 |         std::uniform_real_distribution<TestType> dist(-10000, 10000);
      |                                                  ~~~~^~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc: In instantiation of 'void CPPFixedTileMetadataFx<TestType>::write_fragment(uint64_t, tiledb_layout_t, bool, bool, uint64_t, bool, bool) [with TestType = double; uint64_t = long long unsigned int]':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:685:46:   required from 'void CATCH2_INTERNAL_TEMPLATE_TEST_0<TestType>::test() [with TestType = double]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:652:1:   required from 'void {anonymous}::ns_CATCH2_INTERNAL_TEMPLATE_TEST_0::CATCH2_INTERNAL_TEMPLATE_TEST_1<Types>::reg_tests() [with Types = {std::byte, unsigned char, char, unsigned char, short unsigned int, unsigned int, long long unsigned int, signed char, short int, int, long long int, float, double}]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:652:1:   required from here
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:210:54: error: 'dist' was not declared in this scope
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:211:33: error: 'dist' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation
  211 |         val = dist(random_engine);
      |                                 ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata.cc:210:54: note: 'dist' declared here, later in the translation unit
  210 |         std::uniform_real_distribution<TestType> dist(-10000, 10000);
      |                                                  ~~~~^~~~~~~~~~~~~~~
gmake[7]: *** [test/CMakeFiles/tiledb_unit.dir/build.make:1182: test/CMakeFiles/tiledb_unit.dir/src/unit-tile-metadata.cc.o] Error 1

@barracuda156
Copy link
Contributor Author

And also:

[ 79%] Building CXX object test/CMakeFiles/tiledb_unit.dir/src/unit-tile-metadata-generator.cc.o
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc: In function 'void CATCH2_INTERNAL_TEMPLATE_TEST_0()':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:61:8: error: 'default_random_engine' is not a member of 'std'
   61 |   std::default_random_engine random_engine;
      |        ^~~~~~~~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:132:22: error: 'random_engine' was not declared in this scope
  132 |           val = dist(random_engine);
      |                      ^~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:137:32: error: 'random_engine' was not declared in this scope
  137 |           val = (TestType)dist(random_engine);
      |                                ^~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:144:22: error: 'random_engine' was not declared in this scope
  144 |           val = dist(random_engine);
      |                      ^~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:149:32: error: 'random_engine' was not declared in this scope
  149 |           val = (TestType)dist(random_engine);
      |                                ^~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:161:12: error: 'uniform_real_distribution' is not a member of 'std'; did you mean 'uniform_int_distribution'?
  161 |       std::uniform_real_distribution<T> dist(-10000, 10000);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
      |            uniform_int_distribution
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:161:39: error: expected primary-expression before '>' token
  161 |       std::uniform_real_distribution<T> dist(-10000, 10000);
      |                                       ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:161:41: error: there are no arguments to 'dist' that depend on a template parameter, so a declaration of 'dist' must be available [-fpermissive]
  161 |       std::uniform_real_distribution<T> dist(-10000, 10000);
      |                                         ^~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:161:41: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:162:18: error: 'random_engine' was not declared in this scope
  162 |       val = dist(random_engine);
      |                  ^~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:162:13: error: there are no arguments to 'dist' that depend on a template parameter, so a declaration of 'dist' must be available [-fpermissive]
  162 |       val = dist(random_engine);
      |             ^~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc: In instantiation of 'void CATCH2_INTERNAL_TEMPLATE_TEST_0() [with TestType = float]':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:57:1:   required from 'void {anonymous}::ns_CATCH2_INTERNAL_TEMPLATE_TEST_1::CATCH2_INTERNAL_TEMPLATE_TEST_1<Types>::reg_tests() [with Types = {std::byte, unsigned char, char, unsigned char, short unsigned int, unsigned int, long long unsigned int, signed char, short int, int, long long int, float, double}]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:57:1:   required from here
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:161:45: error: 'dist' was not declared in this scope
  161 |       std::uniform_real_distribution<T> dist(-10000, 10000);
      |                                         ~~~~^~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:162:31: error: 'dist' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation
  162 |       val = dist(random_engine);
      |                               ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:161:45: note: 'dist' declared here, later in the translation unit
  161 |       std::uniform_real_distribution<T> dist(-10000, 10000);
      |                                         ~~~~^~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc: In instantiation of 'void CATCH2_INTERNAL_TEMPLATE_TEST_0() [with TestType = double]':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:57:1:   required from 'void {anonymous}::ns_CATCH2_INTERNAL_TEMPLATE_TEST_1::CATCH2_INTERNAL_TEMPLATE_TEST_1<Types>::reg_tests() [with Types = {std::byte, unsigned char, char, unsigned char, short unsigned int, unsigned int, long long unsigned int, signed char, short int, int, long long int, float, double}]'
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:57:1:   required from here
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:161:45: error: 'dist' was not declared in this scope
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:162:31: error: 'dist' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation
  162 |       val = dist(random_engine);
      |                               ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-tile-metadata-generator.cc:161:45: note: 'dist' declared here, later in the translation unit
  161 |       std::uniform_real_distribution<T> dist(-10000, 10000);
      |                                         ~~~~^~~~~~~~~~~~~~~
gmake[7]: *** [test/CMakeFiles/tiledb_unit.dir/build.make:1196: test/CMakeFiles/tiledb_unit.dir/src/unit-tile-metadata-generator.cc.o] Error 1

@barracuda156
Copy link
Contributor Author

barracuda156 commented Jan 31, 2024

UPD. The error below due to missing <numeric> has been fixed in the dev branch.

[ 84%] Building CXX object test/CMakeFiles/tiledb_unit.dir/src/unit-cppapi-global-order-writes-remote.cc.o
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-cppapi-global-order-writes-remote.cc: In member function 'void RemoteGlobalOrderWriteFx<T>::write_array()':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-cppapi-global-order-writes-remote.cc:138:12: error: 'iota' is not a member of 'std'
  138 |       std::iota(data.begin(), data.end(), 0);
      |            ^~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-cppapi-global-order-writes-remote.cc:148:14: error: 'iota' is not a member of 'std'
  148 |         std::iota(cols.begin(), cols.end(), cols_start);
      |              ^~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-cppapi-global-order-writes-remote.cc: In member function 'void RemoteGlobalOrderWriteFx<T>::read_array(uint64_t)':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-cppapi-global-order-writes-remote.cc:300:14: error: 'adjacent_difference' is not a member of 'std'; did you mean 'set_difference'?
  300 |         std::adjacent_difference(
      |              ^~~~~~~~~~~~~~~~~~~
      |              set_difference
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-cppapi-global-order-writes-remote.cc: In member function 'void RemoteGlobalOrderWriteFx<T>::make_absolute()':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_tiledb/tiledb/work/TileDB-2.19.1/test/src/unit-cppapi-global-order-writes-remote.cc:346:12: error: 'adjacent_difference' is not a member of 'std'; did you mean 'set_difference'?
  346 |       std::adjacent_difference(it, var_offsets_wrote_.end(), it);
      |            ^~~~~~~~~~~~~~~~~~~
      |            set_difference
gmake[7]: *** [test/CMakeFiles/tiledb_unit.dir/build.make:1700: test/CMakeFiles/tiledb_unit.dir/src/unit-cppapi-global-order-writes-remote.cc.o] Error 1
gmake[6]: *** [CMakeFiles/Makefile2:13880: test/CMakeFiles/tiledb_unit.dir/all] Error 2
gmake[5]: *** [CMakeFiles/Makefile2:13913: test/CMakeFiles/check.dir/rule] Error 2
gmake[4]: *** [Makefile:4300: check] Error 2

This one needs <numeric>: Yishun99/vrp-espprc#1

@barracuda156
Copy link
Contributor Author

@teo-tsirpanis Thank you!

@KiterLuc KiterLuc merged commit 82dc8fe into TileDB-Inc:dev Feb 1, 2024
62 checks passed
@barracuda156 barracuda156 deleted the random branch February 1, 2024 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants