Opened 3 years ago

Closed 3 years ago

#64191 closed defect (fixed)

ruby27: build fails for 10.7 and 10.8; use of undeclared identifier 'kSecRandomDefault'

Reported by: mascguy (Christopher Nielsen) Owned by: kimuraw (kimura wataru)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc:
Port: ruby27

Description

This port is failing to build on our 10.7 and 10.8 buildbots, with the following error:

random.c:347:37: error: use of undeclared identifier 'kSecRandomDefault'
    int status = SecRandomCopyBytes(kSecRandomDefault, size, seed);

https://ports.macports.org/port/ruby27/builds/

Change History (2)

comment:1 Changed 3 years ago by mascguy (Christopher Nielsen)

It looks like the same issue occurred with ruby26 several years ago, and @kencu provided the fix. But in that specific case, builds were only failing on 10.7.

issue:57986

comment:2 Changed 3 years ago by kimura wataru <kimuraw@…>

Resolution: fixed
Status: assignedclosed

In 404dff7a0088979bbc8de326e36efb76c123e45f/macports-ports (master):

lang/ruby27: fix build error at random.c on MacOSX 10.7 .. 10.8

closes #64191

some old macOS SDKs do not import SecRandom.h in Security.h.
this leads "use of undeclared identifier" at compiling random.c.

Note: See TracTickets for help on using tickets.