Bug #18374
closedmake: Circular spec/ruby/optional/capi/ext/array_spec.c <- spec/ruby/optional/capi/ext/array_spec.c dependency dropped.
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
Updated by xtkoba (Tee KOBAYASHI) over 2 years 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) over 2 years ago
- File build.log.tar.gz build.log.tar.gz added
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) over 2 years 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) over 2 years 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) over 2 years 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) over 2 years 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
Updated by nobu (Nobuyoshi Nakada) over 2 years 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) over 2 years ago
This is resolved testing with 715a51a0d6. Thx for helping with the analysis and fix.