~/Developer/localhost/discourse على master sudo gem install cppjieba_rb -v '0.3.3' --source 'https://rubygems.org/' في 17:13:33
كلمة المرور:
جاري بناء امتدادات أصلية. قد يستغرق هذا بعض الوقت...
خطأ: خطأ أثناء تثبيت cppjieba_rb:
خطأ: فشل في بناء امتداد gem الأصلي.
الدليل الحالي: /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20191021-73798-k500fk.rb extconf.rb
جاري إنشاء Makefile
الدليل الحالي: /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb
make "DESTDIR=" clean
الدليل الحالي: /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb
make "DESTDIR="
جاري تجميع cppjieba_rb.c
جاري تجميع internal.cc
مضمن في internal.cc:1:
مضمن في /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
مضمن في /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h:413:31: خطأ: بادئة غير صالحة للحرف؛ يتطلب C++11 وجود مسافة بين الحرف والمعرف [-Wreserved-user-defined-literal]
#define RUBY_ARCH "universal-"RUBY_PLATFORM_OS
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h:414:35: خطأ: بادئة غير صالحة للحرف؛ يتطلب C++11 وجود مسافة بين الحرف والمعرف [-Wreserved-user-defined-literal]
#define RUBY_PLATFORM "universal."RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h:414:55: خطأ: بادئة غير صالحة للحرف؛ يتطلب C++11 وجود مسافة بين الحرف والمعرف [-Wreserved-user-defined-literal]
#define RUBY_PLATFORM "universal."RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS
^
مضمن في internal.cc:1:
مضمن في /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
مضمن في /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:2111:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/intern.h:56:19: تحذير: محدد فئة التخزين 'register' قديم وغير متوافق مع C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/intern.h:56:36: تحذير: محدد فئة التخزين 'register' قديم وغير متوافق مع C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
^~~~~~~~~
مضمن في internal.cc:8:
مضمن في /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/Jieba.hpp:4:
مضمن في /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/QuerySegment.hpp:8:
مضمن في /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/DictTrie.hpp:13:
/Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/deps/limonp/StringUtil.hpp:87:70: تحذير: 'ptr_fun<unsigned int, bool>' قديم [-Wdeprecated-declarations]
s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace))));
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1097:1: ملاحظة: تم تحديد 'ptr_fun<unsigned int, bool>' على أنه قديم صراحة هنا
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1101:39: ملاحظة: تم توسيع الماكرو '_LIBCPP_DEPRECATED_IN_CXX11'
# define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1090:48: ملاحظة: تم توسيع الماكرو '_LIBCPP_DEPRECATED'
# define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
^
مضمن في internal.cc:8:
مضمن في /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/Jieba.hpp:4:
مضمن في /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/QuerySegment.hpp:8:
مضمن في /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/DictTrie.hpp:13:
/Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/deps/limonp/StringUtil.hpp:92:61: تحذير: 'ptr_fun<unsigned int, bool>' قديم [-Wdeprecated-declarations]
s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace))).base(), s.end());
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1097:1: ملاحظة: تم تحديد 'ptr_fun<unsigned int, bool>' على أنه قديم صراحة هنا
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1101:39: ملاحظة: تم توسيع الماكرو '_LIBCPP_DEPRECATED_IN_CXX11'
# define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1090:48: ملاحظة: تم توسيع الماكرو '_LIBCPP_DEPRECATED'
# define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
^
مضمن في internal.cc:8:
مضمن في /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/Jieba.hpp:4:
مضمن في /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/QuerySegment.hpp:8:
مضمن في /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/DictTrie.hpp:13:
/Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/deps/limonp/StringUtil.hpp:101:70: تحذير: 'bind2nd<std::__1::equal_to<char>, char>' قديم [-Wdeprecated-declarations]
s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::bind2nd(std::equal_to<char>(), x))));
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1079:1: ملاحظة: تم تحديد 'bind2nd<std::__1::equal_to<char>, char>' على أنه قديم صراحة هنا
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1101:39: ملاحظة: تم توسيع الماكرو '_LIBCPP_DEPRECATED_IN_CXX11'
# define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1090:48: ملاحظة: تم توسيع الماكرو '_LIBCPP_DEPRECATED'
# define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
^
مضمن في internal.cc:8:
مضمن في /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/Jieba.hpp:4:
مضمن في /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/QuerySegment.hpp:8:
مضمن في /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/DictTrie.hpp:13:
/Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/deps/limonp/StringUtil.hpp:106:61: تحذير: 'bind2nd<std::__1::equal_to<char>, char>' قديم [-Wdeprecated-declarations]
s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::bind2nd(std::equal_to<char>(), x))).base(), s.end());
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1079:1: ملاحظة: تم تحديد 'bind2nd<std::__1::equal_to<char>, char>' على أنه قديم صراحة هنا
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1101:39: ملاحظة: تم توسيع الماكرو '_LIBCPP_DEPRECATED_IN_CXX11'
# define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1090:48: ملاحظة: تم توسيع الماكرو '_LIBCPP_DEPRECATED'
# define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
^
تم إنشاء 6 تحذيرات و 3 أخطاء.
make: *** [internal.o] خطأ 1
فشل الأمر make، رمز الخروج 2
ستبقى ملفات Gem مثبتة في /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3 للفحص.
تم تسجيل النتائج في /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/cppjieba_rb-0.3.3/gem_make.out
تم إعداد بيئة التطوير الخاصة بي منذ فترة طويلة، لذا لست متأكدًا. لا أظن أنني قمت بأي شيء إضافي في ذلك الوقت، لكن ربما تغير شيء ما في macOS منذ ذلك الحين.
أعتقد أنه يمكنك التحقق مما إذا كان rbenv مُعدًا… إذا قمت بتشغيل nano ~/.bash_profile، فستظهر لك شيئًا مثل هذا:
يمكنك أيضًا التحقق من rbenv versions لمعرفة الإصدار المحدد حاليًا (هو الإصدار الذي يحتوي على نجمة بجانبه). إذا كان system، فستحتاج إلى تغييره… الإصدار 2.6.1 يعمل بشكل جيد بالنسبة لي. (rbenv install 2.6.1 ثم rbenv global 2.6.1)