LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Install pyscard package on Ubuntu : error gcc failed with status 1 (https://www.linuxquestions.org/questions/linux-newbie-8/install-pyscard-package-on-ubuntu-error-gcc-failed-with-status-1-a-736085/)

astrame 06-27-2009 03:45 PM

Install pyscard package on Ubuntu : error gcc failed with status 1
 
Hi,

I am new to ubuntu. I am trying to install the pyscard module of python and I am getting an error message. I already have gcc, swig and pcsc-lite installed. The command I used to install was from the README of pyscard (exact command is : /usr/bin/python setup.py build_ext install ). The error message i got is given below. In the last line it is written that gcc failed. So I checked for gcc version by using "gcc-v". This gave the version number as GCC4.2.3. When I type only gcc on the terminal than there is an error message saying that no file gcc exist.

ERROR MESSAGE :

mini2@mini2:~/Documents/HBOT/pyscard-1.6.7$ /usr/bin/python setup.py build_ext install
running build_ext
building 'smartcard.scard._scard' extension
swigging smartcard/scard/scard.i to smartcard/scard/scard_wrap.c
swig -python -outdir smartcard/scard -DPCSCLITE -o smartcard/scard/scard_wrap.c smartcard/scard/scard.i
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPCSCLITE=1 -Ismartcard/scard/ -I/usr/include/PCSC -I/usr/include/python2.5 -c smartcard/scard/helpers.c -o build/temp.linux-i686-2.5/smartcard/scard/helpers.o
smartcard/scard/helpers.c:28:22: error: winscard.h: No such file or directory
In file included from smartcard/scard/helpers.c:35:
smartcard/scard/helpers.h:47: error: expected specifier-qualifier-list before ‘SCARDCONTEXT’
smartcard/scard/helpers.h:52: error: expected specifier-qualifier-list before ‘SCARD_READERSTATE’
smartcard/scard/helpers.h:60: error: expected specifier-qualifier-list before ‘SCARDCONTEXT’
smartcard/scard/helpers.h:67: error: expected specifier-qualifier-list before ‘SCARDCONTEXT’
smartcard/scard/helpers.h:94: error: expected ‘)’ before ‘source’
smartcard/scard/helpers.h:95: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘SCardHelper_PyScardContextToSCARDCONTEXT’
smartcard/scard/helpers.h:98: error: expected ‘)’ before ‘source’
smartcard/scard/helpers.h:99: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘SCardHelper_PyScardHandleToSCARDHANDLE’
smartcard/scard/helpers.c: In function ‘_ReaderStateFromTuple’:
smartcard/scard/helpers.c:95: error: ‘READERSTATELIST’ has no member named ‘aszReaderNames’
smartcard/scard/helpers.c:96: error: ‘READERSTATELIST’ has no member named ‘aszReaderNames’
smartcard/scard/helpers.c:101: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:101: error: ‘READERSTATELIST’ has no member named ‘aszReaderNames’
smartcard/scard/helpers.c:102: error: ‘READERSTATELIST’ has no member named ‘aszReaderNames’
smartcard/scard/helpers.c:106: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c: In function ‘SCardHelper_PyGuidListToGUIDLIST’:
smartcard/scard/helpers.c:409: error: ‘GUIDLIST’ has no member named ‘hcontext’
smartcard/scard/helpers.c: In function ‘SCardHelper_AppendReaderStateListToPyObject’:
smartcard/scard/helpers.c:488: error: ‘READERSTATELIST’ has no member named ‘cRStates’
smartcard/scard/helpers.c:489: error: ‘READERSTATELIST’ has no member named ‘cRStates’
smartcard/scard/helpers.c:499: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:500: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:501: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:502: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:504: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c: In function ‘SCardHelper_PyReaderStateListToREADERSTATELIST’:
smartcard/scard/helpers.c:585: error: ‘READERSTATELIST’ has no member named ‘cRStates’
smartcard/scard/helpers.c:587: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:587: error: ‘SCARD_READERSTATE’ undeclared (first use in this function)
smartcard/scard/helpers.c:587: error: (Each undeclared identifier is reported only once
smartcard/scard/helpers.c:587: error: for each function it appears in.)
smartcard/scard/helpers.c:588: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:595: error: ‘READERSTATELIST’ has no member named ‘aszReaderNames’
smartcard/scard/helpers.c:596: error: ‘READERSTATELIST’ has no member named ‘aszReaderNames’
smartcard/scard/helpers.c:599: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:614: error: ‘READERSTATELIST’ has no member named ‘aszReaderNames’
smartcard/scard/helpers.c:616: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c: In function ‘SCardHelper_PrintReaderStateList’:
smartcard/scard/helpers.c:633: error: ‘READERSTATELIST’ has no member named ‘cRStates’
smartcard/scard/helpers.c:636: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:637: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:638: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:639: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:640: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:642: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:646: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:646: error: ‘SCARD_STATE_UNAWARE’ undeclared (first use in this function)
smartcard/scard/helpers.c:650: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:650: error: ‘SCARD_STATE_IGNORE’ undeclared (first use in this function)
smartcard/scard/helpers.c:654: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:654: error: ‘SCARD_STATE_CHANGED’ undeclared (first use in this function)
smartcard/scard/helpers.c:658: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:658: error: ‘SCARD_STATE_UNKNOWN’ undeclared (first use in this function)
smartcard/scard/helpers.c:662: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:662: error: ‘SCARD_STATE_UNAVAILABLE’ undeclared (first use in this function)
smartcard/scard/helpers.c:666: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:666: error: ‘SCARD_STATE_EMPTY’ undeclared (first use in this function)
smartcard/scard/helpers.c:670: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:670: error: ‘SCARD_STATE_PRESENT’ undeclared (first use in this function)
smartcard/scard/helpers.c:674: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:674: error: ‘SCARD_STATE_ATRMATCH’ undeclared (first use in this function)
smartcard/scard/helpers.c:678: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:678: error: ‘SCARD_STATE_EXCLUSIVE’ undeclared (first use in this function)
smartcard/scard/helpers.c:682: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:682: error: ‘SCARD_STATE_INUSE’ undeclared (first use in this function)
smartcard/scard/helpers.c:686: error: ‘READERSTATELIST’ has no member named ‘ars’
smartcard/scard/helpers.c:686: error: ‘SCARD_STATE_MUTE’ undeclared (first use in this function)
smartcard/scard/helpers.c: At top level:
smartcard/scard/helpers.c:699: error: expected ‘)’ before ‘source’
smartcard/scard/helpers.c:738: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘SCardHelper_PyScardContextToSCARDCONTEXT’
smartcard/scard/helpers.c:769: error: expected ‘)’ before ‘source’
smartcard/scard/helpers.c:808: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘SCardHelper_PyScardHandleToSCARDHANDLE’
smartcard/scard/helpers.c: In function ‘SCardHelper_AppendStringToPyObject’:
smartcard/scard/helpers.c:917: error: ‘STRING’ has no member named ‘sz’
smartcard/scard/helpers.c:919: error: ‘STRING’ has no member named ‘sz’
smartcard/scard/helpers.c: In function ‘SCardHelper_PyStringToString’:
smartcard/scard/helpers.c:986: error: ‘STRING’ has no member named ‘sz’
smartcard/scard/helpers.c:987: error: ‘STRING’ has no member named ‘sz’
smartcard/scard/helpers.c:993: error: ‘STRING’ has no member named ‘sz’
smartcard/scard/helpers.c: In function ‘SCardHelper_PrintString’:
smartcard/scard/helpers.c:1008: error: ‘STRING’ has no member named ‘sz’
smartcard/scard/helpers.c: In function ‘SCardHelper_AppendStringListToPyObject’:
smartcard/scard/helpers.c:1031: error: ‘STRINGLIST’ has no member named ‘ac’
smartcard/scard/helpers.c: In function ‘SCardHelper_PyStringListToStringList’:
smartcard/scard/helpers.c:1143: error: ‘STRINGLIST’ has no member named ‘hcontext’
smartcard/scard/helpers.c:1147: error: ‘STRINGLIST’ has no member named ‘ac’
smartcard/scard/helpers.c:1148: error: ‘STRINGLIST’ has no member named ‘ac’
smartcard/scard/helpers.c:1155: error: ‘STRINGLIST’ has no member named ‘ac’
smartcard/scard/helpers.c:1165: error: ‘STRINGLIST’ has no member named ‘ac’
smartcard/scard/helpers.c: In function ‘SCardHelper_PrintStringList’:
smartcard/scard/helpers.c:1177: error: ‘STRINGLIST’ has no member named ‘ac’
error: command 'gcc' failed with exit status 1
mini2@mini2:~/Documents/HBOT/pyscard-1.6.7$


Thank you for your help.

weibullguy 06-27-2009 04:20 PM

Quote:

Originally Posted by astrame (Post 3588357)
smartcard/scard/helpers.c:28:22: error: winscard.h: No such file or directory

Sometimes it's tough to see the error in all the gobbledy gook on the screen. According to this site, winscard.h is provided by the package libpcslite-dev.

astrame 06-28-2009 01:09 PM

Hi you are right the winscard.h belong to libpcsc-lite. I downloaded the libpcsclite-dev.deb file for this package. When I tried installing it, the ubuntu package manager gives the error :

ERROR : the dependancy is not satisfiable : libpcsclite1
But when I tried installing the libpcsclite-dev, it still gave the same error.

Please help.

Thank you

astrame 06-29-2009 04:57 PM

Finally I got the module installed. It was the pcsc-lite which was missing and I was tryiing to install the Ubuntu karmic version of it on my Ubuntu hardy OS.

The program that I am trying to run is RFIDIOt and it still is not getting compiled.

On the repository on Ubuntu, the pyscard module is available in only two versions : karmic and jaunty. Does that indicates that for all other versions of Ubuntu pyscard module might not work ?

Thanks for the help. :)


All times are GMT -5. The time now is 05:28 AM.