charlock_holmes icon indicating copy to clipboard operation
charlock_holmes copied to clipboard

Error installing on MacOS 15.1

Open samuelvaneck opened this issue 1 year ago • 11 comments

I'm trying to install version 0.7.9 on MacOS. It seems that since upgrading to MacOS 15.1 i'm getting error. I've tried setting the correct flags like explained in the README but with no luck yet.

Installing in on Linux within a docker container works fine.

This is the begin and end part of the error logs that I'm getting.

/Users/username/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/charlock_holmes-0.7.9/ext/charlock_holmes
/Users/username/.rbenv/versions/3.3.6/bin/ruby extconf.rb --with-icu-dir\=/path/to/installed/icu4c
--with-cxxflags\=-std\=c++11
checking for pkg-config for icu-i18n... ["-I/opt/homebrew/Cellar/icu4c@76/76.1_1/include ",
"-L/opt/homebrew/Cellar/icu4c@76/76.1_1/lib", "-licui18n"]
checking for pkg-config for icu-io... ["-I/opt/homebrew/Cellar/icu4c@76/76.1_1/include ",
"-L/opt/homebrew/Cellar/icu4c@76/76.1_1/lib", "-licuio"]
checking for pkg-config for icu-uc... ["-I/opt/homebrew/Cellar/icu4c@76/76.1_1/include ",
"-L/opt/homebrew/Cellar/icu4c@76/76.1_1/lib", "-licuuc"]
checking for -licui18n... yes
checking for unicode/ucnv.h... yes
checking for -lz... yes
checking for -licuuc... yes
checking for -licudata... yes
checking for icu that requires explicit C++ version flag... yes
checking for icu that compiles with c++20 standard... yes
Static linking is disabled.
creating Makefile

.....

current directory:
/Users/samuelvaneck/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/charlock_holmes-0.7.9/ext/charlock_holmes
make DESTDIR\= sitearchdir\=./.gem.20241123-31238-ug4gdv sitelibdir\=./.gem.20241123-31238-ug4gdv clean

In file included from transliterator.cpp:5:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/unistr.h:37:
/opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/char16ptr.h:316:16: warning: variable templates are a C++14
extension [-Wc++14-extensions]
  316 | constexpr bool ConvertibleToU16StringView =
      |                ^
/opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/char16ptr.h:317:10: error: no template named 'is_convertible_v'
in namespace 'std'; did you mean 'is_convertible'?
  317 |     std::is_convertible_v<T, std::u16string_view>
      |     ~~~~~^~~~~~~~~~~~~~~~
      |          is_convertible
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_convertible.h:28:29:
note: 'is_convertible' declared here
   28 | struct _LIBCPP_TEMPLATE_VIS is_convertible : public integral_constant<bool, __is_convertible(_T1, _T2)> {};
      |                             ^
In file included from transliterator.cpp:5:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/unistr.h:37:
/opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/char16ptr.h:324:5: error: expected '(' for function-style cast
or type construction
  317 |     std::is_convertible_v<T, std::u16string_view>
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  318 | #if !U_CHAR16_IS_TYPEDEF && (!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION < 180000)
  319 |     || std::is_convertible_v<T, std::basic_string_view<uint16_t>>
  320 | #endif
  321 | #if U_SIZEOF_WCHAR_T==2
  322 |     || std::is_convertible_v<T, std::wstring_view>
  323 | #endif
  324 |     ;
      |     ^
/opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/char16ptr.h:360:36: error: no type named 'enable_if_t' in
namespace 'std'
  360 |           typename = typename std::enable_if_t<!std::is_pointer_v<std::remove_reference_t<T>>>>
      |                      ~~~~~~~~~~~~~~^~~~~~~~~~~
/opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/char16ptr.h:360:47: error: expected ',' or '>' in
template-parameter-list
  360 |           typename = typename std::enable_if_t<!std::is_pointer_v<std::remove_reference_t<T>>>>
      |                                               ^
/opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/char16ptr.h:360:93: error: expected unqualified-id
  360 |           typename = typename std::enable_if_t<!std::is_pointer_v<std::remove_reference_t<T>>>>
      |                                                                                             ^
/opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/char16ptr.h:370:36: error: no type named 'enable_if_t' in
namespace 'std'
  370 |           typename = typename std::enable_if_t<std::is_pointer_v<std::remove_reference_t<T>>>,
      |                      ~~~~~~~~~~~~~~^~~~~~~~~~~
/opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/char16ptr.h:370:47: error: expected ',' or '>' in
template-parameter-list
  370 |           typename = typename std::enable_if_t<std::is_pointer_v<std::remove_reference_t<T>>>,
      |                                               ^
/opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/char16ptr.h:370:92: error: expected unqualified-id
  370 |           typename = typename std::enable_if_t<std::is_pointer_v<std::remove_reference_t<T>>>,
      |                                                                                            ^
In file included from transliterator.cpp:5:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/unistr.h:40:
/opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/stringpiece.h:134:29: error: no template named 'enable_if_t' in
namespace 'std'
  134 |             typename = std::enable_if_t<
      |                        ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/stringpiece.h:135:23: error: no template named 'is_same_v' in
namespace 'std'; did you mean 'is_same'?
  135 |                 (std::is_same_v<decltype(T().data()), const char*>
      |                  ~~~~~^~~~~~~~~
      |                       is_same
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_same.h:22:29:
note: 'is_same' declared here
   22 | struct _LIBCPP_TEMPLATE_VIS is_same : _BoolConstant<__is_same(_Tp, _Up)> {};
      |                             ^
In file included from transliterator.cpp:5:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/unistr.h:40:
/opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/stringpiece.h:140:17: error: use of address-of-label extension
outside of a function body
  140 |                 std::is_same_v<decltype(T().size()), size_t>>>
      |                 ^
/opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/stringpiece.h:140:62: error: expected member name or ';' after
declaration specifiers
  140 |                 std::is_same_v<decltype(T().size()), size_t>>>
      |                                                              ^
In file included from transliterator.cpp:5:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/translit.h:27:
/opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/unistr.h:346:40: error: no template named 'enable_if_t' in
namespace 'std'
  346 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/unistr.h:381:40: error: no template named 'enable_if_t' in
namespace 'std'
  381 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/unistr.h:1959:40: error: no template named 'enable_if_t' in
namespace 'std'
 1959 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/unistr.h:2226:40: error: no template named 'enable_if_t' in
namespace 'std'
 2226 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/unistr.h:2299:40: error: no template named 'enable_if_t' in
namespace 'std'
 2299 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/unistr.h:3273:40: error: no template named 'enable_if_t' in
namespace 'std'
 3273 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_1/include/unicode/unistr.h:3599:40: error: no template named 'enable_if_t' in
namespace 'std'
 3599 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
make: *** [Makefile:240: transliterator.o] Error 1

samuelvaneck avatar Nov 23 '24 16:11 samuelvaneck

Same with me on homebrew, rvm and MacOS 15.1.1. Tried all kinds of combinations in the flags for different c++ or icu4c (74, 75, or 76) as well as versions of the gem, but no luck. Am now always met with:

compiling ext.c
compiling transliterator.cpp
make: *** [transliterator.o] Error 1

dshorthouse avatar Nov 30 '24 05:11 dshorthouse

Same with me on homebrew, rvm and MacOS 15.1.1. Tried all kinds of combinations in the flags for different c++ or icu4c (74, 75, or 76) as well as versions of the gem, but no luck. Am now always met with:

compiling ext.c
compiling transliterator.cpp
make: *** [transliterator.o] Error 1

In my case, I rebuilt ruby through rvm and it fixed the issue:

rvm reinstall 3.2.1 --with-openssl-dir=/usr/local/opt/openssl

...where the symlinked version of openssl is [email protected]

dshorthouse avatar Dec 02 '24 14:12 dshorthouse

I was able to solve the issue by installing the gem using the following command

export ICU_PATH="/opt/homebrew/opt/icu4c"
gem install charlock_holmes -- --with-icu-dir="$ICU_PATH" --with-cxxflags="-std=c++17"

samuelvaneck avatar Dec 15 '24 14:12 samuelvaneck

I had trouble installing it on 15.3 (24D60). I tried various solutions, but nothing worked. Ultimately, I found a suggestion to completely remove the Command Line Tools and reinstall them from scratch, which finally solved the issue. Make sure you start fresh—no environment variables, no bundle config for charlock_holmes build, nothing.

Steps to take:

sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install
bundle config --delete build.charlock_holmes
bundle config build.charlock_holmes --with-icu-dir="/opt/homebrew/opt/icu4c" --with-cxxflags="-std=c++17"
bundle

If it's not included in Bundler but you want to install it separately, do it like @samuelvaneck mentioned in the previous message.

gem install charlock_holmes -- --with-icu-dir="/opt/homebrew/opt/icu4c" --with-cxxflags="-std=c++17"

nijikon avatar Feb 06 '25 12:02 nijikon

I had trouble installing it on 15.3 too.

I can install it like that with the global version of ruby set (3.3.x) like that:

sudo gem install charlock_holmes -- --with-icu-dir="/usr/local/Cellar/icu4c" --with-cxxflags="-std=c++17"

Fetching charlock_holmes-0.7.9.gem Building native extensions with: '--with-icu-dir=/usr/local/Cellar/icu4c --with-cxxflags=-std=c++17' This could take a while... Successfully installed charlock_holmes-0.7.9 1 gem installed

However, when I go to my project (local ruby 2.6.x set with rbenv), and type the same thing, i looks like it didn't find GCC !

checking for -licui18n... yes
checking for unicode/ucnv.h... yes
checking for -lz... yes
checking for -licuuc... yes
checking for -licudata... yes
checking for icu that requires explicit C++ version flag... yes
checking for icu that compiles with c++20 standard... no
checking for icu that compiles with c++17 standard... no
checking for icu that compiles with c++11 standard... no
checking for icu that compiles with c++0x standard... no
Cannot compile icu with your compiler: recent versions require C++17 support.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/Users/alex/.rbenv/versions/2.6.3/bin/$(RUBY_BASE_NAME)
	--with-icu-dir
	--with-icu-include
	--without-icu-include=${icu-dir}/include
	--with-icu-lib
	--without-icu-lib=${icu-dir}/lib
	--with-icu-i18n-config
	--without-icu-i18n-config
	--with-pkg-config
	--without-pkg-config
	--with-icu-io-config
	--without-icu-io-config
	--with-icu-uc-config
	--without-icu-uc-config
	--with-icui18nlib
	--without-icui18nlib
	--with-zlib
	--without-zlib
	--with-icuuclib
	--without-icuuclib
	--with-icudatalib
	--without-icudatalib

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Users/alex/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-19/2.6.0/charlock_holmes-0.7.9/mkmf.log

I have tried so many things since yesterday... I reinstalled dev tools too.

abournier avatar Apr 04 '25 08:04 abournier

I got multiple compilation errors when installing charlock_holmes v0.7.9 with Ruby 2.7.8.

Install comand:

gem install charlock_holmes  -- --with-icu-dir=/opt/homebrew/opt/icu4c@76 --with-cxxflags="-std=c++17"

(It didn't work with icu4c@77 and c++11 as well.)

Logs:

"pkg-config --exists icu-i18n"
| pkg-config --libs icu-i18n
=> "-L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib -licui18n\n"
"clang -o conftest -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/arm64-darwin24 -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/ruby/backward -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0 -I. -I/opt/homebrew/opt/icu4c@76/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -g -O2 -fno-common -pipe conftest.c  -L. -L/Users/illia/.rbenv/versions/2.7.8/lib -L/opt/homebrew/opt/icu4c@76/lib -L. -fstack-protector-strong -L/usr/local/lib  -m64   -lruby.2.7   "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return !!argv[argc];
6: }
/* end */

"clang -o conftest -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/arm64-darwin24 -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/ruby/backward -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0 -I. -I/opt/homebrew/opt/icu4c@76/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -g -O2 -fno-common -pipe conftest.c  -L. -L/Users/illia/.rbenv/versions/2.7.8/lib -L/opt/homebrew/opt/icu4c@76/lib -L. -fstack-protector-strong -L/usr/local/lib  -m64   -lruby.2.7 -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib -licui18n  "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return !!argv[argc];
6: }
/* end */

| pkg-config --cflags-only-I icu-i18n
=> "-I/opt/homebrew/Cellar/icu4c@76/76.1_2/include\n"
| pkg-config --cflags-only-other icu-i18n
=> "\n"
| pkg-config --libs-only-l icu-i18n
=> "-licui18n\n"
package configuration for icu-i18n
incflags: -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include
cflags: 
ldflags: -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib
libs: -licui18n

"pkg-config --exists icu-io"
| pkg-config --libs icu-io
=> "-L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib -licuio\n"
"clang -o conftest -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/arm64-darwin24 -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/ruby/backward -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0 -I. -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/opt/icu4c@76/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -g -O2 -fno-common -pipe  conftest.c  -L. -L/Users/illia/.rbenv/versions/2.7.8/lib -L/opt/homebrew/opt/icu4c@76/lib -L. -fstack-protector-strong -L/usr/local/lib -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib  -m64   -licui18n -lruby.2.7 -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib -licuio  "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return !!argv[argc];
6: }
/* end */

| pkg-config --cflags-only-I icu-io
=> "-I/opt/homebrew/Cellar/icu4c@76/76.1_2/include\n"
| pkg-config --cflags-only-other icu-io
=> "\n"
| pkg-config --libs-only-l icu-io
=> "-licuio\n"
package configuration for icu-io
incflags: -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include
cflags: 
ldflags: -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib
libs: -licuio

"pkg-config --exists icu-uc"
| pkg-config --libs icu-uc
=> "-L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib -licuuc\n"
"clang -o conftest -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/arm64-darwin24 -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/ruby/backward -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0 -I. -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/opt/icu4c@76/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -g -O2 -fno-common -pipe   conftest.c  -L. -L/Users/illia/.rbenv/versions/2.7.8/lib -L/opt/homebrew/opt/icu4c@76/lib -L. -fstack-protector-strong -L/usr/local/lib -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib  -m64   -licui18n -licuio -lruby.2.7 -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib -licuuc  "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return !!argv[argc];
6: }
/* end */

| pkg-config --cflags-only-I icu-uc
=> "-I/opt/homebrew/Cellar/icu4c@76/76.1_2/include\n"
| pkg-config --cflags-only-other icu-uc
=> "\n"
| pkg-config --libs-only-l icu-uc
=> "-licuuc\n"
package configuration for icu-uc
incflags: -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include
cflags: 
ldflags: -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib
libs: -licuuc

have_library: checking for -licui18n... -------------------- yes

"clang -o conftest -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/arm64-darwin24 -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/ruby/backward -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0 -I. -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/opt/icu4c@76/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -g -O2 -fno-common -pipe    conftest.c  -L. -L/Users/illia/.rbenv/versions/2.7.8/lib -L/opt/homebrew/opt/icu4c@76/lib -L. -fstack-protector-strong -L/usr/local/lib -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib  -m64   -licui18n -licuio -licuuc -lruby.2.7 -licui18n  -licui18n -licuio -licuuc  "
ld: warning: ignoring duplicate libraries: '-licui18n', '-licuio', '-licuuc'
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: /*top*/
 4: extern int t(void);
 5: int main(int argc, char **argv)
 6: {
 7:   if (argc > 1000000) {
 8:     int (* volatile tp)(void)=(int (*)(void))&t;
 9:     printf("%d", (*tp)());
10:   }
11: 
12:   return !!argv[argc];
13: }
14: 
15: int t(void) { ; return 0; }
/* end */

--------------------

have_header: checking for unicode/ucnv.h... -------------------- yes

"clang -E -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/arm64-darwin24 -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/ruby/backward -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0 -I. -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/opt/icu4c@76/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -g -O2 -fno-common -pipe     conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <unicode/ucnv.h>
/* end */

--------------------

have_library: checking for -lz... -------------------- yes

"clang -o conftest -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/arm64-darwin24 -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/ruby/backward -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0 -I. -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/opt/icu4c@76/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -g -O2 -fno-common -pipe    conftest.c  -L. -L/Users/illia/.rbenv/versions/2.7.8/lib -L/opt/homebrew/opt/icu4c@76/lib -L. -fstack-protector-strong -L/usr/local/lib -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib  -m64  -licui18n  -licui18n -licuio -licuuc -lruby.2.7 -lz -licui18n  -licui18n -licuio -licuuc  "
ld: warning: ignoring duplicate libraries: '-licui18n', '-licuio', '-licuuc'
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: /*top*/
 4: extern int t(void);
 5: int main(int argc, char **argv)
 6: {
 7:   if (argc > 1000000) {
 8:     int (* volatile tp)(void)=(int (*)(void))&t;
 9:     printf("%d", (*tp)());
10:   }
11: 
12:   return !!argv[argc];
13: }
14: 
15: int t(void) { ; return 0; }
/* end */

--------------------

have_library: checking for -licuuc... -------------------- yes

"clang -o conftest -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/arm64-darwin24 -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/ruby/backward -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0 -I. -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/opt/icu4c@76/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -g -O2 -fno-common -pipe    conftest.c  -L. -L/Users/illia/.rbenv/versions/2.7.8/lib -L/opt/homebrew/opt/icu4c@76/lib -L. -fstack-protector-strong -L/usr/local/lib -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib  -m64  -lz -licui18n  -licui18n -licuio -licuuc -lruby.2.7 -licuuc -lz -licui18n  -licui18n -licuio -licuuc  "
ld: warning: ignoring duplicate libraries: '-licui18n', '-licuio', '-licuuc', '-lz'
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: /*top*/
 4: extern int t(void);
 5: int main(int argc, char **argv)
 6: {
 7:   if (argc > 1000000) {
 8:     int (* volatile tp)(void)=(int (*)(void))&t;
 9:     printf("%d", (*tp)());
10:   }
11: 
12:   return !!argv[argc];
13: }
14: 
15: int t(void) { ; return 0; }
/* end */

--------------------

have_library: checking for -licudata... -------------------- yes

"clang -o conftest -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/arm64-darwin24 -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/ruby/backward -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0 -I. -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/opt/icu4c@76/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -g -O2 -fno-common -pipe    conftest.c  -L. -L/Users/illia/.rbenv/versions/2.7.8/lib -L/opt/homebrew/opt/icu4c@76/lib -L. -fstack-protector-strong -L/usr/local/lib -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib -L/opt/homebrew/Cellar/icu4c@76/76.1_2/lib  -m64  -licuuc -lz -licui18n  -licui18n -licuio -licuuc -lruby.2.7 -licudata -licuuc -lz -licui18n  -licui18n -licuio -licuuc  "
ld: warning: ignoring duplicate libraries: '-licui18n', '-licuio', '-licuuc', '-lz'
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: /*top*/
 4: extern int t(void);
 5: int main(int argc, char **argv)
 6: {
 7:   if (argc > 1000000) {
 8:     int (* volatile tp)(void)=(int (*)(void))&t;
 9:     printf("%d", (*tp)());
10:   }
11: 
12:   return !!argv[argc];
13: }
14: 
15: int t(void) { ; return 0; }
/* end */

--------------------

checking for icu that requires explicit C++ version flag... -------------------- yes

"clang -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/arm64-darwin24 -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/ruby/backward -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0 -I. -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/opt/icu4c@76/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -g -O2 -fno-common -pipe    -Wall -funroll-loops -m64 -x c++ -c conftest.c"
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:15:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/utypes.h:39:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/uversion.h:167:11: warning: nested namespace definition is a C++17 extension; define each namespace separately [-Wc++17-extensions]
  167 | namespace U_HEADER_ONLY_NAMESPACE {}
      |           ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/uversion.h:165:48: note: expanded from macro 'U_HEADER_ONLY_NAMESPACE'
  165 | #define U_HEADER_ONLY_NAMESPACE U_ICU_NAMESPACE::U_HEADER_NESTED_NAMESPACE
      |                                                ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:37:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:317:10: error: no template named 'is_convertible_v' in namespace 'std'; did you mean 'is_convertible'?
  317 |     std::is_convertible_v<T, std::u16string_view>
      |     ~~~~~^~~~~~~~~~~~~~~~
      |          is_convertible
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_convertible.h:22:29: note: 'is_convertible' declared here
   22 | struct _LIBCPP_TEMPLATE_VIS is_convertible : public integral_constant<bool, __is_convertible(_T1, _T2)> {};
      |                             ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:37:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:324:5: error: expected '(' for function-style cast or type construction
  317 |     std::is_convertible_v<T, std::u16string_view>
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  318 | #if !U_CHAR16_IS_TYPEDEF && (!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION < 180000)
  319 |     || std::is_convertible_v<T, std::basic_string_view<uint16_t>>
  320 | #endif
  321 | #if U_SIZEOF_WCHAR_T==2
  322 |     || std::is_convertible_v<T, std::wstring_view>
  323 | #endif
  324 |     ;
      |     ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:360:54: error: no template named 'is_pointer_v' in namespace 'std'; did you mean 'is_pointer'?
  360 |           typename = typename std::enable_if_t<!std::is_pointer_v<std::remove_reference_t<T>>>>
      |                                                 ~~~~~^~~~~~~~~~~~
      |                                                      is_pointer
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_pointer.h:25:29: note: 'is_pointer' declared here
   25 | struct _LIBCPP_TEMPLATE_VIS is_pointer : _BoolConstant<__is_pointer(_Tp)> {};
      |                             ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:37:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:360:94: error: expected '(' for function-style cast or type construction
  360 |           typename = typename std::enable_if_t<!std::is_pointer_v<std::remove_reference_t<T>>>>
      |                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:370:53: error: no template named 'is_pointer_v' in namespace 'std'; did you mean 'is_pointer'?
  370 |           typename = typename std::enable_if_t<std::is_pointer_v<std::remove_reference_t<T>>>,
      |                                                ~~~~~^~~~~~~~~~~~
      |                                                     is_pointer
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_pointer.h:25:29: note: 'is_pointer' declared here
   25 | struct _LIBCPP_TEMPLATE_VIS is_pointer : _BoolConstant<__is_pointer(_Tp)> {};
      |                             ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:37:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:370:48: error: template argument for non-type template parameter must be an expression
  370 |           typename = typename std::enable_if_t<std::is_pointer_v<std::remove_reference_t<T>>>,
      |                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/enable_if.h:31:16: note: template parameter is declared here
   31 | template <bool _Bp, class _Tp = void>
      |                ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:40:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/stringpiece.h:135:23: error: no template named 'is_same_v' in namespace 'std'; did you mean 'is_same'?
  135 |                 (std::is_same_v<decltype(T().data()), const char*>
      |                  ~~~~~^~~~~~~~~
      |                       is_same
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_same.h:22:29: note: 'is_same' declared here
   22 | struct _LIBCPP_TEMPLATE_VIS is_same : _BoolConstant<__is_same(_Tp, _Up)> {};
      |                             ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:40:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/stringpiece.h:140:17: error: use of address-of-label extension outside of a function body
  140 |                 std::is_same_v<decltype(T().size()), size_t>>>
      |                 ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/stringpiece.h:140:62: error: expected member name or ';' after declaration specifiers
  140 |                 std::is_same_v<decltype(T().size()), size_t>>>
      |                                                              ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:37:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:316:16: error: constexpr variable 'ConvertibleToU16StringView<const char16_t *>' must be initialized by a constant expression
  316 | constexpr bool ConvertibleToU16StringView =
      |                ^
      |                                           = false
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3273:52: note: in instantiation of variable template specialization 'icu_76::ConvertibleToU16StringView<const char16_t *>' requested here
 3273 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                                    ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3274:31: note: in instantiation of default argument for 'UnicodeString<const_pointer>' required here
 3274 |   UNISTR_FROM_STRING_EXPLICIT UnicodeString(const S &text) {
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:350:73: note: while substituting deduced template arguments into function template 'UnicodeString' [with S = const_pointer, $1 = (no value)]
  350 |     return !isBogus() && (len = length()) == sv.length() && doEquals(sv.data(), len);
      |                                                                         ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:37:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:316:16: error: constexpr variable 'ConvertibleToU16StringView<icu_76::ConstChar16Ptr>' must be initialized by a constant expression
  316 | constexpr bool ConvertibleToU16StringView =
      |                ^
      |                                           = false
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3273:52: note: in instantiation of variable template specialization 'icu_76::ConvertibleToU16StringView<icu_76::ConstChar16Ptr>' requested here
 3273 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                                    ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3274:31: note: in instantiation of default argument for 'UnicodeString<ConstChar16Ptr>' required here
 3274 |   UNISTR_FROM_STRING_EXPLICIT UnicodeString(const S &text) {
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3149:21: note: while substituting deduced template arguments into function template 'UnicodeString' [with S = ConstChar16Ptr, $1 = (no value)]
 3149 |       UnicodeString(ConstChar16Ptr(text), -1) {}
      |                     ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:37:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:316:16: error: constexpr variable 'ConvertibleToU16StringView<icu_76::Char16Ptr>' must be initialized by a constant expression
  316 | constexpr bool ConvertibleToU16StringView =
      |                ^
      |                                           = false
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3273:52: note: in instantiation of variable template specialization 'icu_76::ConvertibleToU16StringView<icu_76::Char16Ptr>' requested here
 3273 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                                    ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3274:31: note: in instantiation of default argument for 'UnicodeString<Char16Ptr>' required here
 3274 |   UNISTR_FROM_STRING_EXPLICIT UnicodeString(const S &text) {
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3275 |     fUnion.fFields.fLengthAndFlags = kShortString;
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3276 |     doAppend(internal::toU16StringViewNullable(text));
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3277 |   }
      |   ~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3344:21: note: while substituting deduced template arguments into function template 'UnicodeString' [with S = Char16Ptr, $1 = (no value)]
 3344 |       UnicodeString(Char16Ptr(buffer), buffLength, buffCapacity) {}
      |                     ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:37:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:316:16: error: constexpr variable 'ConvertibleToU16StringView<icu_76::UnicodeString>' must be initialized by a constant expression
  316 | constexpr bool ConvertibleToU16StringView =
      |                ^
      |                                           = false
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3273:52: note: in instantiation of variable template specialization 'icu_76::ConvertibleToU16StringView<icu_76::UnicodeString>' requested here
 3273 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                                    ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3274:31: note: in instantiation of default argument for 'UnicodeString<UnicodeString>' required here
 3274 |   UNISTR_FROM_STRING_EXPLICIT UnicodeString(const S &text) {
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3275 |     fUnion.fFields.fLengthAndFlags = kShortString;
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3276 |     doAppend(internal::toU16StringViewNullable(text));
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3277 |   }
      |   ~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3624:12: note: while substituting deduced template arguments into function template 'UnicodeString' [with S = UnicodeString, $1 = (no value)]
 3624 |     return readOnlyAliasFromUnicodeString(text);
      |            ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:37:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:316:16: error: constexpr variable 'ConvertibleToU16StringView<int>' must be initialized by a constant expression
  316 | constexpr bool ConvertibleToU16StringView =
      |                ^
      |                                           = false
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3273:52: note: in instantiation of variable template specialization 'icu_76::ConvertibleToU16StringView<int>' requested here
 3273 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                                    ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3274:31: note: in instantiation of default argument for 'UnicodeString<UChar32>' required here
 3274 |   UNISTR_FROM_STRING_EXPLICIT UnicodeString(const S &text) {
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3275 |     fUnion.fFields.fLengthAndFlags = kShortString;
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3276 |     doAppend(internal::toU16StringViewNullable(text));
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3277 |   }
      |   ~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:4566:18: note: while substituting deduced template arguments into function template 'UnicodeString' [with S = UChar32, $1 = (no value)]
 4566 | { return indexOf(c, 0, length()); }
      |                  ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:37:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:316:16: error: constexpr variable 'ConvertibleToU16StringView<char16_t *>' must be initialized by a constant expression
  316 | constexpr bool ConvertibleToU16StringView =
      |                ^
      |                                           = false
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3273:52: note: in instantiation of variable template specialization 'icu_76::ConvertibleToU16StringView<char16_t *>' requested here
 3273 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                                    ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3274:31: note: in instantiation of default argument for 'UnicodeString<char16_t *>' required here
 3274 |   UNISTR_FROM_STRING_EXPLICIT UnicodeString(const S &text) {
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3275 |     fUnion.fFields.fLengthAndFlags = kShortString;
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3276 |     doAppend(internal::toU16StringViewNullable(text));
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3277 |   }
      |   ~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:4762:36: note: while substituting deduced template arguments into function template 'UnicodeString' [with S = char16_t *, $1 = (no value)]
 4762 | { return doReplace(start, _length, &srcChar, 0, 1); }
      |                                    ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:37:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:316:16: error: constexpr variable 'ConvertibleToU16StringView<std::nullptr_t>' must be initialized by a constant expression
  316 | constexpr bool ConvertibleToU16StringView =
      |                ^
      |                                           = false
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3273:52: note: in instantiation of variable template specialization 'icu_76::ConvertibleToU16StringView<std::nullptr_t>' requested here
 3273 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                                    ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3274:31: note: in instantiation of default argument for 'UnicodeString<std::nullptr_t>' required here
 3274 |   UNISTR_FROM_STRING_EXPLICIT UnicodeString(const S &text) {
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3275 |     fUnion.fFields.fLengthAndFlags = kShortString;
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3276 |     doAppend(internal::toU16StringViewNullable(text));
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3277 |   }
      |   ~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:5053:38: note: while substituting deduced template arguments into function template 'UnicodeString' [with S = std::nullptr_t, $1 = (no value)]
 5053 |     return doReplace(start, _length, nullptr, 0, 0);
      |                                      ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:29:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/utrans.h:22:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/uenum.h:25:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/localpointer.h:561:26: error: 'auto' not allowed in template parameter until C++17
  561 | template <typename Type, auto closeFunction>
      |                          ^~~~
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:29:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/utrans.h:22:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/uenum.h:69:69: error: value of type 'void (UEnumeration *)' is not implicitly convertible to 'int'
   69 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUEnumerationPointer, UEnumeration, uenum_close);
      |                                                                     ^~~~~~~~~~~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/urename.h:948:21: note: expanded from macro 'uenum_close'
  948 | #define uenum_close U_ICU_ENTRY_POINT_RENAME(uenum_close)
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/uvernum.h:123:47: note: expanded from macro 'U_ICU_ENTRY_POINT_RENAME'
  123 | #       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/uvernum.h:122:51: note: expanded from macro 'U_DEF2_ICU_ENTRY_POINT_RENAME'
  122 | #       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/uvernum.h:121:50: note: expanded from macro 'U_DEF_ICU_ENTRY_POINT_RENAME'
  121 | #       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
      |                                                  ^~~~~~
<scratch space>:322:1: note: expanded from here
  322 | uenum_close_76
      | ^~~~~~~~~~~~~~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/localpointer.h:551:68: note: expanded from macro 'U_DEFINE_LOCAL_OPEN_POINTER'
  551 |     using LocalPointerClassName = internal::LocalOpenPointer<Type, closeFunction>
      |                                                                    ^~~~~~~~~~~~~
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:29:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/utrans.h:23:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/uset.h:361:53: error: value of type 'void (USet *)' is not implicitly convertible to 'int'
  361 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUSetPointer, USet, uset_close);
      |                                                     ^~~~~~~~~~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/urename.h:1760:20: note: expanded from macro 'uset_close'
 1760 | #define uset_close U_ICU_ENTRY_POINT_RENAME(uset_close)
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/uvernum.h:123:47: note: expanded from macro 'U_ICU_ENTRY_POINT_RENAME'
  123 | #       define U_ICU_ENTRY_POINT_RENAME(x)    U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/uvernum.h:122:51: note: expanded from macro 'U_DEF2_ICU_ENTRY_POINT_RENAME'
  122 | #       define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/uvernum.h:121:50: note: expanded from macro 'U_DEF_ICU_ENTRY_POINT_RENAME'
  121 | #       define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
      |                                                  ^~~~~~
<scratch space>:16:1: note: expanded from here
   16 | uset_close_76
      | ^~~~~~~~~~~~~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/localpointer.h:551:68: note: expanded from macro 'U_DEFINE_LOCAL_OPEN_POINTER'
  551 |     using LocalPointerClassName = internal::LocalOpenPointer<Type, closeFunction>
      |                                                                    ^~~~~~~~~~~~~
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:29:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/utrans.h:23:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/uset.h:1331:11: warning: nested namespace definition is a C++17 extension; define each namespace separately [-Wc++17-extensions]
 1331 | namespace U_HEADER_ONLY_NAMESPACE {
      |           ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/uversion.h:165:48: note: expanded from macro 'U_HEADER_ONLY_NAMESPACE'
  165 | #define U_HEADER_ONLY_NAMESPACE U_ICU_NAMESPACE::U_HEADER_NESTED_NAMESPACE
      |                                                ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <unicode/translit.h>
4: int main() { return 0; }
/* end */

--------------------

block in <main>: checking for icu that compiles with c++20 standard... -------------------- no

"clang -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/arm64-darwin24 -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/ruby/backward -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0 -I. -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/opt/icu4c@76/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -g -O2 -fno-common -pipe    -Wall -funroll-loops -m64 -x c++ -std=c++20 -c conftest.c"
In file included from conftest.c:1:
In file included from /Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/ruby.h:33:
/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/ruby/ruby.h:2738:30: warning: volatile-qualified parameter type 'volatile int' is deprecated [-Wdeprecated-volatile]
 2738 | int ruby_cleanup(volatile int);
      |                              ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:36:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:251:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/compare:174:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:327:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__math/special_functions.h:51:8: error: no member named 'finite' in namespace 'std::__math'; did you mean simply 'finite'?
   51 |   if (!__math::isfinite(__H_n)) {
      |        ^~~~~~~~
/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/ruby/missing.h:105:17: note: 'finite' declared here
  105 | RUBY_EXTERN int finite(double);
      |                 ^
1 warning and 1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <unicode/translit.h>
4: int main() { return 0; }
/* end */

--------------------

block in <main>: checking for icu that compiles with c++17 standard... -------------------- no

"clang -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/arm64-darwin24 -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/ruby/backward -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0 -I. -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/opt/icu4c@76/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -g -O2 -fno-common -pipe    -Wall -funroll-loops -m64 -x c++ -std=c++17 -c conftest.c"
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:36:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:251:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/compare:174:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:327:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__math/special_functions.h:51:8: error: no member named 'finite' in namespace 'std::__math'; did you mean simply 'finite'?
   51 |   if (!__math::isfinite(__H_n)) {
      |        ^~~~~~~~
/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/ruby/missing.h:105:17: note: 'finite' declared here
  105 | RUBY_EXTERN int finite(double);
      |                 ^
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <unicode/translit.h>
4: int main() { return 0; }
/* end */

--------------------

block in <main>: checking for icu that compiles with c++11 standard... -------------------- no

"clang -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/arm64-darwin24 -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/ruby/backward -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0 -I. -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/opt/icu4c@76/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -g -O2 -fno-common -pipe    -Wall -funroll-loops -m64 -x c++ -std=c++11 -c conftest.c"
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:15:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/utypes.h:39:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/uversion.h:167:11: warning: nested namespace definition is a C++17 extension; define each namespace separately [-Wc++17-extensions]
  167 | namespace U_HEADER_ONLY_NAMESPACE {}
      |           ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/uversion.h:165:48: note: expanded from macro 'U_HEADER_ONLY_NAMESPACE'
  165 | #define U_HEADER_ONLY_NAMESPACE U_ICU_NAMESPACE::U_HEADER_NESTED_NAMESPACE
      |                                                ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:37:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:316:16: warning: variable templates are a C++14 extension [-Wc++14-extensions]
  316 | constexpr bool ConvertibleToU16StringView =
      |                ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:317:10: error: no template named 'is_convertible_v' in namespace 'std'; did you mean 'is_convertible'?
  317 |     std::is_convertible_v<T, std::u16string_view>
      |     ~~~~~^~~~~~~~~~~~~~~~
      |          is_convertible
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_convertible.h:22:29: note: 'is_convertible' declared here
   22 | struct _LIBCPP_TEMPLATE_VIS is_convertible : public integral_constant<bool, __is_convertible(_T1, _T2)> {};
      |                             ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:37:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:324:5: error: expected '(' for function-style cast or type construction
  317 |     std::is_convertible_v<T, std::u16string_view>
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  318 | #if !U_CHAR16_IS_TYPEDEF && (!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION < 180000)
  319 |     || std::is_convertible_v<T, std::basic_string_view<uint16_t>>
  320 | #endif
  321 | #if U_SIZEOF_WCHAR_T==2
  322 |     || std::is_convertible_v<T, std::wstring_view>
  323 | #endif
  324 |     ;
      |     ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:360:36: error: no type named 'enable_if_t' in namespace 'std'
  360 |           typename = typename std::enable_if_t<!std::is_pointer_v<std::remove_reference_t<T>>>>
      |                      ~~~~~~~~~~~~~~^~~~~~~~~~~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:360:47: error: expected ',' or '>' in template-parameter-list
  360 |           typename = typename std::enable_if_t<!std::is_pointer_v<std::remove_reference_t<T>>>>
      |                                               ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:360:93: error: expected unqualified-id
  360 |           typename = typename std::enable_if_t<!std::is_pointer_v<std::remove_reference_t<T>>>>
      |                                                                                             ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:370:36: error: no type named 'enable_if_t' in namespace 'std'
  370 |           typename = typename std::enable_if_t<std::is_pointer_v<std::remove_reference_t<T>>>,
      |                      ~~~~~~~~~~~~~~^~~~~~~~~~~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:370:47: error: expected ',' or '>' in template-parameter-list
  370 |           typename = typename std::enable_if_t<std::is_pointer_v<std::remove_reference_t<T>>>,
      |                                               ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:370:92: error: expected unqualified-id
  370 |           typename = typename std::enable_if_t<std::is_pointer_v<std::remove_reference_t<T>>>,
      |                                                                                            ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:40:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/stringpiece.h:134:29: error: no template named 'enable_if_t' in namespace 'std'
  134 |             typename = std::enable_if_t<
      |                        ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/stringpiece.h:135:23: error: no template named 'is_same_v' in namespace 'std'; did you mean 'is_same'?
  135 |                 (std::is_same_v<decltype(T().data()), const char*>
      |                  ~~~~~^~~~~~~~~
      |                       is_same
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_same.h:22:29: note: 'is_same' declared here
   22 | struct _LIBCPP_TEMPLATE_VIS is_same : _BoolConstant<__is_same(_Tp, _Up)> {};
      |                             ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:40:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/stringpiece.h:140:17: error: use of address-of-label extension outside of a function body
  140 |                 std::is_same_v<decltype(T().size()), size_t>>>
      |                 ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/stringpiece.h:140:62: error: expected member name or ';' after declaration specifiers
  140 |                 std::is_same_v<decltype(T().size()), size_t>>>
      |                                                              ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:346:40: error: no template named 'enable_if_t' in namespace 'std'
  346 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:381:40: error: no template named 'enable_if_t' in namespace 'std'
  381 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:1959:40: error: no template named 'enable_if_t' in namespace 'std'
 1959 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:2226:40: error: no template named 'enable_if_t' in namespace 'std'
 2226 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:2299:40: error: no template named 'enable_if_t' in namespace 'std'
 2299 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3273:40: error: no template named 'enable_if_t' in namespace 'std'
 3273 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3599:40: error: no template named 'enable_if_t' in namespace 'std'
 3599 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <unicode/translit.h>
4: int main() { return 0; }
/* end */

--------------------

block in <main>: checking for icu that compiles with c++0x standard... -------------------- no

"clang -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/arm64-darwin24 -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0/ruby/backward -I/Users/illia/.rbenv/versions/2.7.8/include/ruby-2.7.0 -I. -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/Cellar/icu4c@76/76.1_2/include -I/opt/homebrew/opt/icu4c@76/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -g -O2 -fno-common -pipe    -Wall -funroll-loops -m64 -x c++ -std=c++0x -c conftest.c"
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:15:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/utypes.h:39:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/uversion.h:167:11: warning: nested namespace definition is a C++17 extension; define each namespace separately [-Wc++17-extensions]
  167 | namespace U_HEADER_ONLY_NAMESPACE {}
      |           ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/uversion.h:165:48: note: expanded from macro 'U_HEADER_ONLY_NAMESPACE'
  165 | #define U_HEADER_ONLY_NAMESPACE U_ICU_NAMESPACE::U_HEADER_NESTED_NAMESPACE
      |                                                ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:37:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:316:16: warning: variable templates are a C++14 extension [-Wc++14-extensions]
  316 | constexpr bool ConvertibleToU16StringView =
      |                ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:317:10: error: no template named 'is_convertible_v' in namespace 'std'; did you mean 'is_convertible'?
  317 |     std::is_convertible_v<T, std::u16string_view>
      |     ~~~~~^~~~~~~~~~~~~~~~
      |          is_convertible
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_convertible.h:22:29: note: 'is_convertible' declared here
   22 | struct _LIBCPP_TEMPLATE_VIS is_convertible : public integral_constant<bool, __is_convertible(_T1, _T2)> {};
      |                             ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:37:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:324:5: error: expected '(' for function-style cast or type construction
  317 |     std::is_convertible_v<T, std::u16string_view>
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  318 | #if !U_CHAR16_IS_TYPEDEF && (!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION < 180000)
  319 |     || std::is_convertible_v<T, std::basic_string_view<uint16_t>>
  320 | #endif
  321 | #if U_SIZEOF_WCHAR_T==2
  322 |     || std::is_convertible_v<T, std::wstring_view>
  323 | #endif
  324 |     ;
      |     ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:360:36: error: no type named 'enable_if_t' in namespace 'std'
  360 |           typename = typename std::enable_if_t<!std::is_pointer_v<std::remove_reference_t<T>>>>
      |                      ~~~~~~~~~~~~~~^~~~~~~~~~~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:360:47: error: expected ',' or '>' in template-parameter-list
  360 |           typename = typename std::enable_if_t<!std::is_pointer_v<std::remove_reference_t<T>>>>
      |                                               ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:360:93: error: expected unqualified-id
  360 |           typename = typename std::enable_if_t<!std::is_pointer_v<std::remove_reference_t<T>>>>
      |                                                                                             ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:370:36: error: no type named 'enable_if_t' in namespace 'std'
  370 |           typename = typename std::enable_if_t<std::is_pointer_v<std::remove_reference_t<T>>>,
      |                      ~~~~~~~~~~~~~~^~~~~~~~~~~
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:370:47: error: expected ',' or '>' in template-parameter-list
  370 |           typename = typename std::enable_if_t<std::is_pointer_v<std::remove_reference_t<T>>>,
      |                                               ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/char16ptr.h:370:92: error: expected unqualified-id
  370 |           typename = typename std::enable_if_t<std::is_pointer_v<std::remove_reference_t<T>>>,
      |                                                                                            ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:40:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/stringpiece.h:134:29: error: no template named 'enable_if_t' in namespace 'std'
  134 |             typename = std::enable_if_t<
      |                        ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/stringpiece.h:135:23: error: no template named 'is_same_v' in namespace 'std'; did you mean 'is_same'?
  135 |                 (std::is_same_v<decltype(T().data()), const char*>
      |                  ~~~~~^~~~~~~~~
      |                       is_same
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_same.h:22:29: note: 'is_same' declared here
   22 | struct _LIBCPP_TEMPLATE_VIS is_same : _BoolConstant<__is_same(_Tp, _Up)> {};
      |                             ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:40:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/stringpiece.h:140:17: error: use of address-of-label extension outside of a function body
  140 |                 std::is_same_v<decltype(T().size()), size_t>>>
      |                 ^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/stringpiece.h:140:62: error: expected member name or ';' after declaration specifiers
  140 |                 std::is_same_v<decltype(T().size()), size_t>>>
      |                                                              ^
In file included from conftest.c:3:
In file included from /opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/translit.h:27:
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:346:40: error: no template named 'enable_if_t' in namespace 'std'
  346 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:381:40: error: no template named 'enable_if_t' in namespace 'std'
  381 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:1959:40: error: no template named 'enable_if_t' in namespace 'std'
 1959 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:2226:40: error: no template named 'enable_if_t' in namespace 'std'
 2226 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:2299:40: error: no template named 'enable_if_t' in namespace 'std'
 2299 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3273:40: error: no template named 'enable_if_t' in namespace 'std'
 3273 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
/opt/homebrew/Cellar/icu4c@76/76.1_2/include/unicode/unistr.h:3599:40: error: no template named 'enable_if_t' in namespace 'std'
 3599 |   template<typename S, typename = std::enable_if_t<ConvertibleToU16StringView<S>>>
      |                                   ~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <unicode/translit.h>
4: int main() { return 0; }
/* end */

--------------------

What's the best way to fix it? I'll happily submit a PR if required - just direct me, please. :-)

ilyazub avatar Apr 15 '25 09:04 ilyazub

I got multiple compilation errors when installing charlock_holmes v0.7.9 with Ruby 2.7.8.

Install comand:

gem install charlock_holmes  -- --with-icu-dir=/opt/homebrew/opt/icu4c@76 --with-cxxflags="-std=c++17"

(It didn't work with icu4c@77 and c++11 as well.) ... What's the best way to fix it? I'll happily submit a PR if required - just direct me, please. :-)

@ilyazub, it looks like the newer versions of icu4c aren't compatible with Ruby 2.7.8 as far as I can tell.

Downgrading to icu4c@74 seems to do the job. With Homebrew:

  1. brew uninstall icu4c
  2. brew install icu4c@74
  3. brew link --force --overwrite icu4c@74
  4. bundle config build.charlock_holmes --with-cflags="-I/opt/homebrew/opt/icu4c@74/include" --with-ldflags="-L/opt/homebrew/opt/icu4c@74/lib"
  5. bundle install

dsojevic avatar Apr 15 '25 11:04 dsojevic

Thanks @dsojevic, it worked!

ilyazub avatar Apr 15 '25 12:04 ilyazub

Is there any progress in solving this problem? Homebrew has disabled icu4c@74

zh1C avatar May 19 '25 06:05 zh1C

brew tap-new old/formulas
brew extract icu4c old/formulas --version=74
brew install old/formulas/icu4c@74
gem install charlock_holmes -v 0.7.9 -- --with-icu-dir=$(brew --prefix icu4c@74)

yuri-zubov avatar May 20 '25 16:05 yuri-zubov

@yuri-zubov worked for me, thanks!

khelal avatar Jul 20 '25 08:07 khelal