Opened 18 months ago

Closed 18 months ago

Last modified 18 months ago

#67471 closed defect (fixed)

sentencepiece @0.1.97: error: aligned deallocation function ... is only available on macOS 10.14 or newer

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc:
Port: sentencepiece

Description

sentencepiece @0.1.97 fails to build on Mac OS X 10.6:

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

src/../third_party/protobuf-lite/google/protobuf/stubs/mutex.h:160:5: error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.14 or newer
    delete static_cast<T*>(value);
    ^

I don't understand the message since the port builds fine on OS X 10.8 and later.

Does sentencepiece need to use its bundled copy of protobuf-lite? Could it use one of the separate protobuf ports already in MacPorts? Might that solve the problem?

Change History (4)

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

comment:2 Changed 18 months ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to ryandesign
Status: newaccepted

sentencepiece can use external protobuf with -DSPM_USE_BUILTIN_PROTOBUF=OFF. I'm making this change along with updating sentencepiece and py-sentencepiece to 0.1.99.

comment:3 Changed 18 months ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: acceptedclosed

In 795be98ef64124b1379293cc13c2eb175270d425/macports-ports (master):

sentencepiece: Update to 0.1.99 and use external protobuf

Closes: #67471

comment:4 Changed 18 months ago by jmroot (Joshua Root)

Sized deallocation might be assumed to be available when using C++14 or later, even though it is only supported by the system libc++ starting with 10.14, as the message says. I guess the external protobuf must already have been taught this? I had a similar problem with libjxl, but it was using -fsized-deallocation explicitly to enable it while using C++11, and so was easy to patch.

Note: See TracTickets for help on using tickets.