Opened 2 years ago

Closed 6 days ago

#65909 closed defect (worksforme)

py-berkeleydb: build failures for 10.10 and earlier, due to use of static_assert

Reported by: mascguy (Christopher Nielsen) Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: Cc:
Port: py-berkeleydb

Description

Per past tickets, this may require patching to use _Static_assert. (Along with engaging upstream.)

src/Module/berkeleydb.c:107:15: error: expected parameter declarator
static_assert(sizeof(db_recno_t) == sizeof(u_int32_t),
              ^

Change History (7)

comment:1 Changed 2 years ago by kencu (Ken)

you might try this, works for me. Haven't got around to adding it to MP yet.

https://github.com/kencu/kencu-legacy-support/commit/6132fe60d1b9913d959c54823855e12064540a3d

IMHO it's not really an upstream issue, as supporting ancient MacOSX SDKs is really not something we should expect.

Hope it works for you!

comment:2 Changed 2 years ago by kencu (Ken)

or some version of that, anyway. looks a touch funny to me when I look at it just now, but it's been a long time since I did it.

comment:3 Changed 2 years ago by Christopher Nielsen <mascguy@…>

Resolution: fixed
Status: assignedclosed

In dff632e390841865b934966c7ebeb69b7a1efdda/macports-ports (master):

py-berkeleydb: patch for static_assert
Fixes: #65909

comment:4 in reply to:  1 Changed 2 years ago by mascguy (Christopher Nielsen)

Resolution: fixed
Status: closedreopened

Replying to kencu:

you might try this, works for me. Haven't got around to adding it to MP yet.

https://github.com/kencu/kencu-legacy-support/commit/6132fe60d1b9913d959c54823855e12064540a3d

That would be far preferable to my quick fix, which is to temporarily disable use of static_assert.

Would you be interested in adding to legacy support?

comment:5 in reply to:  1 Changed 2 years ago by jmroot (Joshua Root)

Replying to kencu:

IMHO it's not really an upstream issue, as supporting ancient MacOSX SDKs is really not something we should expect.

Going by discussion around using it in cpython, having a C11 compiler but no static_assert macro is actually pretty common across different platforms.

comment:6 Changed 2 years ago by kencu (Ken)

Here you go, mascguy:

[34588ddd014e7d8cd535a1574727f3513babe250/macports-legacy-support]

It is just copied directly out of the assert.h header from an SDK newer than 10.10.

So once a new legacysupport comes out, that should take care of that problem for ... ever.

comment:7 Changed 6 days ago by mascguy (Christopher Nielsen)

Resolution: worksforme
Status: reopenedclosed

No longer an issue with later releases, closing.

Note: See TracTickets for help on using tickets.