$rbenv install 3.1.2
Downloading openssl-1.1.1q.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca
Installing openssl-1.1.1q...
BUILD FAILED (macOS 12.4 using ruby-build 20220710)
Inspect or clean up the working tree at /var/folders/tr/lpqk0__92s3bds2hlb500cf40000gn/T/ruby-build.20220712172414.90364.qfB2fT
Results logged to /var/folders/tr/lpqk0__92s3bds2hlb500cf40000gn/T/ruby-build.20220712172414.90364.log
Last 10 log lines:
clang -Iinclude -arch x86_64 -O3 -Wall -D_REENTRANT -DZLIB -DZLIB_SHARED -DNDEBUG -I/Users/shinjikawaguchi/.rbenv/versions/3.1.2/include -MMD -MF test/verify_extra_test.d.tmp -MT test/verify_extra_test.o -c -o test/verify_extra_test.o test/verify_extra_test.c
clang -Iinclude -arch x86_64 -O3 -Wall -D_REENTRANT -DZLIB -DZLIB_SHARED -DNDEBUG -I/Users/shinjikawaguchi/.rbenv/versions/3.1.2/include -MMD -MF test/versions.d.tmp -MT test/versions.o -c -o test/versions.o test/versions.c
test/v3ext.c:201:24: error: implicitly declaring library function 'memcmp' with type 'int (const void *, const void *, unsigned long)' [-Werror,-Wimplicit-function-declaration]
if (!TEST_true(memcmp(ip1->data, ip2->data, ip1->length) <= 0))
^
test/v3ext.c:201:24: note: include the header <string.h> or explicitly provide a declaration for 'memcmp'
1 error generated.
make[1]: *** [test/v3ext.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2