From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id A36A51F463 for ; Thu, 26 Dec 2019 20:03:52 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 2890A120A3F; Fri, 27 Dec 2019 05:03:41 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id 8002C120A31 for ; Fri, 27 Dec 2019 05:03:39 +0900 (JST) Received: by filterdrecv-p3mdw1-56c97568b5-72qfl with SMTP id filterdrecv-p3mdw1-56c97568b5-72qfl-18-5E051221-28 2019-12-26 20:03:45.488971514 +0000 UTC m=+847238.344826886 Received: from herokuapp.com (unknown [54.84.189.171]) by ismtpd0027p1mdw1.sendgrid.net (SG) with ESMTP id Ohp49VU1TrSRXK2fbu1d-w for ; Thu, 26 Dec 2019 20:03:45.436 +0000 (UTC) Date: Thu, 26 Dec 2019 20:03:45 +0000 (UTC) From: luizluca@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 72158 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 16455 X-Redmine-Issue-Author: luizluca X-Redmine-Sender: luizluca X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?xti6kUk7rBwzDdLPrNK2dhrLBcqdy5ufUnZ7lrB803XgHSX0tj03Iz2+wrRIvK?= =?us-ascii?Q?oOI7Er50gco9Q8mYREq0OWOCmPOh=2F6MgWtZVgzh?= =?us-ascii?Q?4j9ebHBw+9kjPnv0phrpdJG4SimPmyYi6prfj5V?= =?us-ascii?Q?QykWMeFBJbrNGHMBXbubPOnDxX0OR7x9i+L5L=2Fn?= =?us-ascii?Q?CQhS5z9vqZC6ZL6FO0zvLj4fUo6ERKE+JHd7CjE?= =?us-ascii?Q?6+89ExQ4s0JfGqbdc=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 96499 Subject: [ruby-core:96499] [Ruby master Bug#16455] coroutine ucontext uses deprecated POSIX getcontext/swapcontext/makecontext, absent in musl X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #16455 has been reported by luizluca (Luiz Angelo Daros de Luca). ---------------------------------------- Bug #16455: coroutine ucontext uses deprecated POSIX getcontext/swapcontext/makecontext, absent in musl https://bugs.ruby-lang.org/issues/16455 * Author: luizluca (Luiz Angelo Daros de Luca) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- Hello, While building ruby 2.7.0 for mips with musl, it fails: ``` linking miniruby /home/luizluca/prog-local/openwrt/trunk/staging_dir/toolchain-mips_24kc_gcc-8.3.0_musl/lib/gcc/mips-openwrt-linux-musl/8.3.0/../../../../mips-openwrt-linux-musl/bin/ld: cont.o: in function `coroutine_initialize_main': cont.c:(.text+0x36c): undefined reference to `getcontext' /home/luizluca/prog-local/openwrt/trunk/staging_dir/toolchain-mips_24kc_gcc-8.3.0_musl/lib/gcc/mips-openwrt-linux-musl/8.3.0/../../../../mips-openwrt-linux-musl/bin/ld: cont.o: in function `fiber_setcontext': cont.c:(.text+0xde6): undefined reference to `swapcontext' /home/luizluca/prog-local/openwrt/trunk/staging_dir/toolchain-mips_24kc_gcc-8.3.0_musl/lib/gcc/mips-openwrt -linux-musl/8.3.0/../../../../mips-openwrt-linux-musl/bin/ld: cont.o: in function `fiber_switch': cont.c:(.text+0x16b8): undefined reference to `makecontext' collect2: error: ld returned 1 exit status make[3]: *** [Makefile:271: miniruby] Error 1 ``` It seems that now ruby either uses native ASM code or ucontext for coroutine. Both are unavailable in my crossbuild. It was building and running with 2.6.x: ``` configure:25935: checking native coroutine implementation for mips-linux-gnu configure:25976: result: no ``` With 2.7.0: ``` configure:26536: checking native coroutine implementation for mips-linux-gnu configure:26601: result: ucontext ``` I tried to disable it with --without-coroutine, --with-out-coroutine and --with-coroutine=no, but it is innocuous or try to use a "no" implementation. It looks like this introduced the change https://github.com/ruby/ruby/commit/7291fef55c90b9ab6b3c22018b16972861b98c9d And musl might never fix it: https://wiki.musl-libc.org/open-issues.html -- https://bugs.ruby-lang.org/