Skip to content

error: aggregate ‘std::array<char, 64> hostname’ has incomplete type and cannot be defined #332

@Bidski

Description

@Bidski

Trying to build gloo via pytorch (this commit) and receiving this error

pytorch/third_party/gloo/gloo/transport/tcp/device.cc: In function ‘gloo::transport::tcp::attr gloo::transport::tcp::CreateDeviceAttr(const attr&)’:
pytorch/third_party/gloo/gloo/transport/tcp/device.cc:151:39: error: aggregate ‘std::array<char, 64> hostname’ has incomplete type and cannot be defined
  151 |       std::array<char, HOST_NAME_MAX> hostname;
      |                                       ^~~~~~~~

Adding #include <array> to the top of gloo/transport/tcp/device.cc resolves the error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions