From: "Gloomy_meng (Gloomy Meng)" Date: 2022-06-24T03:29:43+00:00 Subject: [ruby-core:109045] [Ruby master Bug#18876] OpenSSL is not available with `--with-openssl-dir` Issue #18876 has been updated by Gloomy_meng (Gloomy Meng). my local version is 3.1.1 too, and run `ruby -v` , got `ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x86_64-darwin20]`. and i tried some different version with add `RUBYOPT=-v` and `RUBYOPT=-vd` to make a comparison. ---- with 3.1.1 and `-vd` ``` shell [11:26:11] [Gems] destroot/bundle/bin/bundle-env gem install cocoapods --version="1.11.3" --no-document --env-shebang ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x86_64-darwin21] Exception `LoadError' at /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems.rb:1323 - cannot load such file -- rubygems/defaults/operating_system Exception `LoadError' at /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems.rb:1339 - cannot load such file -- rubygems/defaults/ruby Exception `NameError' at /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/3.1.0/psych/class_loader.rb:70 - uninitialized constant BigDecimal [val, ::Object.const_get(val)] ^^^^^^^^^^ Exception `NameError' at /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/3.1.0/psych/class_loader.rb:70 - uninitialized constant Date [val, ::Object.const_get(val)] ^^^^^^^^^^ Exception `NameError' at /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/3.1.0/psych/class_loader.rb:70 - uninitialized constant DateTime [val, ::Object.const_get(val)] ^^^^^^^^^^ Exception `SyntaxError' at /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/3.1.0/forwardable/impl.rb:4 - : syntax error, unexpected end-of-input ().load_tags= ^ Exception `SyntaxError' at /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/3.1.0/forwardable/impl.rb:4 - : syntax error, unexpected end-of-input ().dump_tags= ^ Exception `SyntaxError' at /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/3.1.0/forwardable/impl.rb:4 - : syntax error, unexpected end-of-input ().domain_types= ^ Exception `Gem::Exception' at /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/request.rb:47 - OpenSSL is not available. Install OpenSSL and rebuild Ruby (preferred) or use non-HTTPS sources ERROR: While executing gem ... (Gem::Exception) OpenSSL is not available. Install OpenSSL and rebuild Ruby (preferred) or use non-HTTPS sources /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/request.rb:47:in `configure_connection_for_https' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/request/https_pool.rb:6:in `setup_connection' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/request/http_pool.rb:39:in `make_connection' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/request/http_pool.rb:20:in `checkout' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/request.rb:129:in `connection_for' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/request.rb:188:in `perform_request' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/request.rb:154:in `fetch' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/remote_fetcher.rb:309:in `request' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/remote_fetcher.rb:209:in `fetch_http' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/remote_fetcher.rb:248:in `fetch_path' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/source.rb:95:in `dependency_resolver_set' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/resolver/best_set.rb:23:in `block in pick_sets' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/source_list.rb:98:in `each' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/source_list.rb:98:in `each_source' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/resolver/best_set.rb:22:in `pick_sets' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/resolver/best_set.rb:28:in `find_all' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/resolver/installer_set.rb:175:in `find_all' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/resolver/installer_set.rb:61:in `add_always_install' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/dependency_installer.rb:322:in `resolve_dependencies' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/commands/install_command.rb:201:in `install_gem' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/commands/install_command.rb:226:in `block in install_gems' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/commands/install_command.rb:219:in `each' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/commands/install_command.rb:219:in `install_gems' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/commands/install_command.rb:167:in `execute' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/command.rb:323:in `invoke_with_build_args' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/command_manager.rb:185:in `process_args' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/command_manager.rb:149:in `run' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/gem_runner.rb:53:in `run' /Users/didi/Documents/CocoaPods-app3.1.1/destroot/bundle/bin/gem:13:in `
' Finished in 12 minutes and 18 seconds ``` ---- with 3.1.0 and `-v` ``` shell [11:05:45] [Gems] destroot/bundle/bin/bundle-env gem install cocoapods --version="1.11.3" --no-document --env-shebang ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [x86_64-darwin21] ERROR: While executing gem ... (Gem::Exception) OpenSSL is not available. Install OpenSSL and rebuild Ruby (preferred) or use non-HTTPS sources ``` with 3.1.0 and `-vd` ``` shell [11:26:26] [Gems] destroot/bundle/bin/bundle-env gem install cocoapods --version="1.11.3" --no-document --env-shebang ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [x86_64-darwin21] Exception `LoadError' at /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems.rb:1323 - cannot load such file -- rubygems/defaults/operating_system Exception `LoadError' at /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems.rb:1339 - cannot load such file -- rubygems/defaults/ruby Exception `NameError' at /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/3.1.0/psych/class_loader.rb:70 - uninitialized constant BigDecimal [val, ::Object.const_get(val)] ^^^^^^^^^^ Exception `NameError' at /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/3.1.0/psych/class_loader.rb:70 - uninitialized constant Date [val, ::Object.const_get(val)] ^^^^^^^^^^ Exception `NameError' at /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/3.1.0/psych/class_loader.rb:70 - uninitialized constant DateTime [val, ::Object.const_get(val)] ^^^^^^^^^^ Exception `SyntaxError' at /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/3.1.0/forwardable/impl.rb:4 - : syntax error, unexpected end-of-input ().load_tags= ^ Exception `SyntaxError' at /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/3.1.0/forwardable/impl.rb:4 - : syntax error, unexpected end-of-input ().dump_tags= ^ Exception `SyntaxError' at /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/3.1.0/forwardable/impl.rb:4 - : syntax error, unexpected end-of-input ().domain_types= ^ Exception `Gem::Exception' at /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/request.rb:47 - OpenSSL is not available. Install OpenSSL and rebuild Ruby (preferred) or use non-HTTPS sources ERROR: While executing gem ... (Gem::Exception) OpenSSL is not available. Install OpenSSL and rebuild Ruby (preferred) or use non-HTTPS sources /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/request.rb:47:in `configure_connection_for_https' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/request/https_pool.rb:6:in `setup_connection' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/request/http_pool.rb:39:in `make_connection' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/request/http_pool.rb:20:in `checkout' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/request.rb:129:in `connection_for' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/request.rb:188:in `perform_request' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/request.rb:154:in `fetch' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/remote_fetcher.rb:309:in `request' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/remote_fetcher.rb:209:in `fetch_http' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/remote_fetcher.rb:248:in `fetch_path' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/source.rb:95:in `dependency_resolver_set' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/resolver/best_set.rb:23:in `block in pick_sets' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/source_list.rb:98:in `each' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/source_list.rb:98:in `each_source' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/resolver/best_set.rb:22:in `pick_sets' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/resolver/best_set.rb:28:in `find_all' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/resolver/installer_set.rb:175:in `find_all' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/resolver/installer_set.rb:61:in `add_always_install' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/dependency_installer.rb:322:in `resolve_dependencies' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/commands/install_command.rb:201:in `install_gem' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/commands/install_command.rb:226:in `block in install_gems' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/commands/install_command.rb:219:in `each' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/commands/install_command.rb:219:in `install_gems' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/commands/install_command.rb:167:in `execute' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/command.rb:323:in `invoke_with_build_args' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/command_manager.rb:185:in `process_args' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/command_manager.rb:149:in `run' /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/site_ruby/3.1.0/rubygems/gem_runner.rb:53:in `run' /Users/didi/Documents/CocoaPods-app/destroot/bundle/bin/gem:28:in `
' Finished in 2 minutes and 42 seconds `` --- my local version is 3.1.1 too, so i tried with 3.0.3 and 3.1.0 version for your suggestion. ----- with add `RUBYOPT=-v` and version is 3.0.3 when run ``` shell destroot/bundle/bin/bundle-env gem install downloads/rubygems-update-3.3.15.gem --no-document --env-shebang ``` i got error with this ``` ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x86_64-darwin21] Exception `LoadError' at /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/3.0.0/rubygems.rb:1332 - cannot load such file -- rubygems/defaults/ruby Exception `LoadError' at :85 - cannot load such file -- rubygems/defaults/operating_system Exception `LoadError' at :162 - cannot load such file -- rubygems/defaults/operating_system Exception `NameError' at /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/3.0.0/psych/class_loader.rb:70 - uninitialized constant BigDecimal Exception `NameError' at /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/3.0.0/psych/class_loader.rb:70 - uninitialized constant Date Exception `NameError' at /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/3.0.0/psych/class_loader.rb:70 - uninitialized constant DateTime Exception `SyntaxError' at /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/3.0.0/forwardable/impl.rb:4 - : syntax error, unexpected end-of-input Exception `SyntaxError' at /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/3.0.0/forwardable/impl.rb:4 - : syntax error, unexpected end-of-input Exception `SyntaxError' at /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/3.0.0/forwardable/impl.rb:4 - : syntax error, unexpected end-of-input Exception `Gem::MissingSpecError' at /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/3.0.0/rubygems/dependency.rb:311 - Gem::MissingSpecError Exception `Gem::MissingSpecError' at /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/3.0.0/rubygems/specification.rb:1402 - Gem::MissingSpecError Exception `Gem::MissingSpecError' at :76 - Gem::MissingSpecError Exception `Gem::MissingSpecError' at :162 - Gem::MissingSpecError Exception `Gem::MissingSpecError' at :162 - Gem::MissingSpecError Exception `NameError' at /Users/didi/Documents/CocoaPods-app/destroot/bundle/lib/ruby/3.0.0/rubygems/command_manager.rb:225 - uninitialized constant Gem::Commands::InstallCommand Did you mean? Gem::InstallUpdateOptions ERROR: Loading command: install (Gem::MissingSpecError) ``` ---- with add `RUBYOPT=-v` and version is 3.1.0 ---------------------------------------- Bug #18876: OpenSSL is not available with `--with-openssl-dir` https://bugs.ruby-lang.org/issues/18876#change-98195 * Author: Gloomy_meng (Gloomy Meng) * Status: Feedback * Priority: Normal * ruby -v: 3.1.1 * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- i try use ruby + gem in my macos app with .a framework, i need install ruby in a custom location. so i make & make install openssl with this configure: ``` shell /usr/bin/perl Configure --prefix="......./local/dependencies" no-shared zlib darwin64-x86_64-cc ``` then make & make install ruby with this configure: ``` shell /bin/sh configure --prefix /Users/xxxxx/xxxx/local/bundle --with-openssl-dir="/Users/xxxxx/xxxx/local/dependencies" --enable-load-relative --with-static-linked-ext --disable-install-doc --with-out-ext="xxxxxx" ``` ------ because i need to isolated environment, so i make `bundle-env` file for run shell. and i uploaded bundle-env file ------ and update gem by local ``` shell destroot/bundle/bin/bundle-env gem install downloads/rubygems-update-3.3.15.gem --no-document --env-shebang ``` at last, run install alway got exception: ``` shell destroot/bundle/bin/bundle-env gem install xxxxxxx --version="xxxxxx" --no-document --env-shebang ERROR: While executing gem ... (Gem::Exception) OpenSSL is not available. Install OpenSSL and rebuild Ruby (preferred) or use non-HTTPS sources ``` at the same env, i tried some command, and i got the right version what i make install ``` shell destroot/bundle/bin/bundle-env ruby --version // ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x86_64-darwin21] destroot/bundle/bin/bundle-env gem --version // 3.3.15 destroot/bundle/bin/bundle-env ruby -ropenssl -e 'puts OpenSSL::OPENSSL_VERSION' // OpenSSL 1.1.1i 8 Dec 2020 ``` ------ i found and uploaded `ext/openssl/mkmf.log` and ---Files-------------------------------- bundle-env (852 Bytes) mkmf.log (215 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: