Opened 5 years ago

Last modified 3 years ago

#59289 closed defect

base does not necessarily tell you when circular dependency occurs — at Version 11

Reported by: fvaccari Owned by:
Priority: Normal Milestone: MacPorts 2.7.0
Component: base Version:
Keywords: Cc: mojca (Mojca Miklavec), michaelld (Michael Dickens), kencu (Ken), cjones051073 (Chris Jones)
Port:

Description (last modified by mojca (Mojca Miklavec))

When updating ports on 10.6 we seem to be lost in a cyclic dependency, but base doesn't seem too helpful communicating this information.

$ sudo port -v upgrade outdated
Warning: No port clang-9.0 found in the index.
Warning: No port legacy-support found in the index.
Warning: No port curl found in the index.
Warning: No port expat found in the index.
Warning: No port bzip2 found in the index.
Warning: No port libarchive found in the index.
Warning: No port libuv found in the index.
Warning: No port legacy-support found in the index.
--->  Computing dependencies for cmakeError: Problem while installing cmake
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
$ sudo port -d upgrade outdated
...
Error: Unable to exec port: too many nested evaluations (infinite loop?)
Error: Follow https://guide.macports.org/#project.tickets to report a bug.

See the logs

Change History (12)

Changed 5 years ago by fvaccari

comment:1 Changed 5 years ago by mojca (Mojca Miklavec)

Cc: mojca michaelld kencu cjones051073 added

comment:2 Changed 5 years ago by kencu (Ken)

Well -- there doesn't seem to be any portindex of any use available...

sources.conf misconfigured?

totally messed repo?

comment:3 Changed 5 years ago by mojca (Mojca Miklavec)

It's not a messed-up repository, it's simply a circular dependency. Please let Franco submit a PR to fix that circular dependency as an exercise ... but the base should at least tell you there's a circular dependency without the need to enter the debug mode.

comment:4 Changed 5 years ago by fvaccari

In 9e7ab4d32e458323f54ec38ad736dc642013d128/macports-ports (master):

cmake: remove cyclic dependency on clang-9.0

See #59289
See #58821

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

Port: cmake removed

Indeed, ports shall not introduce circular dependencies; if they do, base behavior is not defined.

comment:6 Changed 5 years ago by cjones051073 (Chris Jones)

Although in this case it was not really the port itself causing the problem, but base itself through the compiler selection it was making.

I am with Mojca, surely it shouldn’t be too hard for base to detect when this happens and give a reasonable error. Base is really the only place this check could be done. Its difficult for individual ports to know when this is happening.

Last edited 5 years ago by cjones051073 (Chris Jones) (previous) (diff)

comment:7 Changed 5 years ago by kencu (Ken)

I would have thought a circular dependency would look more like this one, for a similar issue, earlier today 59279.

How is it that this one shows "no port in the index", and the other was so much more clear?

comment:8 in reply to:  6 ; Changed 5 years ago by jmroot (Joshua Root)

Replying to cjones051073:

Although in this case it was not really the port itself causing the problem, but base itself through the compiler selection it was making.

Technically that choice comes from the ports tree, not base.

comment:9 in reply to:  8 Changed 5 years ago by cjones051073 (Chris Jones)

Replying to jmroot:

Replying to cjones051073:

Although in this case it was not really the port itself causing the problem, but base itself through the compiler selection it was making.

Technically that choice comes from the ports tree, not base.

In this case the cmake port did not have a problem until an unrelated change elsewhere was made, adding a new compiler option. I find it hard to blame the port in this case.

In any case it really does not matter, assigning ‘blame’ is useless. The bottom line there is one place that could ever detect these circular dependencies, and that is in base, so that is the place that needs the protection or error reporting.

comment:10 Changed 5 years ago by mojca (Mojca Miklavec)

My only concern is: debug mode did tell us it was a circular dependency, but the error did not even proliferate to verbose output.

All I'm asking for is for the error to show up to make it obvious what happened.

comment:11 Changed 5 years ago by mojca (Mojca Miklavec)

Description: modified (diff)
Note: See TracTickets for help on using tickets.