Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#57535 closed defect (fixed)

opensc @0.19.0_1 build fails with Xcode 10

Reported by: tgyurci (Teubel György) Owned by: lbschenkel (Leonardo Brondani Schenkel)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: opensc

Description

Due to changes in pcsclite.h, opensc @0.19.0_1 fails to build with Xcode 10:

...
  CC       libopensc_la-card-cardos.lo
In file included from reader-pcsc.c:41:
./internal-winscard.h:146:9: error: 'PCSC_API' macro redefined [-Werror,-Wmacro-redefined]
#define PCSC_API
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/PCSC.framework/Headers/pcsclite.h:51:9: note: previous definition is here
#define PCSC_API extern __attribute__((visibility ("default")))
        ^
1 error generated.
...

Upstream has already fixed this issue:

https://github.com/OpenSC/OpenSC/issues/1485
https://github.com/OpenSC/OpenSC/commit/c3bef7d5278c695f3778a629a720bdd8c3c42ce5

Change History (4)

comment:1 Changed 6 years ago by lbschenkel (Leonardo Brondani Schenkel)

Thanks for the report. While trying to fix this problem by incorporating that patch, I encountered a different one:

checking winscard.h usability... no
checking winscard.h presence... no
checking for winscard.h... no
configure: error: winscard.h is required for pcsc

This has been reported at https://github.com/OpenSC/OpenSC/issues/1486. I'm going to see if I can find a solution.

comment:2 Changed 6 years ago by bwesterb (Bas Westerbaan)

Original issue has been fixed upstream in https://github.com/OpenSC/OpenSC/commit/c3bef7d5278c695f3778a629a720bdd8c3c42ce5

I checked and it fixed it for me.

This commit hasn't been included in a release yet. Perhaps add it as a patch for now?

I didn't hit your other issue.

Last edited 6 years ago by bwesterb (Bas Westerbaan) (previous) (diff)

comment:3 Changed 6 years ago by lbschenkel (Leonardo Brondani Schenkel)

Resolution: fixed
Status: assignedclosed

In 7fbd9a3b6540b7eca594d7334fd3a75484d8a99c/macports-ports (master):

opensc: fix build issues on Xcode 10

  • add upstream patch to fix errors on Xcode 10 [1]
  • add patch to fix errors on Xcode 10+macOS 13 [2]

[1] https://github.com/OpenSC/OpenSC/issues/1485
[2] https://github.com/OpenSC/OpenSC/issues/1486

Fixes: #57535

comment:4 Changed 6 years ago by lbschenkel (Leonardo Brondani Schenkel)

Fixed. Sorry for the delay, but I really needed to fix the other issue because it made it impossible for me to build the port and I didn't want to do it "in the blind".

Note: See TracTickets for help on using tickets.