10000 Apple Clang 17 build error · Issue #151316 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content
Apple Clang 17 build error #151316
@adamjstewart

Description

@adamjstewart

🐛 Describe the bug

When building PyTorch 2.6.0 with Apple Clang 17.0.0, I see the following build error:

  FAILED: third_party/tensorpipe/tensorpipe/CMakeFiles/tensorpipe.dir/channel/helpers.cc.o
  /Users/Adam/spack/opt/spack/darwin-m2/compiler-wrapper-1.0-cdasmd2yy77m4m6wp6mdpf72p6usoqcq/libexec/spack/clang/clang++  -I/private/var/folders/jv/cgkfvslj6nq1l7cw0c8c_8gm0000gn/T/Adam/spack-stage/spack-stage-py-torch-2.6.0-qcpp7ic3nurlnspjyivxwhzbiomf7bit/spack-src/third_party/tensorpipe -I/private/var/folders/jv/cgkfvslj6nq1l7cw0c8c_8gm0000gn/T/Adam/spack-stage/spack-stage-py-torch-2.6.0-qcpp7ic3nurlnspjyivxwhzbiomf7bit/spack-src/build/third_party/tensorpipe -I/private/var/folders/jv/cgkfvslj6nq1l7cw0c8c_8gm0000gn/T/Adam/spack-stage/spack-stage-py-torch-2.6.0-qcpp7ic3nurlnspjyivxwhzbiomf7bit/spack-src/third_party/tensorpipe/third_party/libnop/include -I/private/var/folders/jv/cgkfvslj6nq1l7cw0c8c_8gm0000gn/T/Adam/spack-stage/spack-stage-py-torch-2.6.0-qcpp7ic3nurlnspjyivxwhzbiomf7bit/spack-src/third_party/tensorpipe/third_party/libuv/include -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks -isystem /private/var/folders/jv/cgkfvslj6nq1l7cw0c8c_8gm0000gn/T/Adam/spack-stage/spack-stage-py-torch-2.6.0-qcpp7ic3nurlnspjyivxwhzbiomf7bit/spack-src/cmake/../third_party/tensorpipe/third_party/libuv/include -isystem /private/var/folders/jv/cgkfvslj6nq1l7cw0c8c_8gm0000gn/T/Adam/spack-stage/spack-stage-py-torch-2.6.0-qcpp7ic3nurlnspjyivxwhzbiomf7bit/spack-src/third_party/protobuf/src -isystem /Users/Adam/spack/opt/spack/darwin-m2/openblas-0.3.29-2vttv3y5thdu4gnqda3rypsjgt5hfike/include -isystem /private/var/folders/jv/cgkfvslj6nq1l7cw0c8c_8gm0000gn/T/Adam/spack-stage/spack-stage-py-torch-2.6.0-qcpp7ic3nurlnspjyivxwhzbiomf7bit/spack-src/third_party/XNNPACK/include -isystem /Users/Adam/spack/opt/spack/darwin-m2/eigen-3.4.0-yboqnztyk6kzxv3vnadzd2hwovg2hb73/include/eigen3 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -O3 -DNDEBUG -std=gnu++14 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk -mmacosx-version-min=15.0 -fPIC -DTORCH_USE_LIBUV -MD -MT third_party/tensorpipe/tensorpipe/CMakeFiles/tensorpipe.dir/channel/helpers.cc.o -MF third_party/tensorpipe/tensorpipe/CMakeFiles/tensorpipe.dir/channel/helpers.cc.o.d -o third_party/tensorpipe/tensorpipe/CMakeFiles/tensorpipe.dir/channel/helpers.cc.o -c /private/var/folders/jv/cgkfvslj6nq1l7cw0c8c_8gm0000gn/T/Adam/spack-stage/spack-stage-py-torch-2.6.0-qcpp7ic3nurlnspjyivxwhzbiomf7bit/spack-src/third_party/tensorpipe/tensorpipe/channel/helpers.cc
  In file included from /private/var/folders/jv/cgkfvslj6nq1l7cw0c8c_8gm0000gn/T/Adam/spack-stage/spack-stage-py-torch-2.6.0-qcpp7ic3nurlnspjyivxwhzbiomf7bit/spack-src/third_party/tensorpipe/tensorpipe/channel/helpers.cc:9:
  In file included from /private/var/folders/jv/cgkfvslj6nq1l7cw0c8c_8gm0000gn/T/Adam/spack-stage/spack-stage-py-torch-2.6.0-qcpp7ic3nurlnspjyivxwhzbiomf7bit/spack-src/third_party/tensorpipe/tensorpipe/channel/helpers.h:15:
  In file included from /private/var/folders/jv/cgkfvslj6nq1l7cw0c8c_8gm0000gn/T/Adam/spack-stage/spack-stage-py-torch-2.6.0-qcpp7ic3nurlnspjyivxwhzbiomf7bit/spack-src/third_party/tensorpipe/tensorpipe/common/nop.h:11:
  In file included from /private/var/folders/jv/cgkfvslj6nq1l7cw0c8c_8gm0000gn/T/Adam/spack-stage/spack-stage-py-torch-2.6.0-qcpp7ic3nurlnspjyivxwhzbiomf7bit/spack-src/third_party/tensorpipe/third_party/libnop/include/nop/serializer.h:35:
  In file included from /private/var/folders/jv/cgkfvslj6nq1l7cw0c8c_8gm0000gn/T/Adam/spack-stage/spack-stage-py-torch-2.6.0-qcpp7ic3nurlnspjyivxwhzbiomf7bit/spack-src/third_party/tensorpipe/third_party/libnop/include/nop/base/variant.h:21:
  /private/var/folders/jv/cgkfvslj6nq1l7cw0c8c_8gm0000gn/T/Adam/spack-stage/spack-stage-py-torch-2.6.0-qcpp7ic3nurlnspjyivxwhzbiomf7bit/spack-src/third_party/tensorpipe/third_party/libnop/include/nop/types/variant.h:241:30: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
    241 |     index_ = value_.template Construct(std::forward<Args>(args)...);
        |                              ^
  /private/var/folders/jv/cgkfvslj6nq1l7cw0c8c_8gm0000gn/T/Adam/spack-stage/spack-stage-py-torch-2.6.0-qcpp7ic3nurlnspjyivxwhzbiomf7bit/spack-src/third_party/tensorpipe/third_party/libnop/include/nop/types/variant.h:258:26: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
    258 |     if (!value_.template Assign(TypeTag<T>{}, index_, std::forward<U>(value))) {
        |                          ^
  /private/var/folders/jv/cgkfvslj6nq1l7cw0c8c_8gm0000gn/T/Adam/spack-stage/spack-stage-py-torch-2.6.0-qcpp7ic3nurlnspjyivxwhzbiomf7bit/spack-src/third_party/tensorpipe/third_party/libnop/include/nop/types/variant.h:265:26: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
    265 |     if (!value_.template Assign(index_, std::forward<T>(value))) {
        |                          ^
  3 errors generated.

Any suggestions on how to fix this? I would report this issue to tensorpipe or libnop, but both seem abandoned and PyTorch does not allow using an externally installed version anyway.

Versions

Can't run collect_env.py since PyTorch doesn't build, but here are some relevant things:

  • PyTorch version: 2.6.0
  • CUDA: N/A
  • ROCM: N/A
  • OS: macOS 15.4
  • Clang version: 17.0.0
  • CMake version: 3.31.6
  • Python version: 3.13.2

Also:

Happy to provide additional reproducibility instructions, but the bug should be obvious to anyone with access to Apple Clang 17.

cc @ezyang @gchanan @zou3519 @kadeng @msaroufim @malfet @seemethere @osalpekar @jiayisuse @lw @beauby @pritamdamania87 @mrshenli @jjlilley @gqchen

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0