#67627 closed defect (fixed)

py310-pytorch @2.0.0: fatal error: 'tbb/tbb.h' file not found

Reported by: mikeumo (Mike) Owned by: catap (Kirill A. Korinsky)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc: mascguy (Christopher Nielsen)
Port: py-pytorch

Description

Trying to install py310-pytorch on M1 (fresh install)

I get the error in the title and I have tried several times after port clean.

The problem seems to be stemming from the tbb/tbb.h: file not found error (see attached main.log)

However, I have tbb (and onetbb) installed and I have checked their contents and they contain

/opt/local/libexec/tbb/include/tbb/tbb.h

and

/opt/local/libexec/onetbb/include/tbb/tbb.h

respectively.

So, how can PyTorch find the tbb.h?

Thank you for your time,

Mikhail.

Attachments (1)

main.log (2.7 MB) - added by mikeumo (Mike) 11 months ago.
Main.log

Change History (7)

Changed 11 months ago by mikeumo (Mike)

Attachment: main.log added

Main.log

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

Cc: catap added
Port: py-pytorch added; py310-pytorch removed
Summary: Failed to build py310-pytorch: command execution failed -- Building on on arm64/M1 -- tbb.h not foundpy310-pytorch @2.0.0: fatal error: 'tbb/tbb.h' file not found

We see the same problem on our x86_64 build machines, so it's not architecture-specific.

The most recent commit to this port says it "removed useless dependency from tbb". Maybe the tbb dependency wasn't useless after all?

I see in the log:

Submodule 'third_party/tbb' (https://github.com/01org/tbb) registered for path 'third_party/tbb'
Cloning into '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-pytorch/py310-pytorch/work/pytorch-2.0.0/third_party/tbb'...
Submodule path 'third_party/tbb': checked out 'a51a90bc609bb73db8ea13841b5cf7aa4344d4a9'
USE_TBB='ON'
-- Compiling TBB from source
--   USE_TBB               : ON
--     USE_SYSTEM_TBB      : OFF

If the build can use the "system" (i.e. MacPorts) tbb instead of building its own copy that would be preferable, and maybe it is the solution to this problem.

comment:2 Changed 11 months ago by catap (Kirill A. Korinsky)

I'm absolutely sure that I've fixed it or at least build it on my machine. Anyway, I'm on it.

comment:3 Changed 11 months ago by catap (Kirill A. Korinsky)

Owner: set to catap
Resolution: fixed
Status: newclosed

In 753e71d7ea3a936a7911caf40179a970aa5a8249/macports-ports (master):

py-pytorch: switch to system TBB

Closes: #67627

[skip ci]

comment:4 Changed 11 months ago by mascguy (Christopher Nielsen)

Cc: mascguy added; catap removed
Resolution: fixed
Status: closedreopened

It looks like builds are still failing across-the-board, due to not being able to find TBB:

CMake Error at cmake/Dependencies.cmake:138 (find_package):
  Could not find a package configuration file provided by "TBB" (requested
  version 2018.0) with any of the following names:

    TBBConfig.cmake
    tbb-config.cmake

  Add the installation prefix of "TBB" to CMAKE_PREFIX_PATH or set "TBB_DIR"
  to a directory containing one of the above files.  If "TBB" provides a
  separate development package or SDK, be sure it has been installed.

comment:5 Changed 11 months ago by catap (Kirill A. Korinsky)

Christopher, that is insane. Anyway, I'll take a look as soon as build bot is finished across all machines.

comment:6 Changed 11 months ago by catap (Kirill A. Korinsky)

Resolution: fixed
Status: reopenedclosed

In 2e91df1f5ffea62e9dda361258453c961ada5651/macports-ports (master):

py-pytorch: depedns on onetbb, not tbb

Closes: #67627

[skip ci]

Note: See TracTickets for help on using tickets.