#65709 closed defect (fixed)

opensc fails on Rosetta: In function 'pcsc_to_opensc_error': error: 'SCARD_E_NO_READERS_AVAILABLE' undeclared

Reported by: barracuda156 Owned by: barracuda156
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: powerpc, rosetta, snowleopard Cc:
Port: opensc

Description

This is using a default gcc-4.2:

:info:build reader-pcsc.c: In function 'pcsc_to_opensc_error':
:info:build reader-pcsc.c:185: error: 'SCARD_E_NO_READERS_AVAILABLE' undeclared (first use in this function)
:info:build reader-pcsc.c:185: error: (Each undeclared identifier is reported only once
:info:build reader-pcsc.c:185: error: for each function it appears in.)
:info:build make[3]: *** [libopensc_la-reader-pcsc.lo] Error 1

Attachments (1)

opensc.log (91.6 KB) - added by barracuda156 21 months ago.

Download all attachments as: .zip

Change History (5)

Changed 21 months ago by barracuda156

Attachment: opensc.log added

comment:1 Changed 21 months ago by barracuda156

And with gcc12 it fails on:

In file included from /usr/include/string.h:148,
                 from sm-iso.c:29:
In function 'prefix_buf',
    inlined from 'format_data' at sm-iso.c:234:7:
sm-iso.c:194:17: error: pointer may be used after 'realloc' [-Werror=use-after-free]
  194 |                 memcpy(p + 1, buf, buflen);
      |                 ^~~~~~
sm-iso.c:186:13: note: call to 'realloc' here
  186 |         p = realloc(*cat, buflen + 1);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~
  CCLD     libsm.la
cc1: all warnings being treated as errors
make[3]: *** [sm-iso.lo] Error 1

Ok, with --disable-strict this does not happen, but the build again fails on error: 'SCARD_E_NO_READERS_AVAILABLE' undeclared.

Last edited 21 months ago by barracuda156 (previous) (diff)

comment:3 Changed 21 months ago by barracuda156

gcc-4.2 still fails down the road with multiple errors, but gcc12 builds it fine.

comment:4 Changed 20 months ago by barracuda156

Owner: set to barracuda156
Resolution: fixed
Status: newclosed

In 500ff70e8ec533efee6221141a05c312124ab22a/macports-ports (master):

opensc: fix build for <11
Fixes: #65709

Note: See TracTickets for help on using tickets.