Opened 10 months ago

Last modified 5 months ago

#69249 new defect

macports-libcxx: error: no member named 'max_align_t' in the global namespace

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.9.0
Keywords: Cc:
Port: macports-libcxx, spice-server

Description

Building spice-server failed on OS X 10.9 and earlier because of this error in macports-libcxx:

https://build.macports.org/builders/ports-10.9_x86_64-builder/builds/261472/steps/install-port/logs/stdio

In file included from char-device.cpp:24:
In file included from /opt/local/include/libcxx/v1/list:185:
In file included from /opt/local/include/libcxx/v1/memory:667:
In file included from /opt/local/include/libcxx/v1/type_traits:417:
/opt/local/include/libcxx/v1/cstddef:53:9: error: no member named 'max_align_t' in the global namespace
using ::max_align_t;
      ~~^

As Josh said in #68444:

Explicitly specifying the std namespace here would be more correct anyway, as max_align_t in the global namespace is really a C thing not C++.

Change History (3)

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

Port: spice-server added

I'm assuming it is a problem in macports-libcxx but it could also be a problem in spice-server.

comment:2 Changed 10 months ago by jmroot (Joshua Root)

Probably just assuming the libc headers are C11 because that's how it is on the developer's machine. C++ does not guarantee max_align_t to be defined in the global namespace.

comment:3 in reply to:  1 Changed 5 months ago by ar-an-ribe

Replying to ryandesign:

I'm assuming it is a problem in macports-libcxx but it could also be a problem in spice-server.

In version 2.9.3 on Mavericks, two of the three errors that are generated are due to the presence of max_align_t in C++ headers—the first one that you’d provided above (in cstddef), and the second one in /opt/local/include/libcxx/v1/new (“error: use of undeclared identifier 'max_align_t'”). Both of these max_align_t uses are within #if gates; the first one is included by #if !defined(_LIBCPP_CXX03_LANG), and the second one is included through the #else of #ifdef __STDCPP_DEFAULT_NEW_ALIGNMENT__.

The third error has something to do with what looks like a prototype for __is_overaligned_for_new(), but no location was included in main.log for where that error was generated.

The inability to build the spice-server port on Mavericks prevents the qemu port from being built there.

Note: See TracTickets for help on using tickets.