Project

General

Profile

Actions

Bug #18374

closed

make: Circular spec/ruby/optional/capi/ext/array_spec.c <- spec/ruby/optional/capi/ext/array_spec.c dependency dropped.

Added by vo.x (Vit Ondruch) about 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 3.1.0dev (2021-12-01 master 0b53a8895f) [x86_64-linux]
[ruby-core:106356]

Description

The build log contains plenty of messages such as:

... snip ...

make: Circular spec/ruby/optional/capi/ext/array_spec.c <- spec/ruby/optional/capi/ext/array_spec.c dependency dropped.
make: Circular spec/ruby/optional/capi/ext/basic_object_spec.c <- spec/ruby/optional/capi/ext/basic_object_spec.c dependency dropped.
make: Circular spec/ruby/optional/capi/ext/bignum_spec.c <- spec/ruby/optional/capi/ext/bignum_spec.c dependency dropped.
make: Circular spec/ruby/optional/capi/ext/binding_spec.c <- spec/ruby/optional/capi/ext/binding_spec.c dependency dropped.
make: Circular spec/ruby/optional/capi/ext/boolean_spec.c <- spec/ruby/optional/capi/ext/boolean_spec.c dependency dropped.
make: Circular spec/ruby/optional/capi/ext/class_id_under_autoload_spec.c <- spec/ruby/optional/capi/ext/class_id_under_autoload_spec.c dependency dropped.

... snip ...

What is it about? That does not look healthy to me.


Files

build.log.tar.gz (569 KB) build.log.tar.gz vo.x (Vit Ondruch), 12/03/2021 01:29 PM

Updated by xtkoba (Tee KOBAYASHI) about 2 months ago

I have never seen such messages in my environment, and cannot find ones in Ruby CI (disable-shared) or GitHub Actions (enable-shared).

Where are the circular dependencies defined? Does defs/gmake.mk#L411-L424 behave incorrectly in some cases? I cannot find any other part of makefiles relevant to capiext.

Updated by vo.x (Vit Ondruch) about 2 months ago

This is the build 1, but for your convenience and because it will be garbage collected soon, I'll attach the full build.log (containing the messages) as well as root.log (which contains the full version list of components used during the build).

Updated by vo.x (Vit Ondruch) about 2 months ago

So looking into the source:defs/gmake.mk history (thx for the pointer), the git|d1f0d1ca2ea4d7418b096ce71f68ce2bb3afd2c4 caught my eye. And indeed, reverting the PR #4776 fixed the issue.

Just FTR, make 4.3 was used for my tests.

Updated by vo.x (Vit Ondruch) about 2 months ago

Carefully checking the logs, there is one more place with similar issue:

make: Circular ruby.pc <- ruby.pc dependency dropped.

Updated by vo.x (Vit Ondruch) about 2 months ago

vo.x (Vit Ondruch) wrote in #note-3:

So looking into the source:defs/gmake.mk history (thx for the pointer), the git|d1f0d1ca2ea4d7418b096ce71f68ce2bb3afd2c4 caught my eye. And indeed, reverting the PR #4776 fixed the issue.

Actually, this could be also due to git|9227989343dc021904fdc224d5fef70e078a2927

Updated by xtkoba (Tee KOBAYASHI) about 2 months ago

As for ruby.pc, this is due to --with-ruby-pc=ruby.pc specified for configure argument. Combined with configure.ac#L4295-L4299 and template/Makefile.in#L320-L321, this effectively defines a circular dependency:

ruby.pc: ruby.pc
Actions #7

Updated by nobu (Nobuyoshi Nakada) about 2 months ago

  • Status changed from Open to Closed

Applied in changeset git|a4964174e26303524cee8c2d8523048b87137993.


Fix circular dependencies specific to in-place build [Bug #18374]

  • Move the rubyspec running recipe after the rule for rubyspec
    C-API extension library, so that separate dummy recipe is not
    needed.

  • Add a dummy recipe for rubyspec.h before the rubyspec running
    recipe, so that the dependency of extensions do not fire the
    latter.

Updated by vo.x (Vit Ondruch) about 2 months ago

This is resolved testing with 715a51a0d6. Thx for helping with the analysis and fix.

Actions

Also available in: Atom PDF