From: "alex.kanavin@... (Alexander Kanavin)" Date: 2022-01-21T13:28:24+00:00 Subject: [ruby-core:107227] [Ruby master Bug#18506] make and make install rebuild items every time unnecessarily - sometimes causing races in parallel installs Issue #18506 has been reported by alex.kanavin@gmail.com (Alexander Kanavin). ---------------------------------------- Bug #18506: make and make install rebuild items every time unnecessarily - sometimes causing races in parallel installs https://bugs.ruby-lang.org/issues/18506 * Author: alex.kanavin@gmail.com (Alexander Kanavin) * Status: Open * Priority: Normal * Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- The makefiles are written in a way that a few items are regenerated on every invocation of make, even if nothing changes, including, actually libruby.so. This would've been ok, but from ruby 3.1 onwards it started to cause races in parallel make installs, where items in capi/ext/ and libruby are re-linked at the same time, causing capi/ext ones to fail the linking step. This is how it looks like: ``` | building spec/ruby/optional/capi/ext/integer_spec.so | ../ruby-3.1.0/revision.h unchanged | generating enc.mk | building spec/ruby/optional/capi/ext/proc_spec.so | compiling enc/encinit.c | linking shared-library libruby.so.3.1.0 | ./libruby.so: file not recognized: file format not recognized | collect2: error: ld returned 1 exit status | ../ruby-3.1.0/defs/gmake.mk:413: recipe for target 'spec/ruby/optional/capi/ext/proc_spec.so' failed | make: *** [spec/ruby/optional/capi/ext/proc_spec.so] Error 1 | make: *** Waiting for unfinished jobs.... | linking ruby ``` https://autobuilder.yoctoproject.org/typhoon/api/v2/logs/4328780/raw -- https://bugs.ruby-lang.org/ Unsubscribe: