Lowyat.NET Forums

Welcome Guest ( Log In | Register )

Paypal WTS topics will be closed after 14 Nov. Read here.
 
RSS feedBump TopicReply to this topicStart new topicStart Poll

Outline · [ Standard ] · Linear+

> Ubuntu installing pyscard - gcc failed, Error in installing pyscard module

astrame
post Jun 28 2009, 04:41 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #1


Newbie
*

Group: New Member
Posts: 1
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jun 2009





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.


User is offlineProfile CardPM
Go to the top of the page
+Quote Post
aranur
post Jun 28 2009, 12:56 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #2


Regular
******

Group: Senior Member
Posts: 1,491
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Dec 2004
From: Gombak





gcc file not exist may refer to missing link to gcc or missing path setting in your bash rc. i'm not familiar with python, though i'd guess much of the error might be due to winscard.h missing or unreadable
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ninty
post Jul 2 2009, 03:09 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #3


Newbie
*

Group: Junior Member
Posts: 29
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Nov 2007





doesn't seem to be a python error
i'm leaning more towards a compiler error
or maybe even dependency problems

if it was a python error though, most likely a versioning issue rather than anything big

try double-checking dependencies?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Bump TopicReply to this topicTopic OptionsStart new topic
 

Lo-Fi Version Time is now: 9th November 2009 - 02:07 AM
All Rights Reserved 2003-2009 Vijandren Ramadass (~living on a prayer~)