# pcscd gives error when accessing smartcard after gcc update

## Olis

Hello,

I updated gcc from 4.9.4 to 5.4.0-r3 recently. Since the upgrade I can't use the commercial software Moneyplex (banking software using a smartcard) anymore.

When the application tries to connect to a bank using pcscd it gives an error

```
pcscd: /var/tmp/portage/sys-apps/pcsc-lite-1.8.20/work/pcsc-lite-1.8.20/src/ifdwrapper.c:482:IFDControl() Card not transacted: 612
```

This is the same error as in this thread, but I'm using sys-apps/pcsc-lite-1.8.20 since January 2017 and dev-libs/cyberjack-3.99.5_p03-r1 for some years without problems and portage doesn't have other versions.

After the gcc update I rebuild the toolchain (gcc, glibc, binutils and portage), then the kernel, rebooted the system and rebuild all packages using libstdc++.so.6:

```
revdep-rebuild --library 'libstdc++.so.6' -- --exclude gcc
```

This rebuild around 480 packages. Everything went without problems, but when I tried to transfer some money two days later I found that Moneyplex wasn't able to connect to a bank anymore. The connection test in settings however went without problems, so generally the application can talk to the smartcard.

I also tried Hibiscus (open source java based home banking app, website in German only), but it gives the same error message when trying to connect to the smartcard.

So what else can I do? I rebuild sys-apps/pcsc-lite and dev-libs/cyberjack, but this didn't help.

Options:Find all package(s) that are required for pcsc-lite to work and recompile them using gcc-5.4.0. How can I find such dependencies?

Mask gcc-5.4.0-r3, go back to 4.9.4 and rebuild all packages that have been compiled using v5.4.0 since the update (is there an easy way?)

Compile everything (another 1000 packages) using gcc-5.4.0 and hope that this will fix the problem. If not, I will probably have to recompile everything with gcc-4.9.4

Card reader broken

Any suggestions?

----------

## Olis

 *Olis wrote:*   

> Options:Find all package(s) that are required for pcsc-lite to work and recompile them using gcc-5.4.0. How can I find such dependencies?
> 
> Mask gcc-5.4.0-r3, go back to 4.9.4 and rebuild all packages that have been compiled using v5.4.0 since the update (is there an easy way?)
> 
> Compile everything (another 1000 packages) using gcc-5.4.0 and hope that this will fix the problem. If not, I will probably have to recompile everything with gcc-4.9.4
> ...

 

Installed Hibiscus on Windows 10 (same machine, dual boot) and it worked without problem. So card reader should be ok. Either some package still has to be compiled with gcc 5.4.0 or pcsc-lite or cyberjack is not compatible with gcc 5.4.0.

----------

## Olis

 *Olis wrote:*   

> I updated gcc from 4.9.4 to 5.4.0-r3 recently. Since the upgrade I can't use the commercial software Moneyplex (banking software using a smartcard) anymore.
> 
> When the application tries to connect to a bank using pcscd it gives an error
> 
> ```
> ...

 

Problem solved   :Smile: . First solution was to restore /usr/bin/cyberjack and the lib (/usr/lib64/readers/usb/libifd-cyberjack.bundle/Contents/Linux/libifd-cyberjack.so.6.0.0) from a backup taken before the GCC upgrade (package was last build in 2013).

Using these old versions made Moneyplex work again. But it was just a workaround, as /usr/bin/cyberjack uses libstdc++.so.6 and therefore should be build with gcc 5.4.0.

Then I found that there is now an unstable version of dev-libs/cyberjack (3.99.5_p10 while stable version is 3.99.5_p03-r1). And voila: Moneyplex and Hibiscus work with the unstable version (build with gcc 5.4.0).

Only disadvantage at the moment is that the unstable version doesn't build /usr/bin/cyberjack anymore, but it is only required for testing the access to the smartcard reader.

----------

