#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:
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: | new → accepted |
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: | accepted → closed |
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.
I've asked the developers: https://github.com/google/sentencepiece/issues/868