LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-27-2009, 03:45 PM   #1
astrame
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Rep: Reputation: 0
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.
 
Old 06-27-2009, 04:20 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,745
Blog Entries: 1

Rep: Reputation: 224Reputation: 224Reputation: 224
Quote:
Originally Posted by astrame View Post
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.
 
Old 06-28-2009, 01:09 PM   #3
astrame
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Original Poster
Rep: Reputation: 0
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
 
Old 06-29-2009, 04:57 PM   #4
astrame
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Original Poster
Rep: Reputation: 0
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.
 
  


Reply

Tags
gcc, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: command 'gcc' failed with exit status 1 yuri16 Linux - Software 1 04-21-2009 01:27 AM
dpkg --set-selection package install status question kushalkoolwal Debian 2 06-19-2008 02:19 PM
ubuntu package manger is not able to load GCC ! eerpini Linux - Desktop 2 04-02-2007 08:25 AM
Failed to install gcc-2.95.3 in Fedora 3 RedAlert Fedora 1 01-07-2007 05:49 PM
gcc wont install, 'failed dependencies: glibc-devel is needed by gcc-3.3.3-41' TdlSnare Suse/Novell 3 11-29-2004 02:13 PM


All times are GMT -5. The time now is 07:59 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration