ruby Eventmachine 1.2.7拒绝在Mac上安装m2 ventura 13.2.1

rur96b6h  于 2023-04-05  发布在  Ruby
关注(0)|答案(1)|浏览(90)

Ruby的事件机器gem正在尝试安装,但失败了,并显示以下日志文件。我已经尝试了我在网上看到的所有方法,例如链接openssl并使用附加的路径运行安装(我想这就是我所做的)我认为问题是我试图将其作为一个更大的应用程序牛肉的一部分安装,现在它已经搞砸了目录,因为在rvm/ruby文件夹中有多个ruby-3.0.3目录,如ruby-3.0.3@beef

urrent directory: /Users/pkladogenis/.rvm/gems/ruby-3.0.3/gems/eventmachine-1.2.7/ext
/Users/pkladogenis/.rvm/rubies/ruby-3.0.3/bin/ruby -I /Users/pkladogenis/.rvm/rubies/ruby-3.0.3/lib/ruby/3.0.0 -r ./siteconf20230322-23642-j44qsr.rb extconf.rb --with-cppflags\=-I/usr/local/opt/openssl/include
-----
Using OpenSSL from pkg-config -I/opt/homebrew/Cellar/openssl@3/3.1.0/include  && -L/opt/homebrew/Cellar/openssl@3/3.1.0/lib && -lssl -lcrypto
-----
checking for -lcrypto... yes
checking for -lssl... yes
checking for openssl/ssl.h... yes
checking for openssl/err.h... yes
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_fd_select()... yes
checking for rb_fdset_t in ruby/intern.h... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for pipe2() in unistd.h... no
checking for accept4() in sys/socket.h... no
checking for SOCK_CLOEXEC in sys/socket.h... no
checking for sys/event.h... yes
checking for sys/queue.h... yes
checking for clock_gettime()... yes
checking for CLOCK_MONOTONIC_RAW in time.h... yes
checking for CLOCK_MONOTONIC in time.h... yes
CXXFLAGS= -Wall -Wextra -Wno-deprecated-declarations -Wno-ignored-qualifiers -Wno-unused-result -Wno-address
creating Makefile

current directory: /Users/pkladogenis/.rvm/gems/ruby-3.0.3/gems/eventmachine-1.2.7/ext
make DESTDIR\= clean

current directory: /Users/pkladogenis/.rvm/gems/ruby-3.0.3/gems/eventmachine-1.2.7/ext
make DESTDIR\=
compiling binder.cpp
compiling cmain.cpp
compiling ed.cpp
compiling em.cpp
em.cpp:2119:3: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
                sprintf(errbuf, "failed to register file watch descriptor with kqueue: %s", strerror(errno));
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
em.cpp:2186:3: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
                sprintf(errbuf, "error registering file %s for watching: %s", fpath, strerror(errno));
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
em.cpp:2214:3: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
                sprintf(errbuf, "failed to open file %s for registering with kqueue: %s", fpath, strerror(errno));
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
em.cpp:2365:3: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
                sprintf(errbuf, "failed to register file watch descriptor with kqueue: %s", strerror(errno));
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
4 warnings generated.
compiling kb.cpp
compiling page.cpp
compiling pipe.cpp
compiling rubymain.cpp
rubymain.cpp:220:3: warning: 'rb_rescue' is deprecated: Use of ANYARGS in this function is deprecated [-Wdeprecated-declarations]
                rb_rescue((VALUE (*)(ANYARGS))event_callback, (VALUE)&e, (VALUE (*)(ANYARGS))event_error_handler, Qnil);
                ^
/Users/pkladogenis/.rvm/rubies/ruby-3.0.3/include/ruby-3.0.0/ruby/backward/cxxanyargs.hpp:244:1: note: 'rb_rescue' has been explicitly marked deprecated here
RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
^
/Users/pkladogenis/.rvm/rubies/ruby-3.0.3/include/ruby-3.0.0/ruby/backward/2/attributes.h:79:35: note: expanded from macro 'RUBY_CXX_DEPRECATED'
#define RUBY_CXX_DEPRECATED(mseg) RBIMPL_ATTR_DEPRECATED((mseg))
                                  ^
/Users/pkladogenis/.rvm/rubies/ruby-3.0.3/include/ruby-3.0.0/ruby/internal/attr/deprecated.h:32:53: note: expanded from macro 'RBIMPL_ATTR_DEPRECATED'
# define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg))
                                                    ^
1 warning generated.
compiling ssl.cpp
ssl.cpp:216:9: warning: 'PEM_read_bio_DHparams' is deprecated [-Wdeprecated-declarations]
                        dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
                             ^
/opt/homebrew/Cellar/openssl@3/3.1.0/include/openssl/pem.h:472:21: note: 'PEM_read_bio_DHparams' has been explicitly marked deprecated here
DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, DHparams, DH)
                    ^
/opt/homebrew/Cellar/openssl@3/3.1.0/include/openssl/macros.h:193:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
#   define OSSL_DEPRECATEDIN_3_0                OSSL_DEPRECATED(3.0)
                                                ^
/opt/homebrew/Cellar/openssl@3/3.1.0/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
#     define OSSL_DEPRECATED(since) __attribute__((deprecated))
                                                   ^
ssl.cpp:227:4: warning: 'DH_free' is deprecated [-Wdeprecated-declarations]
                        DH_free(dh);
                        ^
/opt/homebrew/Cellar/openssl@3/3.1.0/include/openssl/dh.h:203:1: note: 'DH_free' has been explicitly marked deprecated here
OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
^
/opt/homebrew/Cellar/openssl@3/3.1.0/include/openssl/macros.h:193:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
#   define OSSL_DEPRECATEDIN_3_0                OSSL_DEPRECATED(3.0)
                                                ^
/opt/homebrew/Cellar/openssl@3/3.1.0/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
#     define OSSL_DEPRECATED(since) __attribute__((deprecated))
                                                   ^
ssl.cpp:243:12: warning: 'EC_KEY_new_by_curve_name' is deprecated [-Wdeprecated-declarations]
                                ecdh = EC_KEY_new_by_curve_name(nid);
                                       ^
/opt/homebrew/Cellar/openssl@3/3.1.0/include/openssl/ec.h:1001:1: note: 'EC_KEY_new_by_curve_name' has been explicitly marked deprecated here
OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_by_curve_name(int nid);
^
/opt/homebrew/Cellar/openssl@3/3.1.0/include/openssl/macros.h:193:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
#   define OSSL_DEPRECATEDIN_3_0                OSSL_DEPRECATED(3.0)
                                                ^
/opt/homebrew/Cellar/openssl@3/3.1.0/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
#     define OSSL_DEPRECATED(since) __attribute__((deprecated))
                                                   ^
ssl.cpp:254:5: warning: 'EC_KEY_free' is deprecated [-Wdeprecated-declarations]
                                EC_KEY_free(ecdh);
                                ^
/opt/homebrew/Cellar/openssl@3/3.1.0/include/openssl/ec.h:1006:1: note: 'EC_KEY_free' has been explicitly marked deprecated here
OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
^
/opt/homebrew/Cellar/openssl@3/3.1.0/include/openssl/macros.h:193:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
#   define OSSL_DEPRECATEDIN_3_0                OSSL_DEPRECATED(3.0)
                                                ^
/opt/homebrew/Cellar/openssl@3/3.1.0/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
#     define OSSL_DEPRECATED(since) __attribute__((deprecated))
                                                   ^
4 warnings generated.
linking shared-object rubyeventmachine.bundle
Undefined symbols for architecture arm64:
  "_SSL_get1_peer_certificate", referenced from:
      SslBox_t::GetPeerCert() in ssl.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [rubyeventmachine.bundle] Error 1

make failed, exit code 2

I Have tried linking the openssl with brew and it did but it didn't seem to fix anything
nx7onnlm

nx7onnlm1#

我在Mac m2 ventura 13.2.1上遇到了同样的问题。
看起来你有openssl@3但是需要openssl@1.1 .所以,下面的命令可能会有帮助:

brew uninstall openssl@3
brew install openssl@1.1

相关问题