Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow installing both port:tbb and port:onetbb #16915

Merged
merged 3 commits into from May 7, 2023

Conversation

catap
Copy link
Contributor

@catap catap commented Dec 7, 2022

Description

Here a PR on which I've worked for last weeks.

The goal is allow to install both tbb and onetbb port on the same machine, and it forces to add installing both oce and opencascade.

It is based on serveral PRs which I've made and which's fixed broken ports:

To be clear: only the last 3 commits are new.

Thus, I've skip CI because it had no chance to rebuild everything in 6 hours.

Type(s)
  • bugfix
  • enhancement
Tested on

macOS 12.6 21G115 x86_64
Xcode 14.1 14B47b

Verification

Have you

  • followed our Commit Message Guidelines?
  • squashed and minimized your commits?
  • checked that there aren't other open pull requests for the same change?
  • referenced existing tickets on Trac with full URL?
  • checked your Portfile with port lint --nitpick?
  • tried a full install with sudo port -vst install?
  • tested basic functionality of all binary files?
  • checked that the Portfile's most important variants haven't been broken?

@macportsbot
Copy link

Notifying maintainers:
@mbrethen for port freecad, oce.
@MarcusCalhoun-Lopez for port opencolorio, openimageio, openvdb, deal.ii, netgen, bowtie, bowtie2, getdp, gmsh, opencascade.
@neverpanic for port gerbil.
@mojca for port root6.
@stromnov for port rocksdb, opencv4-devel, opencv4, py-numba.
@mohd-akram for port onedpl, onetbb.
@jasonliu-- for port blender, embree, materialx, oidn, opensubdiv, openvdb, osl, partio, usd.
@mascguy for port opencv3-devel, opencv3, opencv4-devel, opencv4.
@reneeotten for port vtk-m.
@davidnich for port qore.
@cjones051073 for port py-mkl, root6.
@ra1nb0w for port kicad.
@mdave for port nektarpp.

graphics/embree/Portfile Show resolved Hide resolved
graphics/oidn/Portfile Show resolved Hide resolved
graphics/opencolorio/Portfile Outdated Show resolved Hide resolved
graphics/openimageio/Portfile Show resolved Hide resolved
graphics/openvdb/Portfile Show resolved Hide resolved
math/deal.ii/Portfile Outdated Show resolved Hide resolved
science/gmsh/Portfile Outdated Show resolved Hide resolved
science/kicad/Portfile Outdated Show resolved Hide resolved
science/nektarpp/Portfile Show resolved Hide resolved
science/opencascade/Portfile Show resolved Hide resolved
devel/tbb/Portfile Show resolved Hide resolved
devel/tbb/Portfile Show resolved Hide resolved
@mascguy
Copy link
Member

mascguy commented Dec 13, 2022

Very happy to see someone segregate the TBB ports, allowing them to finally co-exist. Ditto for updating the various ports.

Great stuff Kirill!

@mascguy
Copy link
Member

mascguy commented Dec 13, 2022

I did a quick high-level review of the various Portfile changes, and added comments. But no serious concerns overall.

Anyone else?

@catap
Copy link
Contributor Author

catap commented Dec 13, 2022

@mascguy thanks for review. Almost all commits from this PRs is parts from another ones which I've mentored inside the first commit.

It explains "wired" bump of revisions ;)

@jasonliu-- jasonliu-- mentioned this pull request Jan 2, 2023
10 tasks
This was referenced Apr 23, 2023
@catap catap marked this pull request as draft May 1, 2023 00:31
@catap catap marked this pull request as ready for review May 7, 2023 14:18
@catap
Copy link
Contributor Author

catap commented May 7, 2023

All dependencies of this PR have been merged. So, it is ready.

@mascguy may I ask you to reivew it?

@catap catap requested a review from mascguy May 7, 2023 14:19
@mascguy mascguy merged commit 4c912b2 into macports:master May 7, 2023
@catap catap deleted the tbb-onetbb branch May 7, 2023 14:26
@catap
Copy link
Contributor Author

catap commented May 7, 2023

Yahoo! Thanks @mascguy!

@catap
Copy link
Contributor Author

catap commented May 7, 2023

I guess it was one of the longest PR that I've done so far :)

@mascguy
Copy link
Member

mascguy commented May 7, 2023

I guess it was one of the longest PR that I've done so far :)

Great work as always Kirill, thank you for everything you do!

@mohd-akram
Copy link
Member

I noticed this moved onetbb to libexec as well. Is this necessary since tbb is already moved there?

@mascguy
Copy link
Member

mascguy commented May 7, 2023

I noticed this moved onetbb to libexec as well. Is this necessary since tbb is already moved there?

Yes, we need to move all versions to libexec, otherwise ports may inadvertently pick up onetbb when they want tbb.

@catap
Copy link
Contributor Author

catap commented May 7, 2023

I noticed this moved onetbb to libexec as well. Is this necessary since tbb is already moved there?

and some magic in cmake level allows to not touch any port which is used OneTBB.

Thus, now we have ability to keep old version OneTBB for ports which for some reason need it.

@mascguy
Copy link
Member

mascguy commented May 7, 2023

Kirill, I noticed one potential issue: It looks like the CMake files are being installed in two places, for onetbb. The segregated versions under libexec are fine, but they're also being placed in ${prefix}/lib/cmake:

Port onetbb contains:
  /opt/local/lib/cmake/TBB/TBBConfig.cmake
  /opt/local/lib/cmake/TBB/TBBConfigVersion.cmake
  /opt/local/lib/cmake/TBB/TBBTargets-macports.cmake
  /opt/local/lib/cmake/TBB/TBBTargets.cmake
[...]
  /opt/local/libexec/onetbb/lib/cmake/TBB/TBBConfig.cmake
  /opt/local/libexec/onetbb/lib/cmake/TBB/TBBConfigVersion.cmake
  /opt/local/libexec/onetbb/lib/cmake/TBB/TBBTargets-macports.cmake
  /opt/local/libexec/onetbb/lib/cmake/TBB/TBBTargets.cmake

@catap
Copy link
Contributor Author

catap commented May 7, 2023

@mascguy it isn't an issue. It was made for propose. Why? To avoid supply each port with the path to the right OneTBB.

OneTBB is succesor of TBB and everyone should switch to it. And if you cat, for example, /opt/local/lib/cmake/TBB/TBBConfig.cmake you may see that it simple says:

include(/opt/local/libexec/onetbb/lib/cmake/TBB/TBBTargets.cmake)

:)

This migration is transparant for any port which is compatible with OneTBB and uses CMake. I assume it is majority of ports.

mascguy added a commit that referenced this pull request May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment