Opened 2 months ago

Closed 13 days ago

#70547 closed defect (fixed)

Unable to install p5.34-*. Possible dependency cycle

Reported by: michmill1970 Owned by: Dave-Allured (Dave Allured)
Priority: Normal Milestone:
Component: ports Version: 2.10.0
Keywords: Cc: andikawiraa, nanigashi-uji (Nanigashi Uji), dbevans (David B. Evans), cgilles (HumanDynamo), kwolcott, ddrum2000, lcvisser (Ludo Visser), Dave-Allured (Dave Allured)
Port: p5.34-b-cow p5.34-test-simple p5.34-module-pluggable p5.34-module-runtime p5.34-module-build p5.34-software-license p5.34-data-section p5.34-text-template p5.34-sub-exporter p5.34-data-optlist p5.34-params-util p5.34-config-autoconf p5.34-file-slurper p5.34-test-warnings p5.34-cpan-meta-check

Description

Computing dependencies for p5.34-b-cow
--->  Dependencies to be installed: p5.34-test-simple p5.34-module-pluggable p5.34-module-runtime p5.34-module-build p5.34-software-license p5.34-data-section p5.34-text-template p5.34-sub-exporter p5.34-data-optlist p5.34-params-util p5.34-config-autoconf p5.34-file-slurper p5.34-test-warnings p5.34-cpan-meta-check
Error: The following dependencies were not installed because all of them have unmet dependencies (likely due to a dependency cycle): p5.34-test-simple p5.34-module-pluggable p5.34-module-runtime p5.34-module-build p5.34-software-license p5.34-data-section p5.34-text-template p5.34-sub-exporter p5.34-data-optlist p5.34-params-util p5.34-config-autoconf p5.34-file-slurper p5.34-test-warnings p5.34-cpan-meta-check
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port p5.34-b-cow failed
FAILED COMMAND: port install p5.34-b-cow

I've tried installing the dependencies one at a time in various orders, but I always get the same error message. This is on a fresh MacBook Pro M1 (ARM64) with no existing macports installation. I'm installing into a custom directory (/opt/digikam.arm64).

Change History (30)

comment:1 Changed 2 months ago by nanigashi-uji (Nanigashi Uji)

I also met the same isssue. Some perl modules can be installed by changing Portfiles manually (Not checked, but can be installed.)

*** rsync.macports.org/macports/release/tarballs/ports/perl/p5-params-util/Portfile~	Tue Jan  4 03:19:50 2022
--- rsync.macports.org/macports/release/tarballs/ports/perl/p5-params-util/Portfile	Wed Aug 14 04:04:17 2024
***************
*** 19,29 ****
                      size    194986
  
  if {${perl5.major} != ""} {
!     depends_build-append \
!                     port:p${perl5.major}-config-autoconf \
!                     port:p${perl5.major}-test-leaktrace \
!                     port:p${perl5.major}-test-simple
  
      depends_lib-append \
                      port:p${perl5.major}-xsloader
  }
--- 19,32 ----
                      size    194986
  
  if {${perl5.major} != ""} {
!     # depends_build-append \
!     #                 port:p${perl5.major}-config-autoconf \
!     #                 port:p${perl5.major}-test-leaktrace \
!     #                 port:p${perl5.major}-test-simple
  
+     depends_build-append \
+                     port:p${perl5.major}-config-autoconf
+     
      depends_lib-append \
                      port:p${perl5.major}-xsloader
  }

*** rsync.macports.org/macports/release/tarballs/ports/perl/p5-test-warnings/Portfile~	Sun Feb 11 16:32:21 2024
--- rsync.macports.org/macports/release/tarballs/ports/perl/p5-test-warnings/Portfile	Wed Aug 14 03:36:29 2024
***************
*** 19,26 ****
                      size    44091
  
  if {${perl5.major} != ""} {
!     depends_build-append \
!                     port:p${perl5.major}-cpan-meta-check
  
      #depends_lib-append \
      #                port:p${perl5.major}-test2-suite
--- 19,26 ----
                      size    44091
  
  if {${perl5.major} != ""} {
!     #depends_build-append \
!     #                port:p${perl5.major}-cpan-meta-check
  
      #depends_lib-append \
      #                port:p${perl5.major}-test2-suite

*** rsync.macports.org/macports/release/tarballs/ports/perl/p5-cpan-meta-check/Portfile~	Sat Jul 22 03:54:55 2023
--- rsync.macports.org/macports/release/tarballs/ports/perl/p5-cpan-meta-check/Portfile	Wed Aug 14 03:47:17 2024
***************
*** 20,27 ****
  
  if {${perl5.major} != ""} {
      depends_build-append \
!                     port:p${perl5.major}-scalar-list-utils \
!                     port:p${perl5.major}-test-simple
      
      depends_lib-append \
                      port:p${perl5.major}-cpan-meta \
--- 20,30 ----
  
  if {${perl5.major} != ""} {
      depends_build-append \
!                     port:p${perl5.major}-scalar-list-utils
!     
! #    depends_build-append \
! #                    port:p${perl5.major}-scalar-list-utils \
! #                    port:p${perl5.major}-test-simple
      
      depends_lib-append \
                      port:p${perl5.major}-cpan-meta \

comment:2 Changed 2 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: andikawiraa nanigashi-uji dbevans added
Keywords: p5.34-test-simple p5.34-module-pluggable p5.34-module-runtime p5.34-module-build p5.34-software-license p5.34-data-section p5.34-text-template p5.34-sub-exporter p5.34-data-optlist p5.34-params-util p5.34-config-autoconf p5.34-file-slurper p5.34-test-warnings p5.34-cpan-meta-check removed
Port: p5.34-test-simple p5.34-module-pluggable p5.34-module-runtime p5.34-module-build p5.34-software-license p5.34-data-section p5.34-text-template p5.34-sub-exporter p5.34-data-optlist p5.34-params-util p5.34-config-autoconf p5.34-file-slurper p5.34-test-warnings p5.34-cpan-meta-check added

Has duplicate #70541.

comment:3 Changed 8 weeks ago by jmroot (Joshua Root)

p5.34-test-simple -> p5.34-module-pluggable -> p5.34-module-runtime -> p5.34-module-build -> p5.34-software-license -> p5.34-data-section -> p5.34-sub-exporter -> p5.34-data-optlist -> p5.34-params-util -> p5.34-test-simple

comment:4 Changed 8 weeks ago by jmroot (Joshua Root)

The proximate cause is likely the dependency changes in [9ca0a3a38c3dbc3f613de0d0e9a7d9b13c923e55/macports-ports].

comment:5 Changed 7 weeks ago by M-Rick

I wanted to build gd2 and have the same error with all the p5.34 modules…

comment:6 Changed 6 weeks ago by cgilles (HumanDynamo)

Fully reproducible problem on my computer too. Reported in bug #70643

comment:7 Changed 6 weeks ago by cgilles (HumanDynamo)

Cc: cgilles added

comment:8 Changed 5 weeks ago by cgilles (HumanDynamo)

Any update here? As Perl is a core component used by many other ports, a macports install can be quickly broken due to this bug.

For me this bug must be considerated with a HIGH priority...

comment:9 Changed 5 weeks ago by ryandesign (Ryan Carsten Schmidt)

If you or anybody knows what change(s) to make to what port(s) to fix this or any other problem, you can submit a pull request.

comment:10 Changed 5 weeks ago by cgilles (HumanDynamo)

Hi Ryan,

I tried to take a look in macports port configuration file, following the Nanigashi patch but it do not work at all on my computer (M1 + Somona 14.8.1 + Xcode 15.4). I'm lost...

Gilles

comment:11 Changed 4 weeks ago by cgilles (HumanDynamo)

Ok, i found a workaround to this problem (it's not the solution).

In my whole macports install, git port is installed and Perl dependency is enabled by default. The fix is:

port install git -perl5_34

comment:12 Changed 3 weeks ago by ryandesign (Ryan Carsten Schmidt)

Cc: kwolcott added

Has duplicate #70845.

comment:13 Changed 3 weeks ago by ddrum2000

Cc: ddrum2000 added

comment:14 Changed 2 weeks ago by lcvisser (Ludo Visser)

Cc: lcvisser added

comment:15 Changed 2 weeks ago by exodist (Chad Granum)

https://metacpan.org/release/EXODIST/Test-Simple-1.302204/source/META.json#L46

Module::Pluggable is a suggestion, not a hard dependency. The meta-data is clear on this. So your system needs to ignore this suggestion.

comment:16 Changed 2 weeks ago by Dave-Allured (Dave Allured)

Cc: Dave-Allured added

comment:17 Changed 2 weeks ago by Dave-Allured (Dave Allured)

comment:18 Changed 2 weeks ago by Dave-Allured (Dave Allured)

Help wanted. To expedite, please test this PR on your system. Start with a failing build, apply the two changes in the PR (patch and revbump), then install p5.34-test-simple. Report the results on the PR. Include identification of your system type, OS version, and Xcode version. Thank you.

comment:19 Changed 2 weeks ago by lcvisser (Ludo Visser)

I confirm it works. I'll add a comment to the PR if you can clarify what you mean with "System type": ARM vs Intel or something else?

comment:20 Changed 2 weeks ago by Dave-Allured (Dave Allured)

@lcvisser thanks for testing! Yes, system type is ARM vs. Intel. The Macports standard instructions for identification say this:

"Triple-click and copy the next line and paste it into your shell. It will copy your OS and Xcode version to the clipboard. Paste it here replacing this section."

sh -c 'echo "macOS $(sw_vers -productVersion) $(sw_vers -buildVersion) $(uname -m)"; xcode=$(xcodebuild -version 2>/dev/null); if [ $? == 0 ]; then echo "$(echo "$xcode" | awk '\''NR==1{x=$0}END{print x" "$NF}'\'')"; else echo "Command Line Tools $(pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | awk '\''/version:/ {print $2}'\'')"; fi' | tee /dev/tty | pbcopy

This should generate two short text lines with all the requested identification, like this for my mac. Just copy these lines, or equivalent, into your message.

macOS 14.7 23H124 x86_64
Xcode 15.4 15F31d
Last edited 2 weeks ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:21 Changed 2 weeks ago by kwolcott

Hope this helps:

macOS 15.0 24A335
 arm64
Xcode 16.0 16A242d

Ken Wolcott

Last edited 2 weeks ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:22 Changed 2 weeks ago by Dave-Allured (Dave Allured)

Ken, are you saying that you actually tested this PR, starting from a failing configuration? That is what I need to add success status to the PR.

comment:23 Changed 2 weeks ago by kwolcott

Sorry, no :-( :-( I just work up from a nap and forgot all about the context. [face-palm]

comment:24 Changed 2 weeks ago by Dave-Allured (Dave Allured)

<< LOL >>

comment:25 Changed 2 weeks ago by Dave-Allured (Dave Allured)

No problem. I found time to run my own test. Looks like it is working fine, and no more circular deps.

comment:26 Changed 2 weeks ago by christophecvr (christophecvr)

Replying to Dave-Allured:

I was facing same issue when installing intltool macos 10.15.7 Xcdode 11.5 CommandLineTools 11.5 Macbookpro mid 2010 Intel i7 x86_64 arch

Just applied You're patch and oeeff intltool is build . Just one note at the end

p5.34-test-warnings has the following notes:
    p5.34-test-warnings can optionally use p5.34-test-simple, but does not depend on it because that would cause a circular dependency.

Thanks

comment:27 Changed 2 weeks ago by lcvisser (Ludo Visser)

Works for

macOS 14.5 23F79 arm64
Xcode 16.0 16A242d

comment:28 Changed 2 weeks ago by Dave-Allured (Dave Allured)

@christophecvr @lcvisser Thanks for testing. I added your reports to the PR progress notes.

comment:29 in reply to:  26 Changed 13 days ago by Dave-Allured (Dave Allured)

christophecvr said:

... Just applied You're patch and oeeff intltool is build . Just one note at the end

p5.34-test-warnings has the following notes:
    p5.34-test-warnings can optionally use p5.34-test-simple, but does not depend on it because that would cause a circular dependency.

It looks like the circular dependency on that other port was ultimately the same as this one. I think I will propose to revert that other dependency change, because if the PR is accepted, this fix will solve both. I already tested that revert locally, and it seems to work fine.

I wonder if there are any other Perl circular dep patches out there, caused by the same thing.

comment:30 Changed 13 days ago by Dave-Allured (Dave Allured)

Owner: set to Dave-Allured
Resolution: fixed
Status: newclosed

In 7f1e218ddaad3ffe587df52e96163da8678a3785/macports-ports (master):

p5-test-simple: Fix dependency cycle

.

p5-module-pluggable is optional. Remove it, fix dependency cycle.
Add user note for optional dependency.
Rev bump for dependency change.
Closes: #70547

Note: See TracTickets for help on using tickets.