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

Installing 0.7.8 on macOS 14.5 (Sonoma) error. #177

Closed
joshuapinter opened this issue Jul 4, 2024 · 13 comments · Fixed by #179
Closed

Installing 0.7.8 on macOS 14.5 (Sonoma) error. #177

joshuapinter opened this issue Jul 4, 2024 · 13 comments · Fixed by #179

Comments

@joshuapinter
Copy link

gem install charlock_holmes
Building native extensions. This could take a while...
ERROR:  Error installing charlock_holmes:
	ERROR: Failed to build gem native extension.

    current directory: /Users/me/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/charlock_holmes-0.7.8/ext/charlock_holmes
/Users/me/.rbenv/versions/3.3.3/bin/ruby extconf.rb
checking for pkg-config for icu-i18n... not found
checking for pkg-config for icu-io... not found
checking for pkg-config for icu-uc... not found
checking for -licui18n... yes
checking for unicode/ucnv.h... yes
checking for -lz... yes
checking for -licuuc... yes
checking for -licudata... yes
creating Makefile

current directory: /Users/me/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/charlock_holmes-0.7.8/ext/charlock_holmes
make DESTDIR\= sitearchdir\=./.gem.20240704-49730-lnpeup sitelibdir\=./.gem.20240704-49730-lnpeup clean

current directory: /Users/me/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/charlock_holmes-0.7.8/ext/charlock_holmes
make DESTDIR\= sitearchdir\=./.gem.20240704-49730-lnpeup sitelibdir\=./.gem.20240704-49730-lnpeup
compiling converter.c
converter.c:23:12: warning: implicit conversion loses integer precision: 'long' to 'int32_t' (aka 'int') [-Wshorten-64-to-32]
        src_len = RSTRING_LEN(rb_txt);
                ~ ^~~~~~~~~~~~~~~~~~~
/Users/me/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/core/rstring.h:46:27: note: expanded from macro 'RSTRING_LEN'
#define RSTRING_LEN       RSTRING_LEN
                          ^
1 warning generated.
compiling encoding_detector.c
encoding_detector.c:183:71: warning: implicit conversion loses integer precision: 'long' to 'int32_t' (aka 'int') [-Wshorten-64-to-32]
                ucsdet_setDeclaredEncoding(detector->csd, RSTRING_PTR(rb_enc_hint), RSTRING_LEN(rb_enc_hint), &status);
                ~~~~~~~~~~~~~~~~~~~~~~~~~~                                          ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/me/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/core/rstring.h:46:27: note: expanded from macro 'RSTRING_LEN'
#define RSTRING_LEN       RSTRING_LEN
                          ^
encoding_detector.c:232:71: warning: implicit conversion loses integer precision: 'long' to 'int32_t' (aka 'int') [-Wshorten-64-to-32]
                ucsdet_setDeclaredEncoding(detector->csd, RSTRING_PTR(rb_enc_hint), RSTRING_LEN(rb_enc_hint), &status);
                ~~~~~~~~~~~~~~~~~~~~~~~~~~                                          ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/me/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/core/rstring.h:46:27: note: expanded from macro 'RSTRING_LEN'
#define RSTRING_LEN       RSTRING_LEN
                          ^
2 warnings generated.
compiling ext.c
compiling transliterator.cpp
In file included from transliterator.cpp:5:
In file included from /opt/homebrew/opt/icu4c/include/unicode/translit.h:26:
/opt/homebrew/opt/icu4c/include/unicode/uobject.h:134:54: error: expected ';' at end of declaration list
    static void * U_EXPORT2 operator new(size_t size) noexcept;
                                                     ^
                                                     ;
/opt/homebrew/opt/icu4c/include/unicode/uobject.h:141:56: error: expected ';' at end of declaration list
    static void * U_EXPORT2 operator new[](size_t size) noexcept;
                                                       ^
                                                       ;
/opt/homebrew/opt/icu4c/include/unicode/uobject.h:151:51: error: expected ';' at end of declaration list
    static void U_EXPORT2 operator delete(void *p) noexcept;
                                                  ^
                                                  ;
/opt/homebrew/opt/icu4c/include/unicode/uobject.h:158:53: error: expected ';' at end of declaration list
    static void U_EXPORT2 operator delete[](void *p) noexcept;
                                                    ^
                                                    ;
/opt/homebrew/opt/icu4c/include/unicode/uobject.h:166:67: error: expected ';' at end of declaration list
    static inline void * U_EXPORT2 operator new(size_t, void *ptr) noexcept { return ptr; }
                                                                  ^
                                                                  ;
In file included from transliterator.cpp:5:
In file included from /opt/homebrew/opt/icu4c/include/unicode/translit.h:27:
In file included from /opt/homebrew/opt/icu4c/include/unicode/unistr.h:36:
/opt/homebrew/opt/icu4c/include/unicode/char16ptr.h:42:30: warning: 'final' keyword is a C++11 extension [-Wc++11-extensions]
class U_COMMON_API Char16Ptr final {
                             ^
/opt/homebrew/opt/icu4c/include/unicode/char16ptr.h:93:19: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    Char16Ptr() = delete;
                  ^
/opt/homebrew/opt/icu4c/include/unicode/char16ptr.h:149:35: warning: 'final' keyword is a C++11 extension [-Wc++11-extensions]
class U_COMMON_API ConstChar16Ptr final {
                                  ^
/opt/homebrew/opt/icu4c/include/unicode/char16ptr.h:201:24: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    ConstChar16Ptr() = delete;
                       ^
In file included from transliterator.cpp:5:
In file included from /opt/homebrew/opt/icu4c/include/unicode/translit.h:27:
In file included from /opt/homebrew/opt/icu4c/include/unicode/unistr.h:39:
/opt/homebrew/opt/icu4c/include/unicode/stringpiece.h:133:22: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions]
            typename = typename std::enable_if<
                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~
In file included from transliterator.cpp:5:
In file included from /opt/homebrew/opt/icu4c/include/unicode/translit.h:27:
In file included from /opt/homebrew/opt/icu4c/include/unicode/unistr.h:40:
/opt/homebrew/opt/icu4c/include/unicode/bytestream.h:164:32: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
  ByteSink(const ByteSink &) = delete;
                               ^
/opt/homebrew/opt/icu4c/include/unicode/bytestream.h:165:43: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
  ByteSink &operator=(const ByteSink &) = delete;
                                          ^
/opt/homebrew/opt/icu4c/include/unicode/bytestream.h:209:53: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
  virtual void Append(const char* bytes, int32_t n) override;
                                                    ^
/opt/homebrew/opt/icu4c/include/unicode/bytestream.h:227:59: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
                                int32_t* result_capacity) override;
                                                          ^
/opt/homebrew/opt/icu4c/include/unicode/bytestream.h:256:28: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
  CheckedArrayByteSink() = delete;
                           ^
/opt/homebrew/opt/icu4c/include/unicode/bytestream.h:257:56: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
  CheckedArrayByteSink(const CheckedArrayByteSink &) = delete;
                                                       ^
/opt/homebrew/opt/icu4c/include/unicode/bytestream.h:258:67: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
  CheckedArrayByteSink &operator=(const CheckedArrayByteSink &) = delete;
                                                                  ^
/opt/homebrew/opt/icu4c/include/unicode/bytestream.h:294:52: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
  virtual void Append(const char* data, int32_t n) override { dest_->append(data, n); }
                                                   ^
/opt/homebrew/opt/icu4c/include/unicode/bytestream.h:298:22: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
  StringByteSink() = delete;
                     ^
/opt/homebrew/opt/icu4c/include/unicode/bytestream.h:299:44: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
  StringByteSink(const StringByteSink &) = delete;
                                           ^
/opt/homebrew/opt/icu4c/include/unicode/bytestream.h:300:55: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
  StringByteSink &operator=(const StringByteSink &) = delete;
                                                      ^
In file included from transliterator.cpp:5:
In file included from /opt/homebrew/opt/icu4c/include/unicode/translit.h:27:
/opt/homebrew/opt/icu4c/include/unicode/unistr.h:1529:44: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
              UnicodeString& target) const override;
                                           ^
/opt/homebrew/opt/icu4c/include/unicode/unistr.h:1909:42: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
  UnicodeString &operator=(UnicodeString &&src) noexcept;
                                         ^
/opt/homebrew/opt/icu4c/include/unicode/unistr.h:1909:48: error: expected ';' at end of declaration list
  UnicodeString &operator=(UnicodeString &&src) noexcept;
                                               ^
                                               ;
/opt/homebrew/opt/icu4c/include/unicode/unistr.h:1916:34: error: expected ';' at end of declaration list
  void swap(UnicodeString &other) noexcept;
                                 ^
                                 ;
/opt/homebrew/opt/icu4c/include/unicode/unistr.h:1925:45: error: expected ';' at end of declaration list
  swap(UnicodeString &s1, UnicodeString &s2) noexcept {
                                            ^
                                            ;
/opt/homebrew/opt/icu4c/include/unicode/unistr.h:2459:64: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
                                    const UnicodeString& text) override;
                                                               ^
/opt/homebrew/opt/icu4c/include/unicode/unistr.h:2466:37: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
  virtual UBool hasMetaData() const override;
                                    ^
/opt/homebrew/opt/icu4c/include/unicode/unistr.h:2481:65: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
  virtual void copy(int32_t start, int32_t limit, int32_t dest) override;
                                                                ^
/opt/homebrew/opt/icu4c/include/unicode/unistr.h:3309:31: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
  UnicodeString(UnicodeString &&src) noexcept;
                              ^
/opt/homebrew/opt/icu4c/include/unicode/unistr.h:3309:37: error: expected ';' at end of declaration list
  UnicodeString(UnicodeString &&src) noexcept;
                                    ^
                                    ;
/opt/homebrew/opt/icu4c/include/unicode/unistr.h:3341:40: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
  virtual UnicodeString *clone() const override;
                                       ^
/opt/homebrew/opt/icu4c/include/unicode/unistr.h:3447:46: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
  virtual UClassID getDynamicClassID() const override;
                                             ^
/opt/homebrew/opt/icu4c/include/unicode/unistr.h:3458:37: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
  virtual int32_t getLength() const override;
                                    ^
/opt/homebrew/opt/icu4c/include/unicode/unistr.h:3465:52: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
  virtual char16_t getCharAt(int32_t offset) const override;
                                                   ^
/opt/homebrew/opt/icu4c/include/unicode/unistr.h:3472:53: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
  virtual UChar32 getChar32At(int32_t offset) const override;
                                                    ^
/opt/homebrew/opt/icu4c/include/unicode/unistr.h:3634:63: error: expected ';' at end of declaration list
  void copyFieldsFrom(UnicodeString &src, UBool setSrcToBogus) noexcept;
                                                              ^
                                                              ;
/opt/homebrew/opt/icu4c/include/unicode/unistr.h:2998:7: error: delegating constructors are permitted only in C++11
      UnicodeString(ConstChar16Ptr(text)) {}
      ^~~~~~~~~~~~~
/opt/homebrew/opt/icu4c/include/unicode/unistr.h:3048:7: error: delegating constructors are permitted only in C++11
      UnicodeString(ConstChar16Ptr(text), textLength) {}
      ^~~~~~~~~~~~~
/opt/homebrew/opt/icu4c/include/unicode/unistr.h:3129:7: error: delegating constructors are permitted only in C++11
      UnicodeString(Char16Ptr(buffer), buffLength, buffCapacity) {}
      ^~~~~~~~~~~~~
/opt/homebrew/opt/icu4c/include/unicode/unistr.h:4595:16: error: out-of-line definition of 'operator=' does not match any declaration in 'icu_74::UnicodeString'
UnicodeString::operator= (char16_t ch)
               ^~~~~~~~
In file included from transliterator.cpp:5:
In file included from /opt/homebrew/opt/icu4c/include/unicode/translit.h:29:
In file included from /opt/homebrew/opt/icu4c/include/unicode/utrans.h:22:
In file included from /opt/homebrew/opt/icu4c/include/unicode/uenum.h:25:
/opt/homebrew/opt/icu4c/include/unicode/localpointer.h:71:51: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    static void* U_EXPORT2 operator new(size_t) = delete;
                                                  ^
/opt/homebrew/opt/icu4c/include/unicode/localpointer.h:72:53: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    static void* U_EXPORT2 operator new[](size_t) = delete;
                                                    ^
/opt/homebrew/opt/icu4c/include/unicode/localpointer.h:74:58: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    static void* U_EXPORT2 operator new(size_t, void*) = delete;
                                                         ^
/opt/homebrew/opt/icu4c/include/unicode/localpointer.h:224:34: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
    LocalPointer(LocalPointer<T> &&src) noexcept : LocalPointerBase<T>(src.ptr) {
                                 ^
/opt/homebrew/opt/icu4c/include/unicode/localpointer.h:224:40: error: expected ';' at end of declaration list
    LocalPointer(LocalPointer<T> &&src) noexcept : LocalPointerBase<T>(src.ptr) {
                                       ^
                                       ;
/opt/homebrew/opt/icu4c/include/unicode/localpointer.h:399:30: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
    LocalArray(LocalArray<T> &&src) noexcept : LocalPointerBase<T>(src.ptr) {
                             ^
/opt/homebrew/opt/icu4c/include/unicode/localpointer.h:399:36: error: expected ';' at end of declaration list
    LocalArray(LocalArray<T> &&src) noexcept : LocalPointerBase<T>(src.ptr) {
                                   ^
                                   ;
In file included from transliterator.cpp:5:
In file included from /opt/homebrew/opt/icu4c/include/unicode/translit.h:29:
In file included from /opt/homebrew/opt/icu4c/include/unicode/utrans.h:22:
/opt/homebrew/opt/icu4c/include/unicode/uenum.h:69:1: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
U_DEFINE_LOCAL_OPEN_POINTER(LocalUEnumerationPointer, UEnumeration, uenum_close);
^
/opt/homebrew/opt/icu4c/include/unicode/localpointer.h:556:53: note: expanded from macro 'U_DEFINE_LOCAL_OPEN_POINTER'
        LocalPointerClassName(LocalPointerClassName &&src) noexcept \
                                                    ^
In file included from transliterator.cpp:5:
In file included from /opt/homebrew/opt/icu4c/include/unicode/translit.h:29:
In file included from /opt/homebrew/opt/icu4c/include/unicode/utrans.h:22:
/opt/homebrew/opt/icu4c/include/unicode/uenum.h:69:1: error: expected ';' at end of declaration list
/opt/homebrew/opt/icu4c/include/unicode/localpointer.h:556:60: note: expanded from macro 'U_DEFINE_LOCAL_OPEN_POINTER'
        LocalPointerClassName(LocalPointerClassName &&src) noexcept \
                                                           ^
In file included from transliterator.cpp:5:
In file included from /opt/homebrew/opt/icu4c/include/unicode/translit.h:29:
In file included from /opt/homebrew/opt/icu4c/include/unicode/utrans.h:23:
/opt/homebrew/opt/icu4c/include/unicode/uset.h:360:1: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
U_DEFINE_LOCAL_OPEN_POINTER(LocalUSetPointer, USet, uset_close);
^
/opt/homebrew/opt/icu4c/include/unicode/localpointer.h:556:53: note: expanded from macro 'U_DEFINE_LOCAL_OPEN_POINTER'
        LocalPointerClassName(LocalPointerClassName &&src) noexcept \
                                                    ^
In file included from transliterator.cpp:5:
In file included from /opt/homebrew/opt/icu4c/include/unicode/translit.h:29:
In file included from /opt/homebrew/opt/icu4c/include/unicode/utrans.h:23:
/opt/homebrew/opt/icu4c/include/unicode/uset.h:360:1: error: expected ';' at end of declaration list
/opt/homebrew/opt/icu4c/include/unicode/localpointer.h:556:60: note: expanded from macro 'U_DEFINE_LOCAL_OPEN_POINTER'
        LocalPointerClassName(LocalPointerClassName &&src) noexcept \
                                                           ^
In file included from transliterator.cpp:5:
In file included from /opt/homebrew/opt/icu4c/include/unicode/translit.h:29:
/opt/homebrew/opt/icu4c/include/unicode/utrans.h:258:1: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
U_DEFINE_LOCAL_OPEN_POINTER(LocalUTransliteratorPointer, UTransliterator, utrans_close);
^
/opt/homebrew/opt/icu4c/include/unicode/localpointer.h:556:53: note: expanded from macro 'U_DEFINE_LOCAL_OPEN_POINTER'
        LocalPointerClassName(LocalPointerClassName &&src) noexcept \
                                                    ^
In file included from transliterator.cpp:5:
In file included from /opt/homebrew/opt/icu4c/include/unicode/translit.h:29:
/opt/homebrew/opt/icu4c/include/unicode/utrans.h:258:1: error: expected ';' at end of declaration list
/opt/homebrew/opt/icu4c/include/unicode/localpointer.h:556:60: note: expanded from macro 'U_DEFINE_LOCAL_OPEN_POINTER'
        LocalPointerClassName(LocalPointerClassName &&src) noexcept \
                                                           ^
In file included from transliterator.cpp:5:
/opt/homebrew/opt/icu4c/include/unicode/translit.h:1530:52: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
    virtual UClassID getDynamicClassID(void) const override = 0;
                                                   ^
36 warnings and 19 errors generated.
make: *** [transliterator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/me/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/charlock_holmes-0.7.8 for inspection.
Results logged to /Users/me/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/extensions/arm64-darwin-23/3.3.0/charlock_holmes-0.7.8/gem_make.out

0.7.7 appears to be fine but 0.7.8 causes this issue. After a few attempts to fix it I just pinned our Gemfile with version 0.7.7.

@stephenbinns
Copy link

Belive this is related to the change made here - #174 I'm seeing similar issues on OSX as the flags aren't set by default.

If you have installed icu4c via homebrew you can configure bundle to pass the cxxflags like so

bundle config build.charlock_holmes --with-icu-dir=$(brew --prefix icu4c) --with-cxxflags=-std=c++11 

However it would be nice if this worked out of the box like 0.7.7 did

@em1l1o
Copy link

em1l1o commented Jul 5, 2024

I'm having the same issue with Sonoma (14.5) installing 0.7.8 after upgrading ruby version to 3.3.3. However, it didn't work for me even with -std=c++11 in cxxflags.

Literally tried everything in #122 , but nothing worked for me. It always ended up with the same output.

My icu4c version 74.2

Building native extensions with: '--with-icu-dir=/usr/local/opt/icu4c --with-cxxflags=-std=c++11'
This could take a while...
ERROR:  Error installing charlock_holmes:
	ERROR: Failed to build gem native extension.
current directory: /Users/emiliochang/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/charlock_holmes-0.7.8/ext/charlock_holmes
/Users/emiliochang/.rbenv/versions/3.3.3/bin/ruby extconf.rb --with-icu-dir\=/usr/local/opt/icu4c --with-cxxflags\=-std\=c++11
checking for pkg-config for icu-i18n... ["-I/usr/local/Cellar/icu4c/74.2/include ", "-L/usr/local/Cellar/icu4c/74.2/lib", "-licui18n -licuuc -licudata"]
checking for pkg-config for icu-io... ["-I/usr/local/Cellar/icu4c/74.2/include ", "-L/usr/local/Cellar/icu4c/74.2/lib", "-licuio -licui18n -licuuc -licudata"]
checking for pkg-config for icu-uc... ["-I/usr/local/Cellar/icu4c/74.2/include ", "-L/usr/local/Cellar/icu4c/74.2/lib", "-licuuc -licudata"]
checking for -licui18n... yes
checking for unicode/ucnv.h... yes
checking for -lz... yes
checking for -licuuc... yes
checking for -licudata... yes
creating Makefile

current directory: /Users/emiliochang/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/charlock_holmes-0.7.8/ext/charlock_holmes
make DESTDIR\= sitearchdir\=./.gem.20240705-37173-bpsoip sitelibdir\=./.gem.20240705-37173-bpsoip clean

current directory: /Users/emiliochang/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/charlock_holmes-0.7.8/ext/charlock_holmes
make DESTDIR\= sitearchdir\=./.gem.20240705-37173-bpsoip sitelibdir\=./.gem.20240705-37173-bpsoip
compiling converter.c
converter.c:23:12: warning: implicit conversion loses integer precision: 'long' to 'int32_t' (aka 'int') [-Wshorten-64-to-32]
        src_len = RSTRING_LEN(rb_txt);
                ~ ^~~~~~~~~~~~~~~~~~~
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/core/rstring.h:46:27: note: expanded from macro 'RSTRING_LEN'
#define RSTRING_LEN       RSTRING_LEN
                          ^
1 warning generated.
compiling encoding_detector.c
encoding_detector.c:183:71: warning: implicit conversion loses integer precision: 'long' to 'int32_t' (aka 'int') [-Wshorten-64-to-32]
                ucsdet_setDeclaredEncoding(detector->csd, RSTRING_PTR(rb_enc_hint), RSTRING_LEN(rb_enc_hint), &status);
                ~~~~~~~~~~~~~~~~~~~~~~~~~~                                          ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/core/rstring.h:46:27: note: expanded from macro 'RSTRING_LEN'
#define RSTRING_LEN       RSTRING_LEN
                          ^
encoding_detector.c:232:71: warning: implicit conversion loses integer precision: 'long' to 'int32_t' (aka 'int') [-Wshorten-64-to-32]
                ucsdet_setDeclaredEncoding(detector->csd, RSTRING_PTR(rb_enc_hint), RSTRING_LEN(rb_enc_hint), &status);
                ~~~~~~~~~~~~~~~~~~~~~~~~~~                                          ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/core/rstring.h:46:27: note: expanded from macro 'RSTRING_LEN'
#define RSTRING_LEN       RSTRING_LEN
                          ^
2 warnings generated.
compiling ext.c
compiling transliterator.cpp
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/ruby.h:25:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/defines.h:73:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/backward/2/attributes.h:43:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/attr/pure.h:25:
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/assert.h:132:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN'
# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
                                ^
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/ruby.h:27:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/anyargs.h:77:
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/intern/vm.h:379:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN'
# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
                                ^
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/ruby.h:27:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/anyargs.h:83:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/backward/cxxanyargs.hpp:15:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/intern/cont.h:25:
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/iterator.h:485:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN'
# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
                                ^
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/ruby.h:27:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/anyargs.h:83:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/backward/cxxanyargs.hpp:15:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/intern/cont.h:25:
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/iterator.h:499:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN'
# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
                                ^
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/ruby.h:27:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/anyargs.h:83:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/backward/cxxanyargs.hpp:24:
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/variable.h:130:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN'
# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
                                ^
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/ruby.h:28:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic.h:24:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic/char.h:23:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic/int.h:26:
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic/long.h:70:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN'
# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
                                ^
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/ruby.h:28:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic.h:24:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/core/rstring.h:28:
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/core/rbasic.h:95:5: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
    RBIMPL_ATTR_NOALIAS()
    ^
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/attr/noalias.h:64:32: note: expanded from macro 'RBIMPL_ATTR_NOALIAS'
# define RBIMPL_ATTR_NOALIAS() __declspec(noalias)
                               ^
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/ruby.h:28:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic.h:24:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/core/rstring.h:30:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/fl_type.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/value_type.h:33:
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/error.h:98:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN'
# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
                                ^
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/ruby.h:28:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic.h:24:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/core/rstring.h:30:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/fl_type.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/value_type.h:33:
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/error.h:115:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN'
# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
                                ^
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/ruby.h:28:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic.h:24:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/core/rstring.h:30:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/fl_type.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/value_type.h:33:
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/error.h:130:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN'
# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
                                ^
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/ruby.h:28:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic.h:24:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/core/rstring.h:30:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/fl_type.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/value_type.h:33:
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/error.h:151:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN'
# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
                                ^
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/ruby.h:28:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic.h:24:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/core/rstring.h:30:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/fl_type.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/value_type.h:33:
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/error.h:163:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN'
# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
                                ^
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/ruby.h:28:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic.h:24:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/core/rstring.h:30:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/fl_type.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/value_type.h:33:
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/error.h:188:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN'
# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
                                ^
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/ruby.h:28:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic.h:24:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/core/rstring.h:30:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/fl_type.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/value_type.h:33:
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/error.h:199:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN'
# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
                                ^
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/ruby.h:28:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic.h:24:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/core/rstring.h:30:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/fl_type.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/value_type.h:33:
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/error.h:216:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN'
# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
                                ^
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/ruby.h:28:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic.h:24:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/core/rstring.h:30:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/fl_type.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/value_type.h:33:
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/error.h:228:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN'
# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
                                ^
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/ruby.h:28:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic.h:24:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/core/rstring.h:30:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/fl_type.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/value_type.h:33:
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/error.h:248:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN'
# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
                                ^
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/ruby.h:28:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic.h:24:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/core/rstring.h:30:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/fl_type.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/value_type.h:33:
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/error.h:260:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN'
# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
                                ^
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/ruby.h:28:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic.h:24:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/arithmetic/char.h:29:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/core/rstring.h:30:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/fl_type.h:38:
In file included from /Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/value_type.h:33:
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/error.h:299:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
RBIMPL_ATTR_NORETURN()
^
/Users/emiliochang/.rbenv/versions/3.3.3/include/ruby-3.3.0/ruby/internal/attr/noreturn.h:29:33: note: expanded from macro 'RBIMPL_ATTR_NORETURN'
# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
                                ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [transliterator.o] Error 1

make failed, exit code 2

stanhu added a commit to stanhu/charlock_holmes that referenced this issue Jul 9, 2024
clang requires manually enabling C++ extensions via
`-std=c++<version>`, and ICU 75.1 needs C++17. Auto-detect the flags
that are needed to build.

Relates to brianmario#172

Closes brianmario#177
@stanhu
Copy link
Contributor

stanhu commented Jul 9, 2024

I think #179 solves this.

@alexrogers
Copy link

I'm having the same issue with Sonoma (14.5) installing 0.7.8 after upgrading ruby version to 3.3.3. However, it didn't work for me even with -std=c++11 in cxxflags.

exact same issue as @em1l1o for me except Ruby 3.3.1. I'm able to get 0.7.7 installed with gem install charlock_holmes -v '0.7.7' -- --with-icu-dir=/usr/local/opt/icu4c but no matter how i pass in c++11 (or 17 flags) the error remains the same.

@stanhu
Copy link
Contributor

stanhu commented Jul 9, 2024

The error from the logs above:

error: '__declspec' attributes are not enabled

This seems related to https://bugs.ruby-lang.org/issues/18616 with a workaround in ruby/ruby@0958e19.

What happens if you run irb and RbConfig::CONFIG['CFLAGS']? You should see -fdeclspec in the list:

irb(main):001> RbConfig::CONFIG['CFLAGS']
=> "-fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wundef  -fno-common -pipe"
irb(main):002> RbConfig::CONFIG['CXXFLAGS']
=> "-fdeclspec"
irb(main):003> RbConfig::CONFIG['CC']
=> "clang"
irb(main):004> RbConfig::CONFIG['CXX']
=> "clang++"

@stanhu
Copy link
Contributor

stanhu commented Jul 9, 2024

Also you can try installing static_holmes and see if that resolves your issue: #163 (comment)

@joshuapinter
Copy link
Author

@stanhu Here are my outputs in IRB:

irb(main):001> RbConfig::CONFIG['CFLAGS']
=> "-fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wmisleading-indentation -Wundef -fno-common -pipe"
irb(main):002> RbConfig::CONFIG['CXXFLAGS']
=> "-fdeclspec"
irb(main):003> RbConfig::CONFIG['CC']
=> "clang"
irb(main):004> RbConfig::CONFIG['CXX']
=> "clang++"

I don't think it matters, but this is with my Gemfile pinned to 0.7.7.

@stanhu
Copy link
Contributor

stanhu commented Jul 9, 2024

@joshuapinter Ok, can you try running gem install static_holmes to see if that builds? If that's the case then #179 would solve your issue.

@em1l1o
Copy link

em1l1o commented Jul 9, 2024

@alexrogers
My problem solved by reinstalling and upgrading xcode command tool.
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
softwareupdate --all --install --force

@joshuapinter
Copy link
Author

@tenderlove Thanks for merging the fix for this. Any idea when a new Release/Tag will be made?

@tenderlove
Copy link
Collaborator

@joshuapinter I just shipped it, so it should be out now.

@joshuapinter
Copy link
Author

@tenderlove You the man. Just installed it and it worked perfectly. Thanks again. 🙏

@alexrogers
Copy link

thanks everyone for your help gem install charlock_holmes -- --with-icu-dir=/usr/local/opt/icu4c worked just fine on 0.7.9

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 a pull request may close this issue.

6 participants