On Sun, Apr 01, 2012 at 12:35:08 (CEST), Ludovic Rousseau wrote:

> Le 01/04/12 09:07, Frank Neuber a écrit :
>> Hi,
>
> Hello,
>
>> in the build log I found:
>> checking if PC/SC should be used... yes
>> checking for pcsc includes... -I/usr/include -I/usr/include/PCSC
>> configure: WARNING: No pcsc libraries found, SCard driver will not be 
>> available.
>>
>> This is why pcsclite.h is not found.
>> I wonder why /usr/include/PCSC/winscard.h is available. The pcsclite.h file 
>> is in the same package!
>> sct@u110432b:~$ dpkg -S winscard.hlibpcsclite-dev
>> libpcsclite-dev: /usr/include/PCSC/winscard.h
>> sct@u110432b:~$ dpkg -S pcsclite.h
>> libpcsclite-dev: /usr/include/PCSC/pcsclite.h
>>
>> Could it be a problem with the libpcsclite-dev on the build system.
>> I don't know how the build system works. On my system it builds well.
>
> The problem is that libpcsclite1 is now a multi arch library.
> So the lib libpcsclite.so is no more in /usr/lib/libpcsclite.so but in
> /usr/lib/x86_64-linux-gnu/libpcsclite.so on AMD64 systems.
>
> The configure script of pcsc-cyberjack searches the library using a
> fixed list of directories. From  m4/pcsc.m4 line 68:
>
>     AC_ARG_WITH(pcsc-libs, [  --with-pcsc-libs=DIR  adds pcsc library
> path],
>       [pcsc_search_lib_dirs="$withval"],
>       [pcsc_search_lib_dirs="/usr/lib64 \
>                           /usr/lib \
>                           /usr/local/lib \
>                           /usr/lib/pcsc/lib \
>                       /usr/local/pcsc/lib \
>                       /lib"])
>     dnl search for pcsc libs
>     for d in $pcsc_search_lib_dirs; do
>        AQ_SEARCH_FILES("$d",$pcsc_search_lib_names)
>        if test -n "$found_file" ; then
>           pcsc_libraries="-L$d"
>           pcsc_lib="-l`echo $found_file | sed 's/lib//;s/\.so*//;s/\.a//'`"
>           break
>        fi
>     done
>
> As you can see /usr/lib/x86_64-linux-gnu is not in the list.
>
> A (too) simple patch is:
> --- ../pcsc.m4        2012-04-01 12:18:38.000000000 +0200
> +++ m4/pcsc.m4        2012-04-01 12:27:48.000000000 +0200
> @@ -68,6 +68,7 @@
>      AC_ARG_WITH(pcsc-libs, [  --with-pcsc-libs=DIR  adds pcsc library
> path],
>        [pcsc_search_lib_dirs="$withval"],
>        [pcsc_search_lib_dirs="/usr/lib64 \
> +             /usr/lib/x86_64-linux-gnu \
>                            /usr/lib \
>                         /usr/local/lib \
>                            /usr/lib/pcsc/lib \
>
>
> But build will fail on all the other Debian architectures.
>
> The problem should be solved upstream. Using a fixed list of library
> directories is a bad idea. The correct solution is to _link_ with
> libpcsclite to know if the library is found by the linker.

I fully concur with Ludovic.

Btw, the file can also be examined online here:

http://anonscm.debian.org/gitweb/?p=collab-maint/pcsc-cyberjack.git;a=blob;f=m4/pcsc.m4

AFAIUI, Martin Preuss, the original author of that file, does no longer
work on it and Frank has taken over maintenance of the whole
pcsc-cyberjack package. Frank, is this correct?

In any case, I'd suggest to drop the file m4/pcsc.m4 package completely,
and replace it with pkg-config, because It seems that pcsc-lite does
provide a proper libpcsclite.pc file:

http://anonscm.debian.org/viewvc/pcsclite/trunk/PCSC/src/libpcsclite.pc.in?revision=2721&view=markup

pkg-config does work on all platforms that m4/pcsc.m4 implements (i.e.,
windows, macosx and linux), and is implemented technically much superior
way.

Cheers,
Reinhard.

-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to