升级 ruby 的 OpenSSL 版本?
Upgrade ruby's OpenSSL version?
我正在尝试从 Windows 的源代码构建 Ruby,但似乎没有很好的文档说明如何获取本地构建的 OpenSSL 以连接到我的ruby 构建。有什么方法我应该在 DLLs/EXEs/whatever 中复制以便使用最新的 OpenSSL 版本(如 1.0.1r 或其他)构建 Ruby 版本?
是的,这是一个既简单又困难的问题。
首先,我假设您使用的是 RubyInstaller project 而不是使用 MSVC 进行编译。如果您使用的是 MSVC,那么其中一些可能会有用,但总体而言没有用。
仅供参考,这是 actually configures which version to use.
的代码
下一条有价值的信息,Ruby安装程序用来构建 Ruby 的环境基于 rubenvb's mingw64 builds(Version 4.7.2 in this case) 和精心挑选的 MSYS 工具。编译器很重要,因为已知使用不是由同一编译器构建的库会发生问题。 其实我对那个地区了解不多。
Ruby安装程序试图通过提供使用 DevKit 构建的二进制文件来避免此问题 OpenKnapsack Project. The openssl libraries are downloaded from there for RubyInstaller builds. If there is a binary you want then you can upload a working recipe to the knapsack-recipes
repo,它将以 32 位和 64 位版本构建并上传。 我手动执行此操作。 -悲伤的脸-
因此,简单 部分是您可以使用任何您想要的二进制文件,只需将 DLL 放入 Ruby bin
文件夹中即可将 link 并使用该 DLL。但是 Ruby 编译的版本是一个硬编码常量,即使您有新版本的 DLL 也不会改变。
hard 部分是,如果 knapsack-recipes
repo you have to make one and submit a pull request or find/build the version yourself. And then if you really want to have the correct version hard coded in Ruby you have to change the config in the rubyinstaller project 中没有您想要的版本的配方,然后使用 Ruby 自己构建命令如:
> rake ruby21 DKVER=mingw64-32-4.7.2 #32-bit
> rake ruby21 DKVER=mingw64-64-4.7.2 #64-bit
我正在尝试从 Windows 的源代码构建 Ruby,但似乎没有很好的文档说明如何获取本地构建的 OpenSSL 以连接到我的ruby 构建。有什么方法我应该在 DLLs/EXEs/whatever 中复制以便使用最新的 OpenSSL 版本(如 1.0.1r 或其他)构建 Ruby 版本?
是的,这是一个既简单又困难的问题。
首先,我假设您使用的是 RubyInstaller project 而不是使用 MSVC 进行编译。如果您使用的是 MSVC,那么其中一些可能会有用,但总体而言没有用。
仅供参考,这是 actually configures which version to use.
的代码下一条有价值的信息,Ruby安装程序用来构建 Ruby 的环境基于 rubenvb's mingw64 builds(Version 4.7.2 in this case) 和精心挑选的 MSYS 工具。编译器很重要,因为已知使用不是由同一编译器构建的库会发生问题。 其实我对那个地区了解不多。
Ruby安装程序试图通过提供使用 DevKit 构建的二进制文件来避免此问题 OpenKnapsack Project. The openssl libraries are downloaded from there for RubyInstaller builds. If there is a binary you want then you can upload a working recipe to the knapsack-recipes
repo,它将以 32 位和 64 位版本构建并上传。 我手动执行此操作。 -悲伤的脸-
因此,简单 部分是您可以使用任何您想要的二进制文件,只需将 DLL 放入 Ruby bin
文件夹中即可将 link 并使用该 DLL。但是 Ruby 编译的版本是一个硬编码常量,即使您有新版本的 DLL 也不会改变。
hard 部分是,如果 knapsack-recipes
repo you have to make one and submit a pull request or find/build the version yourself. And then if you really want to have the correct version hard coded in Ruby you have to change the config in the rubyinstaller project 中没有您想要的版本的配方,然后使用 Ruby 自己构建命令如:
> rake ruby21 DKVER=mingw64-32-4.7.2 #32-bit
> rake ruby21 DKVER=mingw64-64-4.7.2 #64-bit