为什么 Heroku 的 heroku-18 堆栈仅与 Puma 版本 3.7.x 兼容?

2023-11-29

通过反复试验,我确定从 Heroku 升级heroku-16堆叠到heroku-18stack 需要我在 Rails 应用程序中更新 Puma。

下面是为 puma gem 构建本机扩展的失败。您能解释一下为什么 v3.7 之前的 puma gem 版本会出现此故障吗?

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/tmp/build_893b3955637fcd96d49136f0c3564c51/vendor/bundle/ruby/2.4.0/gems/puma-3.6.2/ext/puma_http11
/tmp/build_893b3955637fcd96d49136f0c3564c51/vendor/ruby-2.4.5/bin/ruby -r
./siteconf20190110-284-13d7ke9.rb extconf.rb
checking for BIO_read() in -lcrypto... yes
checking for SSL_CTX_new() in -lssl... yes
checking for openssl/bio.h... yes
creating Makefile

current directory:
/tmp/build_893b3955637fcd96d49136f0c3564c51/vendor/bundle/ruby/2.4.0/gems/puma-3.6.2/ext/puma_http11
make "DESTDIR=" clean

current directory:
/tmp/build_893b3955637fcd96d49136f0c3564c51/vendor/bundle/ruby/2.4.0/gems/puma-3.6.2/ext/puma_http11
make "DESTDIR="
compiling http11_parser.c
In file included from ext/puma_http11/http11_parser.rl:7:0:
ext/puma_http11/http11_parser.rl: In function ‘puma_parser_execute’:
ext/puma_http11/http11_parser.rl:111:17: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
ext/puma_http11/http11_parser.rl: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
compiling io_buffer.c
compiling mini_ssl.c
mini_ssl.c: In function ‘get_dh1024’:
mini_ssl.c:90:5: error: dereferencing pointer to incomplete type ‘DH {aka struct
dh_st}’
   dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
     ^~
mini_ssl.c: In function ‘engine_init_server’:
mini_ssl.c:139:3: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   ID sym_cert = rb_intern("cert");
   ^~
mini_ssl.c:144:3: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   ID sym_ca = rb_intern("ca");
   ^~
mini_ssl.c:166:3: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   DH *dh = get_dh1024();
   ^~
mini_ssl.c:170:3: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   EC_KEY *ecdh = EC_KEY_new_by_curve_name(NID_secp521r1);
   ^~~~~~
mini_ssl.c: In function ‘engine_init_client’:
mini_ssl.c:197:3: warning: ‘DTLSv1_method’ is deprecated
[-Wdeprecated-declarations]
   conn->ctx = SSL_CTX_new(DTLSv1_method());
   ^~~~
In file included from /usr/include/openssl/ct.h:13:0,
                 from /usr/include/openssl/ssl.h:61,
                 from mini_ssl.c:15:
/usr/include/openssl/ssl.h:1642:1: note: declared here
 DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_method(void)) /* DTLSv1.0 */
 ^
mini_ssl.c: In function ‘engine_shutdown’:
mini_ssl.c:333:8: warning: unused variable ‘buf’ [-Wunused-variable]
   char buf[512];
        ^~~
mini_ssl.c:332:11: warning: unused variable ‘err’ [-Wunused-variable]
   int ok, err;
           ^~~
mini_ssl.c: In function ‘engine_init’:
mini_ssl.c:350:8: warning: unused variable ‘buf’ [-Wunused-variable]
   char buf[512];
        ^~~
mini_ssl.c:349:11: warning: unused variable ‘err’ [-Wunused-variable]
   int ok, err;
           ^~~
mini_ssl.c:349:7: warning: unused variable ‘ok’ [-Wunused-variable]
   int ok, err;
       ^~
mini_ssl.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
Makefile:241: recipe for target 'mini_ssl.o' failed
make: *** [mini_ssl.o] Error 1

make failed, exit code 2

Gem files will remain installed in
/tmp/build_893b3955637fcd96d49136f0c3564c51/vendor/bundle/ruby/2.4.0/gems/puma-3.6.2
for inspection.
Results logged to
/tmp/build_893b3955637fcd96d49136f0c3564c51/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0-static/puma-3.6.2/gem_make.out

An error occurred while installing puma (3.6.2), and Bundler cannot continue.
Make sure that `gem install puma -v '3.6.2'` succeeds before bundling.

The Heroku-16堆栈基于 Ubuntu 16.04,它附带 OpenSSL 1.0.2,而Heroku-18堆栈基于 Ubuntu 18.04,它附带 OpenSSL 1.1.0。

在这些 OpenSSL 版本之间,存在相当多的 API 和行为更改,这通常需要对直接使用 OpenSSL API 的软件进行一些更改(就像 Puma 所做的那样)。

在 Puma 3.7.0 中,有a change使其与 OpenSSL 1.1.0 兼容,从而使其成为第一个与该版本兼容的版本。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

为什么 Heroku 的 heroku-18 堆栈仅与 Puma 版本 3.7.x 兼容? 的相关文章

随机推荐

  • 关闭所有打开视图控制器的单一函数

    我有一个应用程序 它是单视图应用程序 我有一个导航控制器链接到根视图控制器的所有子控制器 在每个子控制器中 我都有一个注销按钮 我想知道是否可以有一个可以调用的函数 该函数将关闭一路上打开的所有控制器 无论用户按下注销时当前打开哪个控制器
  • 如何从 Python 集合中随机选择 2 个项目? [复制]

    这个问题在这里已经有答案了 我目前有一个 n 大小的 Python 集 其中 n gt 0 是否有一个快速的 1 或 2 行 Python 解决方案可以做到这一点 例如 该集合将如下所示 fruits set apple orange wa
  • Java 线程中的“阻塞计数”和“等待计数”是什么意思?

    我使用 JConsole 来观看线程 它显示 name Thread 6 state BLOCKED sun misc Launcher AppClassLoader 19821f owner Thread 3 blocked Count
  • 由于“拒绝连接”,我无法使用 MySQL

    我正在尝试在 Windows XP 上运行 MySQL 的免安装版本 位于C mysql 在我的机器上 当我尝试连接到 MySQL 时 我在 PHP 文件中收到错误消息 无法连接 无法连接 因为目标机器主动拒绝 我已经编辑了配置文件my i
  • 未定义的属性: Illuminate\Database\Eloquent\Collection:: Laravel 5.2

    我试图让物联网显示订单中的商品 但我不断收到此错误 这些是我的模型 class westcoorder extends Model protected table westcoorders protected with westcoorde
  • 如何将线程函数的地址作为回调传递给winapi?

    我有一个简单的线程 在执行过程中我尝试使用线程中定义的函数之一的地址调用 EnumWindows 所以我试图这样做 EnumWindows cbEnumWindowsClickOK 0 其中 cbEnumWindowsClickOK 是在线
  • iOS 如何重新启动应用程序以更改语言 Swift 4

    我使用多语言应用程序 我想在配置文件用户中手动更改语言 我已经有 Localization string 如果我更改设备语言 应用程序中的语言将更改为 但我想从用户配置文件示例中手动更改语言 为此 我使用下一个代码 private func
  • 函数返回不可变引用,但借用检查器认为不然

    在这里 我将一些可变引用传递到函数中以对这些引用执行某些操作 然后 我通过将这些可变引用转变为不可变引用来删除它们 然而 Rust 借用检查器似乎仍然认为它们是可变的 这是代码 src lib rs fn append 1 to all s
  • XNA 中非常简单的菜单 [关闭]

    Closed 此问题正在寻求书籍 工具 软件库等的推荐 不满足堆栈溢出指南 目前不接受答案 我和其他一些人正在创建一个游戏 我想添加一个非常简单的菜单 只有 开始 和 退出游戏 现在我已经下载了游戏状态管理示例 但这是一个非常长且复杂的代码
  • Py2exe ImportError:没有名为 shell 的模块

    我的代码是 from win32com shell import shellcon from win32com shell shell import ShellExecuteEx 它在 IDLE 中工作正常 但在我生成 exe 后出现错误
  • pip 配置了需要 TLS/SSL 的位置,但是 Python 中的 ssl 模块不可用

    我正在使用Python 3 6 当我尝试使用安装 模块 时pip3 我面临这个问题 pip is configured with locations that require TLS SSL however the ssl module i
  • 如何制作动画信使

    我想创建一个信使组件 当调用该函数时 它将创建一条消息 并且在按下或通过计时器时 首先使其透明 gt 之后 平滑地降低包装器的高度 gt 并且过渡结束后 删除对象 我怎样才能做到这一点 我的代码无法正常工作
  • Rest WebService 错误处理

    我使用 RestWebservice 进行一些基本操作 例如创建 搜索 请求 xml 看起来像这样
  • 矩阵中的最小成本路径

    问题 给定一个充满非负数的 m x n 网格 找到一条从左上角到右下角的路径 该路径最小化沿其路径的所有数字的总和 注意 在任何时间点您只能向下或向右移动 我知道这是一个常见问题 大多数人都知道这个问题及其动态规划 我在这里尝试递归代码 但
  • CSS 在移动浏览器中不起作用

    http mpkosis28 com 28cup 从笔记本电脑或台式机上查看时 该网站看起来很完美 但是当我尝试通过手机访问它时 它无法识别网站中的 css 文件 只加载 html 部分 阅读其他类似的问题 但他们似乎没有和我遇到同样的问题
  • Java String 上哈希码溢出的后果

    我最近在这里阅读了一些有关 Java String 类的哈希码的信息 但我一直无法找到此信息 当字符串的长度高于 32 时会发生什么 我知道会发生溢出 但作为哈希键 会发生什么 例如 我需要对长度在 20 到 120 个字符之间的字符串进行
  • .htaccess 中的 CodeIgniter 查询字符串重写

    当我第一次启动我的网站时 URL 采用以下格式 project php projectID 1 pageID 2 几年前 我修改了 htaccess 以重写它们以使用段 如下所示 project 1 2 我更新了所有内部链接以使用分段格式
  • 删除 Vuetify 中默认的 v-input-file 图标

    v file input是 Vuetify v2 中出现的新组件
  • 以编程方式切换键盘配置文件

    有什么方法可以让我们以编程方式切换已安装的键盘 无需手动进入设置部分 我的要求是向用户展示手机上安装的所有键盘 并获得一个选择器对话框以切换到想要的键盘 基本上我们想减少把他转移到设置页面的步骤 这段代码将满足您的要求 InputMetho
  • 为什么 Heroku 的 heroku-18 堆栈仅与 Puma 版本 3.7.x 兼容?

    通过反复试验 我确定从 Heroku 升级heroku 16堆叠到heroku 18stack 需要我在 Rails 应用程序中更新 Puma 下面是为 puma gem 构建本机扩展的失败 您能解释一下为什么 v3 7 之前的 puma