Configuring and Installing in Linux

Pages: 12
I am working with a smart-card reader. I am in the middle of debugging a short application when I realized that I probably have to have pcscd running and various other things going on to get things to work. When I run the testpcscd script or whatever, it can issue certain commands, and not others and it says, "Don't panic". I can verify that I have a reader hooked up with dmesg:
dmesg
[276108.569119] usb 4-1: USB disconnect, device number 4
[311647.828864] usb 4-1: new full-speed USB device number 5 using uhci_hcd
[311647.962874] usb 4-1: not running at top speed; connect to a high speed hub
[311647.987877] usb 4-1: New USB device found, idVendor=072f, idProduct=223b
[311647.987881] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[311647.987884] usb 4-1: Product: ACR1252 Dual Reader
[311647.987887] usb 4-1: Manufacturer: ACS

I want to both re-build and re-install PCSC lite from the above Github link because I suspect that I need certain of the below flags (eg. USB Support since I'm hooking the reader into a USB port, port 4-1 I believe). Now, my BIG question is - I cannnot just follow the below directions since I must do a "maintainer" role of autoconf, eg. autoreconf -i since all I have is a configure.ac - am I correct in saying this? Would the below instructions work or not? I need to get it right this time. And when I'm building the tools, there is a problem - the tools packager can't find PCSCLite. Why can't it? And it doesn't say how to use the build flag when building PCSCtools to get the PCSCLite in the build. It says install PCSCLite or use ./configre PCSCFLAGS=...
but it doesn't say what flags. I guess the below flags. Anyway, I'll try something with this. But why did they say just use the below Installation when it could not possibly work without a configure file. Is it because they want me to put a certain configuration in for my application?

https://github.com/LudovicRousseau/PCSC
https://github.com/LudovicRousseau/pcsc-tools

INSTALLATION:

Installation is simple. Type ./configure and then make and make install.
Options:

./configure

--enable-libusb Enable USB libusb support
(on Linux, *BSD, etc.).
--enable-usbdropdir=DIR directory containing USB drivers
(default /usr/local/pcsc/drivers)
--disable-musclecarddebug Disable MuscleCard debugging messages
--enable-debugatr Enable ATR parsing debug output
--enable-scf use SCF for reader support
--prefix=location Install to <location>
--enable-confdir=DIR Use DIR as the configuration directory
(/etc by default)
--enable-runpid=FILE Store the daemon pid in file FILE
--enable-ipcdir=DIR directory containing IPC files
(default /var/run)

Output of testpcsc:
MUSCLE PC/SC Lite unitary test Program

THIS PROGRAM IS NOT DESIGNED AS A TESTING TOOL FOR END USERS!
Do NOT use it unless you really know what you do.

Testing SCardEstablishContext : Command successful.
Testing SCardIsValidContext : Command successful.
Testing SCardIsValidContext : Invalid handle. (don't panic)
Testing SCardListReaderGroups : Command successful.
Group 01: SCard$DefaultReaders
Testing SCardFreeMemory : Command successful.
Testing SCardListReaders : Cannot find a smart card reader. (don't panic)
Testing SCardGetStatusChange
Please insert a working reader :

lsusb:
How do the Bus and Device relate to the Port? Is the Bus the Port?
Bus 004 Device 006: ID 072f:223b Advanced Card Systems, Ltd
Last edited on
i am starting over with the 1.8 distro and it almost got past make but there is some issue with .m4 files.
It said to regenerate the macro files aclocal.m4 for my libtool version which is 2.42. I did this but it errs and it's something with underquoted LIB_POSX or something.

Why is everything so sensitive to just which libtool you have. How could 2.46 be that much different from 2.42?

Now I don't know whether I should try to recompile a new libtool (version 2.46) or keep trying to get the aclocal.m4 from libtool 2.42.

I don't which is the better way.
I need to go back to an earlier version of PCSCLite
I've now gone back to an earlier version and rerun bootstrap, configure and make and it did NOT err out on the make this time although it did STILL issue a warning about the POSX stuff. So I'll proceed from here and perhaps do an install or whatever is the next step.
When I run make install, I expect that the pcscd files and stuff will be in the /usr/local/bin directory but nothing is therre.
Ok, I now realize that it put the spy part in usr/local/lib and the pcscd part in /usr/local/sbin (sbin not bin)
Now I'm trying to compile the CCID driver and it complains that I need to install PCSCLite 1.8.3 or later or use ./configure PCSC_CFLAGS=..

What is the ..?
It always says libpcsclite not found by pkgconfig, when running ./configure.

Why, when it's there!
Is it possible that you need to install the libpcsclite-dev version? (the naming scheme is different between distros, but usually there is a developer's version and a user's version. To compile against and link to it I'm pretty sure you need both)

To find the lines containing libpcsclite in your configure script run
$grep -i libpcsclite configure

Perhaps it is specifying an absolute path that is not correct?
$whereis libpcsclite


http://support.gemalto.com/fileadmin/user_upload/IAM/FAQ/How_to_install_the_PC-Link_reader_on_Linux.pdf

Good luck
Last edited on
whereis reports that it's in usr/local/lib

I would bet that the version is 1.8.14 because I had to back off 1,8.20 due to my version of libtool is only 2.42, not 2.46.
Last edited on
Here is the output of the first command:

{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcsclite\""; } >&5
($PKG_CONFIG --exists --print-errors "libpcsclite") 2>&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcsclite >= \$PCSC_NEEDED_VERSION\""; } >&5
($PKG_CONFIG --exists --print-errors "libpcsclite >= $PCSC_NEEDED_VERSION") 2>&5
pkg_cv_PCSC_CFLAGS=`$PKG_CONFIG --cflags "libpcsclite >= $PCSC_NEEDED_VERSION" 2>/dev/null`
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcsclite >= \$PCSC_NEEDED_VERSION\""; } >&5
($PKG_CONFIG --exists --print-errors "libpcsclite >= $PCSC_NEEDED_VERSION") 2>&5
pkg_cv_PCSC_LIBS=`$PKG_CONFIG --libs "libpcsclite >= $PCSC_NEEDED_VERSION" 2>/dev/null`
PCSC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpcsclite >= $PCSC_NEEDED_VERSION" 2>&1`
PCSC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpcsclite >= $PCSC_NEEDED_VERSION" 2>&1`
if test -f /usr/local/lib/pkgconfig/libpcsclite.pc -a "x$PKG_CONFIG" != x ; then
if test -f /usr/local/lib/pkgconfig/libpcsclite.pc -a "x$PKG_CONFIG" != x ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libpcsclite not found by pkg-config" >&5
$as_echo "$as_me: WARNING: libpcsclite not found by pkg-config" >&2;}
usbdropdir=`$PKG_CONFIG libpcsclite --variable=usbdropdir`
serialconfdir=`$PKG_CONFIG libpcsclite --variable=serialconfdir`
I guess my libpcsclite is version 1.0.0? Too old?
I'm now confused between libpcsclite which I installed yesterday and pcscd which I installed today ,.

I might try the test script testxxxx again I forget the name.

Then I guess I'll try the dev versions if I stil lcan't get it to work.

I guess I'm just going to try to get things to work without the CCID driver compiled and installed. There's probably another driver installed somewhere that will do the job. HEEHEE
Last edited on
I didn't know that installing a smart card reader was such a mess of a job.
I now realize that one problem might be that I don't know how to start up pcscd. When I issue the command ./pcscd, it gives the prompt back with no complaints but when I look at a list of services, it's not running.

I need to know how to start up a service.
I edited my post above with a link that might help you, let me repost it. (Edit: I don't hit refresh enough so I don't see new posts and just keep editing on my previous post when I shouldn't.)

http://support.gemalto.com/fileadmin/user_upload/IAM/FAQ/How_to_install_the_PC-Link_reader_on_Linux.pdf -- these instructions are for a Ubuntu/Debian type distro, if you have a redhat/fedora/centOS distro then I can help you with the name changes, I'm on a fedora myself.

Do me a favor and check if you have a file in this path /usr/local/lib/pkgconfig/libpcsclite.pc since that's what configure is looking for. Just make sure that it exists since the configure script is saying that it doesn't. If it does not then make sure to follow the full install directions in the link above.

(I don't think we're dealing with age of the program, rather an incomplete install, or perhaps the location of the install has changed since the configure script was written.
Last edited on
What I need to answer is why each ./configure goes through the whole process, then says install pcsc-lite when it's already installed!
Hit refresh for me, make sure you read my whole post just above this. Sorry, I'm not used to an active chat.
Does the file exist in the path that I mentioned?
Last edited on
It always says, "libpcsclite not found by pkg-config." I need to understand that WARNING. I don't think installing the "dev" version is necessary. The "dev" version is the same as what all the others are. I don't see anything different about the "dev" version.

I just need to know why the writer of the configure script makes it not find the libpscslite that I have installed. I thought that pcscd IS pcsclite. Isn't the libpcsclite.so, ... and pcsdc all part of the same make?
Pages: 12