Closed lcosmin closed 8 years ago
Generally speaking this is an issue with Java. I try to work around the problem with https://github.com/martinpaljak/apdu4j/blob/master/src/apdu4j/TerminalManager.java#L4, should add a FAQ entry and probably generalize the .so lookup even more. Good ideas and patches are most welcome.
It seems that git clone --recursive https://github.com/martinpaljak/GlobalPlatformPro
doesn't checkout the latest commit from martinpalijak/apdu4j
(the one which includes the correct libpcsclite.so.1
path for ubuntu 64bit), so that was the problem I was seeing before.
I cleaned up TerminalManager.java
a bit (https://github.com/lcosmin/apdu4j/commit/c52cebe6f49053dc1ef07f98186a95bfde34b9a1) ; if it looks ok to you, I could send a pull request.
Thanks, will have a look. I'm not really sure if just looping or trying trying to be "platform-aware" is the best choice, or a mix of both. But I'll leave this open until it gets fixed one way or another.
I can confirm that the 'sudo mkdir /usr/lib64 ; sudo ln -s /lib/x86_64-linux-gnu/libpcsclite.so.1.0.0 /usr/lib64/libpcsclite.so' is required for Ubuntu 14.04.3 64-bit in order for gp.jar to work.
PS: In https://subgraph.com/sgos/documentation/smartcards/index.en.html, 'git clone https://github.com/martinpaljak/GlobalPlatform.git' requires adding '--recursive ' for apdu4j to be cloned as well: git clone --recursive https://github.com/martinpaljak/GlobalPlatform.git
I can't vouch for out of date or otherwise incorrect information on other websites. The --recrusvie information has been there ever since it became required: https://github.com/martinpaljak/GlobalPlatformPro#get-it-now
@lcosmin after giving it some thought, I'll not pull your change - it is a ugly hack but having it more verbosely for different platforms allows a more fine-grained control and also allows to print (possibly) useful hints to the user, like for FreeBSD. Updated the apdu4j reference and shall make a release shortly. If possible, please confirm that master works for you currently.
I'm new to the whole smartcard business, so I might have missed something, but in Ubuntu 15.04
gp.jar
is not working unless I explicitely create a symlink tolibpcsclite.so.1.0.0
in/usr/lib64
, like so:Using a compiled
gp.jar
from the current HEAD.I guess there should be some sort of error message to explain what's going on, it took me a while to find this workaround...