I just tried to update opensc to dev-libs/opensc-0.11.1-r1; with USE flags of "X ldap pam pcsc-lite openct" set in /etc/portage/package.use, I receive an error regarding not finding the symbol "SCARD_SCOPE_GLOBAL". Apparently, this was taken out of the pcsc-lite include file "/usr/include/PCSC/pcsclite.h" and placed into an internal include file ("pcscd.h"). Various sources (e.g., http://www.mail-archive.com/muscle@lists.musclecard.com/msg06073.html) indicate this symbol really shouldn't be used. There are a variety of ways to fix - the one I'm attaching below simply moves the declaration out of the WIN32 protected #ifdef in the opensc/src/libopensc/reader-pcsc.c - the one suggested in the above link is effectively identical. Reproducible: Always Steps to Reproduce: 1.enable USE flags as above 2.emerge -v dev-libs/opensc 3.error occurs Actual Results: if /bin/sh ../../libtool --tag=CC --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src/inclu de -pthread -I/usr/include/PCSC -I../../src/include -Wall -fno-strict-aliasing -Os -pipe -march=pentium-m -mtune =pentium-m -fweb -ftracer -MT reader-pcsc.lo -MD -MP -MF ".deps/reader-pcsc.Tpo" -c -o reader-pcsc.lo reader-pcsc.c; \ then mv -f ".deps/reader-pcsc.Tpo" ".deps/reader-pcsc.Plo"; else rm -f ".deps/reader-pcsc.Tpo"; exit 1; fi i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src/include -pthread -I/usr/include/PCSC -I../../src/incl ude -Wall -fno-strict-aliasing -Os -pipe -march=pentium-m -mtune=pentium-m -fweb -ftracer -MT reader-pcsc.lo -MD -MP -MF .deps/reader-pcsc.Tpo -c reader-pcsc.c -fPIC -DPIC -o .libs/reader-pcsc.o reader-pcsc.c: In function 'pcsc_init': reader-pcsc.c:687: error: 'SCARD_SCOPE_GLOBAL' undeclared (first use in this function) reader-pcsc.c:687: error: (Each undeclared identifier is reported only once reader-pcsc.c:687: error: for each function it appears in.) make[3]: *** [reader-pcsc.lo] Error 1 make[3]: Leaving directory `/scratch/portage/tmp/portage/dev-libs/opensc-0.11.1-r1/work/opensc-0.11.1/src/libopensc' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/scratch/portage/tmp/portage/dev-libs/opensc-0.11.1-r1/work/opensc-0.11.1/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/scratch/portage/tmp/portage/dev-libs/opensc-0.11.1-r1/work/opensc-0.11.1' make: *** [all] Error 2 !!! ERROR: dev-libs/opensc-0.11.1-r1 failed. Call stack: ebuild.sh, line 1614: Called dyn_compile ebuild.sh, line 971: Called qa_call 'src_compile' environment, line 3466: Called src_compile opensc-0.11.1-r1.ebuild, line 45: Called die !!! (no error message) !!! If you need support, post the topmost build error, and the call stack if relevant. !!! A complete build log is located at '/scratch/portage/logs/dev-libs:opensc-0.11.1-r1:20070306-053241.log'. Expected Results: Should have successfully emerged. Portage 2.1.2.1 (default-linux/x86/2006.1, gcc-4.1.2, glibc-2.5-r0, 2.6.20-gentoo i686) ================================================================= System uname: 2.6.20-gentoo i686 Intel(R) Pentium(R) M processor 1700MHz Gentoo Base System release 1.12.9 Timestamp of tree: Mon, 05 Mar 2007 18:31:01 +0000 dev-java/java-config: 1.3.7, 2.0.31-r3 dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.3.14 sys-devel/libtool: 1.5.23b virtual/os-headers: 2.6.20-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-Os -pipe -march=pentium-m -mtune=pentium-m -fweb -ftracer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /opt/openjms/config /usr/NX/etc /usr/NX/home /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/fax /usr/share/X11/xkb /usr/share/config /var/spool/fax/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-Os -pipe -march=pentium-m -mtune=pentium-m -fweb -ftracer" DISTDIR="/mnt/sda/portage/portage/distfiles" FEATURES="autoconfig distlocks fixpackages metadata-transfer sandbox sfperms strict userpriv" GENTOO_MIRRORS="ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://mirror.datapipe.net/gentoo ftp://mirror.mcs.anl.gov/pub/gentoo/" LANG="C" LC_ALL="C" LINGUAS="en en_US hi_IN" PKGDIR="/mnt/sda/portage/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/scratch/portage/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/mnt/sda/portage/usr/local/portage /mnt/sda/portage/opt/ibm/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="berkdb bitmap-fonts cli cracklib crypt cups dri fortran gdbm gpm iconv ipv6 isdnlog libg++ midi ncurses nls nptl nptlonly pam pcre perl ppds pppd python readline reflection session spl ssl tcpd truetype-fonts type1-fonts unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" CAMERAS="adc65 agfa-cl20 aox barbie canon casio clicksmart310 digigr8 digita dimera directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 kodak konica largan lg_gsm mars minolta mustek panasonic pccam300 pccam600 polaroid ptp2 ricoh samsung sierra sipix smal sonix sonydscf1 sonydscf55 soundvision spca50x sq905 stv0674 stv0680 sx330z template toshiba" ELIBC="glibc" INPUT_DEVICES="acecad aiptek calcomp citron digitaledge dmc dynapro elo2300 elographics evdev fpit hyperpen jamstudio joystick keyboard magellan magictouch microtouch mouse mutouch palmax penmount spaceorb summa synaptics tek4957 ur98 vmmouse void wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US hi_IN" LIRC_DEVICES="act200l act220l adaptec all alsa_usb animax atilibusb atiusb audio audio_alsa avermedia avermedia98 avermedia_vdomate bestbuy bestbuy2 breakoutbox bte bw6130 caraca chronos cmdir com1 com2 com3 com4 cph06x creative creative_infracd devinput digimatrix dsp dvico ea65 exaudio flyvideo gvbctv5pci hauppauge hauppauge_dvb hercules_smarttv_stereo igorplugusb imon imon_pad imon_pad2keys imon_rsc inputlirc irdeo irdeo_remote irman irreal it87 knc_one kworld leadtek_0007 leadtek_0010 leadtek_pvr2000 livedrive_midi livedrive_seq logitech lpt1 lpt2 mceusb mceusb2 mediafocusI mouseremote mouseremote_ps2 mp3anywhere nslu2 packard_bell parallel pcmak pcmak_usb pctv pixelview_bt878 pixelview_pak pixelview_pro provideo realmagic remotemaster remote_wonder_plus sa1100 sasem serial serial_igor_cesko silitek sir slinke streamzap tekram tekram_bt829 tira tvbox udp uirt2 uirt2_raw usbirboy userspace xboxusb" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy epson fbdev fglrx glint i128 i740 i810 imstt mach64 mga neomagic nsc nv nvidia r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 112248 [details, diff] reader-pcsc.c.patch
Created attachment 112250 [details] opensc-0.11.1-r2.ebuild
Thanks! Fixed, just added #ifndef guard.