Opened 5 years ago

Closed 4 years ago

#59279 closed defect (fixed)

libomp: should use clang_dependency portgroup

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: eborisch (Eric A. Borisch)
Priority: Normal Milestone:
Component: ports Version:
Keywords: snowleopard lion mountainlion Cc: jmroot (Joshua Root), kencu (Ken)
Port: libomp

Description

It looks like clamav has circular dependencies, at least on Snow Leopard:

DEBUG: Running callback portconfigure::add_automatic_compiler_dependencies
DEBUG: Chosen compiler macports-clang-9.0 is provided by a port, adding dependency
DEBUG: Adding depends_build port:clang-9.0
DEBUG: Adding depends_lib libcxx
DEBUG: Adding depends_skip_archcheck clang-9.0
DEBUG: Finished running callback portconfigure::add_automatic_compiler_dependencies
DEBUG: Running callback portbuild::add_automatic_buildsystem_dependencies
DEBUG: Finished running callback portbuild::add_automatic_buildsystem_dependencies
DEBUG: Running callback portstartupitem::add_notes
DEBUG: Finished running callback portstartupitem::add_notes
DEBUG: Searching for dependency: llvm-9.0
DEBUG: Found Dependency: receipt exists for llvm-9.0
DEBUG: Searching for dependency: python27
DEBUG: Found Dependency: receipt exists for python27
DEBUG: Searching for dependency: libedit
DEBUG: Found Dependency: receipt exists for libedit
DEBUG: Searching for dependency: libffi
DEBUG: Found Dependency: receipt exists for libffi
DEBUG: Searching for dependency: clang_select
DEBUG: Found Dependency: receipt exists for clang_select
DEBUG: Searching for dependency: ld64
DEBUG: Found Dependency: receipt exists for ld64
DEBUG: Searching for dependency: cctools
DEBUG: Found Dependency: receipt exists for cctools
DEBUG: Searching for dependency: perl5
DEBUG: Found Dependency: receipt exists for perl5
DEBUG: Checking for conflicts against libomp
DEBUG: Searching for dependency: libomp-devel
DEBUG: Didn't find receipt, going to depspec regex for: libomp-devel
DEBUG: Searching for dependency: xz
DEBUG: Found Dependency: receipt exists for xz
DEBUG: Searching for dependency: cmake
DEBUG: Found Dependency: receipt exists for cmake
DEBUG: Searching for dependency: clang-9.0
DEBUG: Didn't find receipt, going to depspec regex for: clang-9.0
DEBUG: clang-9.0 has no conflicts
--->  Dependencies to be installed: clang-9.0 libomp
DEBUG: dlist_eval: all entries in dependency list have unsatisfied dependencies; can't process

I guess this is probably not a bug in clamav (that's just where I saw it) but rather a bug in MacPorts compiler selection logic and the new "bootstrap" ports (i.e. I would have expected to see the "bootstrap" ports in the dependency list here but I don't).

Change History (22)

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

Component: portsbase
Keywords: snowleopard added
Port: clamav removed
Summary: clamav: dlist_eval: all entries in dependency list have unsatisfied dependencies; can't processdlist_eval: all entries in dependency list have unsatisfied dependencies; can't process

Yes everything else is failing with the same error.

Can't say if it affects builders other than 10.6-i386, because they're all busy building the perl5.30 world and haven't updated their ports trees since that began, but the 10.6-i386 builder is far behind and is therefore still processing individual builds of other ports and has therefore updated its ports tree more recently.

I'm stopping the 10.6-i386 builder until it gets fixed.

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

Component: baseports
Keywords: snowleopard removed
Port: clamav added
Summary: dlist_eval: all entries in dependency list have unsatisfied dependencies; can't processclamav: dlist_eval: all entries in dependency list have unsatisfied dependencies; can't process

I don't read these much, but would it be correct to say that, it wants clang-9.0, finds a number of the deps, then does not find the (new) libomp. So to build libomp, it looks for xz and cmake, finds those, and then wants clang-9.0 to build libomp, and circulars out?

So -- libomp should be in that clang-dependency portgroup, which it is not...

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

woops. I undid your changed bits with my comment. I'll fix that.

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

Component: portsbase
Keywords: snowleopard added
Port: clamav removed
Summary: clamav: dlist_eval: all entries in dependency list have unsatisfied dependencies; can't processdlist_eval: all entries in dependency list have unsatisfied dependencies; can't process

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

I'm sorry, I don't know. I was not involved with the bootstrap ports, I merely noticed that they now exist and understand that the reason for their creation was to avoid circular dependencies that would otherwise occur as a result of our new default compiler settings.

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

It looks like this was the first failing build. Ignore what commit that build was for, since the builder is behind, but note that it updated its ports tree to include the commit that updated libomp to 9.0.0, so I think you're right.

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

I think it was subsequently fix by this commit [9425bef9a238e0ac3470143e6add1e16c2fa7424/macports-ports], so it should actually work now (does on my system).

Although -- if it used the clang_dependency PG, the maintainer would not have to remember to do that all the time, and this would not have come up.

comment:8 Changed 5 years ago by jmroot (Joshua Root)

Cc: eborisch added
Component: baseports
Port: libomp added

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

That was committed yesterday. Builds were failing today.

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

I don't know how the commit queue and port tree updates interact and synchronize on the buildbot.

On my 10.6.8 system, if there are no clangs > 5.0 installed, libomp 9.0.0 asks for clang-3.7.

Right now it's building a mess of upgrades. I'll double-triple check it when that is finished later on.

Last edited 5 years ago by kencu (Ken) (previous) (diff)

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

Before each portwatcher build, the ports tree is updated to the very latest version.

comment:12 Changed 5 years ago by jmroot (Joshua Root)

The most recent failed build checked out [05f8abb42cf/macports-ports], which is the commit right before the fix happened.

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

Maybe it's not related, but I can't work out why libomp-devel is mentioned in the log. I can't find anywhere that sets that as a dependency for anything.

comment:14 Changed 5 years ago by jmroot (Joshua Root)

It's in conflicts.

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

here's mine:

$ port -v installed | grep clang | grep active
  atlas @3.10.2_2+mpclang37-gcc5 (active) platform='darwin 10' archs='x86_64' date='2016-09-29T06:14:45-0700'
  boost @1.71.0_0+clang50+no_single+no_static+python27+universal (active) platform='darwin 10' archs='i386 x86_64' date='2019-08-26T18:53:51-0700'
  castxml @0.2.0_0+clang80 (active) platform='darwin 10' archs='x86_64' date='2019-08-18T11:43:05-0700'
  clang-3.4 @3.4.2_12+analyzer+arm_runtime+universal (active) platform='darwin 10' archs='i386 x86_64' date='2016-11-02T18:55:48-0700'
  clang-3.7 @3.7.1_5+analyzer (active) platform='darwin 10' archs='x86_64' date='2018-06-04T01:07:50-0700'
  clang-3.8 @3.8.1_8+analyzer+universal (active) platform='darwin 10' archs='i386 x86_64' date='2018-09-10T21:46:06-0700'
  clang-3.9 @3.9.1_9+analyzer+libstdcxx+universal (active) platform='darwin 10' archs='i386 x86_64' date='2019-02-22T21:52:13-0800'
  clang-4.0 @4.0.1_6+analyzer+libstdcxx (active) platform='darwin 10' archs='x86_64' date='2019-02-23T00:38:27-0800'
  clang-5.0 @5.0.2_4+analyzer+defaultlibcxx+emulated_tls+libstdcxx+universal (active) platform='darwin 10' archs='i386 x86_64' date='2019-08-31T16:08:02-0700'
  clang-6.0 @6.0.1_3+analyzer+defaultlibcxx+emulated_tls+libstdcxx (active) platform='darwin 10' archs='x86_64' date='2019-10-10T14:49:23-0700'
  clang-7.0 @7.0.1_1+analyzer+defaultlibcxx+emulated_tls+libstdcxx (active) platform='darwin 10' archs='x86_64' date='2019-10-10T14:50:17-0700'
  clang-8.0 @8.0.1_0+analyzer+defaultlibcxx+emulated_tls+libstdcxx+universal (active) platform='darwin 10' archs='i386 x86_64' date='2019-09-17T01:10:33-0700'
  clang-9.0 @9.0.0_0+analyzer+defaultlibcxx+emulated_tls+libstdcxx (active) platform='darwin 10' archs='x86_64' date='2019-09-23T22:21:16-0700'
  clang_select @2.1_0 (active) platform='darwin 10' archs='noarch' date='2019-10-12T08:55:43-0700'


$ port info libomp
libomp @9.0.0 (lang)
Sub-ports:            libomp-devel
Variants:             debug, top_level, [+]universal

Description:          The OpenMP subproject of LLVM is intended to contain all of the components required to build an executing OpenMP program that are
                      outside the compiler itself. This port works with MacPorts' clang-3.7+ (optionally with +openmp variant for clang-3.7.)
Homepage:             https://openmp.llvm.org

Extract Dependencies: xz
Build Dependencies:   cmake, perl5, clang-9.0
Library Dependencies: libcxx
Conflicts with:       libomp-devel
Platforms:            darwin
License:              (MIT or NCSA)
Maintainers:          Email: eborisch@macports.org, GitHub: eborisch
                      Policy: openmaintainer
$ sudo port deactivate clang-5.0 clang-6.0 clang-7.0 clang-8.0 clang-9.0
Note: It is not recommended to uninstall/deactivate a port that has dependents as it breaks the dependents.
The following ports will break: ghc @8.6.5_0
Continue? [y/N]: y
Warning: Deactivate forced.  Proceeding despite dependencies.
--->  Deactivating clang-5.0 @5.0.2_4+analyzer+defaultlibcxx+emulated_tls+libstdcxx+universal
--->  Cleaning clang-5.0
--->  Deactivating clang-6.0 @6.0.1_3+analyzer+defaultlibcxx+emulated_tls+libstdcxx
--->  Cleaning clang-6.0
--->  Deactivating clang-7.0 @7.0.1_1+analyzer+defaultlibcxx+emulated_tls+libstdcxx
--->  Cleaning clang-7.0
--->  Deactivating clang-8.0 @8.0.1_0+analyzer+defaultlibcxx+emulated_tls+libstdcxx+universal
--->  Cleaning clang-8.0
--->  Deactivating clang-9.0 @9.0.0_0+analyzer+defaultlibcxx+emulated_tls+libstdcxx
--->  Cleaning clang-9.0

$ port info libomp
libomp @9.0.0 (lang)
Sub-ports:            libomp-devel
Variants:             debug, top_level, [+]universal

Description:          The OpenMP subproject of LLVM is intended to contain all of the components required to build an executing OpenMP program that are
                      outside the compiler itself. This port works with MacPorts' clang-3.7+ (optionally with +openmp variant for clang-3.7.)
Homepage:             https://openmp.llvm.org

Extract Dependencies: xz
Build Dependencies:   cmake, perl5, clang-3.7
Library Dependencies: libcxx
Conflicts with:       libomp-devel
Platforms:            darwin
License:              (MIT or NCSA)
Maintainers:          Email: eborisch@macports.org, GitHub: eborisch
                      Policy: openmaintainer

that all seems right to me. With no clangs 5+ installed, it asks for clang-3.7.

comment:16 Changed 5 years ago by jmroot (Joshua Root)

Yes, it's fine now. The point in comment:12 was that the failed builds happened before the fix was pushed.

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

Cc: eborisch removed
Keywords: lion mountainlion added
Owner: set to eborisch
Status: newassigned

Josh, you're right, I didn't pay close enough attention. I agree it should work once the builder is back online.

However I will have to leave the builder offline until at least one of the other builders catches up to current, because distfiles for updated ports like sqlite3 have not been mirrored yet. If at least one of the 10.9+ builders doesn't finish its queue before the 10.6-10.8 builders finish the p5.30 builds, I'll have to take them offline too until distfiles are mirrored.

Eric, can you change the libomp port to use the clang_dependency portgroup instead of doing it manually?

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

Glad I could help out.

comment:19 Changed 5 years ago by jmroot (Joshua Root)

Summary: dlist_eval: all entries in dependency list have unsatisfied dependencies; can't processlibomp: should use clang_dependency portgroup

comment:21 Changed 4 years ago by Eric A. Borisch <borisch.eric@…>

In f678d051a9a57363c8852974f6591cc402f7f163/macports-ports (master):

libomp: Use clang_dependency; add 10.0

Ref: #59279

comment:22 Changed 4 years ago by eborisch (Eric A. Borisch)

Resolution: fixed
Status: assignedclosed

Implemented.

Note: See TracTickets for help on using tickets.