Skip to content

Installation is failing on Linux distributions #3

Description

@sarkaaa

Running make produces the following output:

rm -rf bin
mkdir bin
clang++ -framework PCSC -std=c++11 -o bin/webcard webcard.cpp
In file included from webcard.cpp:5:
./webcard.h:9:10: fatal error: 'winscard.h' file not found
#include <winscard.h>
         ^~~~~~~~~~~~
1 error generated.
make: *** [makefile:34: webcard] Error 1

Patching the makefile as follows:

diff --git a/native/makefile b/native/makefile
index a6dd7ed..949ac23 100644
--- a/native/makefile
+++ b/native/makefile
@@ -22,7 +22,7 @@ endif
 
 CC := clang++
 
-PCSC_CFLAGS := -framework PCSC
+PCSC_CFLAGS := -framework PCSC -I/usr/include/PCSC/
 
 CXXFLAGS += $(PCSC_CFLAGS)

Running make again:

rm -rf bin
mkdir bin
clang++ -framework PCSC -I/usr/include/PCSC/ -std=c++11 -o bin/webcard webcard.cpp
webcard.cpp:135:3: error: use of undeclared identifier 'mbstowcs_s'
                mbstowcs_s<256>(&ccNumChar, buffer, "\\\\?PnP?\\Notification", 128);
                ^
webcard.cpp:138:41: error: assigning to 'const char *' from incompatible type 'wchar_t [256]'
                _rgReaderStates[_cReaders].szReader = buffer;
                                                      ^~~~~~
2 errors generated.
make: *** [makefile:34: webcard] Error 1

Tried on the following platforms

Ubuntu 20.04.1 LTS

$ dpkg -l | grep '^ii' | awk '{print $2 "\t" $3}' | grep -e clang -e pcsc:

clang	1:10.0-50~exp1
clang-10	1:10.0.0-4ubuntu1
libclang-common-10-dev	1:10.0.0-4ubuntu1
libclang-cpp10	1:10.0.0-4ubuntu1
libclang1-10	1:10.0.0-4ubuntu1
libpcsc-perl	1.4.14-4build2
libpcsclite-dev	1.8.26-3
libpcsclite1:amd64	1.8.26-3
pcsc-tools	1.5.5-1
pcscd	1.8.26-3

Fedora 32

rpm -qa | grep -e pcsc -e clang:

pcsc-lite-libs-1.9.0-1.fc32.x86_64
pcsc-tools-1.5.4-2.fc32.x86_64
pcsc-perl-1.4.14-13.fc32.x86_64
pcsc-lite-acsccid-1.1.8-2.fc32.x86_64
clang-libs-10.0.1-3.fc32.x86_64
clang-devel-10.0.1-3.fc32.x86_64
clang6.0-libs-6.0.1-8.fc30.x86_64
pcsc-lite-ccid-1.4.33-1.fc32.x86_64
clang-10.0.1-3.fc32.x86_64
pcsc-lite-devel-1.9.0-1.fc32.x86_64
pcsc-lite-1.9.0-1.fc32.x86_64
clang-tools-extra-10.0.1-3.fc32.x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions