Error when building on MacOS arm64-apple-darwin21.6.0
adrianoamaral opened this issue · 1 comments
adrianoamaral commented
The following error when running make on MacOS Monterey v 12.6.3, arm64-apple-darwin21.6.0
(base) user memtier_benchmark % make
/Library/Developer/CommandLineTools/usr/bin/make all-am
CXX memtier_benchmark-memtier_benchmark.o
memtier_benchmark.cpp:1678:13: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
sprintf(average_header,"AGGREGATED AVERAGE RESULTS (%u runs)", cfg.run_count);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
^
1 warning generated.
CXX memtier_benchmark-client.o
CXX memtier_benchmark-cluster_client.o
CXX memtier_benchmark-shard_connection.o
shard_connection.cpp:551:48: error: non-constant-expression cannot be narrowed from type 'long' to '__darwin_suseconds_t' (aka 'int') in initializer list [-Wc++11-narrowing]
struct timeval interval = { 0, (long int)m_config->request_interval_microsecond };
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
shard_connection.cpp:551:48: note: insert an explicit cast to silence this issue
struct timeval interval = { 0, (long int)m_config->request_interval_microsecond };
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
static_cast<__darwin_suseconds_t>( )
1 error generated.
make[1]: *** [memtier_benchmark-shard_connection.o] Error 1
make: *** [all] Error 2
filipecosta90 commented
Confirmed it's happening on our CI, as of last month (given last month was green).
I've retriggered master and we're failing: https://github.com/RedisLabs/memtier_benchmark/actions/runs/7311404064/job/20656671119