Hiya, I've been playing around with libnfc, which recently added the std=c99 flag to the compilation. Unfortunately this uses libusb-0.1 or libusb-compat-0.1, which fail with c99, and produce the following sorts of errors: libtool: compile: i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -pthread -I/usr/include/PCSC -DHAVE_PCSC_LITE -O2 -mtune=core2 -pipe -ggdb -std=c99 -MT libnfc_la-dev_pn531.lo -MD -MP -MF .deps/libnfc_la-dev_pn531.Tpo -c dev_pn531.c -fPIC -DPIC -o .libs/libnfc_la-dev_pn531.o In file included from dev_pn531.c:27: /usr/include/usb.h:73: error: expected specifier-qualifier-list before 'u_int8_t' /usr/include/usb.h:79: error: expected specifier-qualifier-list before 'u_int8_t' I talked to dsd about it and he said that libusb-0.1 wasn't maintained anymore and that upstream should consider libusb-1.0. Upstream said that libusb-1.0 wasn't on most major distributions, and so they'd be sticking with libusb-0.1 for the time being, but that most other distributions had patched their code to be ANSI compliant. They pointed me at the Debian patch [1]. Is there any chance we could apply this to the Gentoo version as well? The Debian patch assumes an earlier attribute/packed patch has been applied. I'm going to attach a patch that doesn't require anything else, and works (with modification to apply to either usb.h.in or libusb/usb.h depending on the package) on both libusb and libusb-compat. Thanks... 5:) [1] http://patch-tracking.debian.net/patch/series/view/libusb/2:0.1.12-13/01_ansi.diff
Created attachment 194266 [details, diff] libusb{-compat}-0.1-ansi.patch
I could be totally mistaken on this but on first sight it looks as if your patch introduced a circular dependency: ZeusGentoo2 ~ # emerge -upvD world These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild U ] sys-libs/libraw1394-2.0.0 [1.3.0_p20080114] USE="(-juju%)" 0 kB [ebuild NS ] sys-kernel/gentoo-sources-2.6.30-r1 [2.6.29-r4] USE="-build -symlink" 0 kB [ebuild U ] dev-python/sip-4.8.1 [4.8] USE="doc -debug" 0 kB [ebuild U ] x11-misc/xkeyboard-config-1.6 [1.5] 0 kB [ebuild U ] x11-proto/dri2proto-2.1 [2.0] 0 kB [ebuild U ] x11-proto/glproto-1.4.10 [1.4.9] 0 kB [ebuild NS ] dev-libs/libusb-0.1.12-r5 [1.0.1] USE="doc -debug -nocxx" 0 kB [ebuild U ] app-crypt/qca-2.0.2-r2 [2.0.2-r1] USE="doc -debug -examples" 0 kB [ebuild U ] x11-libs/qt-3.3.8b-r2 [3.3.8b-r1] USE="cups doc ipv6 mysql opengl xinerama -debug -examples (-firebird) -immqt -immqt-bc -nas -nis -odbc -postgres -sqlite" 0 kB [ebuild U ] app-doc/doxygen-1.5.8-r1 [1.5.8] USE="doc qt4 -debug -latex -nodot" 0 kB [ebuild U ] media-libs/libdc1394-2.1.0 [2.0.3] USE="X doc (-juju%)" 0 kB [ebuild U ] dev-python/PyQt4-4.5.1 [4.5] USE="X dbus doc kde opengl phonon svg webkit -assistant -debug -examples -sql -xmlpatterns (-qt3support%*)" 0 kB [ebuild U ] kde-base/kdebase-data-4.2.4-r1 [4.2.4] USE="(-kdeprefix)" 0 kB [ebuild U ] kde-base/pykde4-4.2.4-r2 [4.2.4-r1] USE="akonadi -debug -examples (-kdeprefix) -semantic-desktop" 0 kB [ebuild U ] media-libs/libgphoto2-2.4.6 [2.4.5] USE="doc exif hal nls -bonjour" CAMERAS="canon -adc65 -agfa_cl20 -aox -barbie -casio_qv -clicksmart310 -digigr8 -digita -dimagev -dimera3500 -directory -enigma13 -fuji -gsmart300 -hp215 -iclick -jamcam -jd11 -jl2005a -kodak_dc120 -kodak_dc210 -kodak_dc240 -kodak_dc3200 -kodak_ez200 -konica -konica_qm150 -largan -lg_gsm -mars -mustek -panasonic_coolshot -panasonic_dc1000 -panasonic_dc1580 -panasonic_l859 -pccam300 -pccam600 -polaroid_pdc320 -polaroid_pdc640 -polaroid_pdc700 -ptp2 -ricoh -ricoh_g3 -samsung -sierra -sipix_blink -sipix_blink2 -sipix_web2 -smal -sonix -sony_dscf1 -sony_dscf55 -soundvision -spca50x -sq905 -stv0674 -stv0680 -sx330z -template -topfield -toshiba_pdrm11" 0 kB [ebuild U ] x11-base/xorg-server-1.6.1.901-r3 [1.5.3-r6] USE="hal ipv6 nptl xorg -debug -dmx -kdrive -minimal -sdl -tslib (-3dfx%)" INPUT_DEVICES="joystick keyboard mouse -acecad -aiptek -calcomp -citron -digitaledge -dmc -dynapro -elo2300 -elographics -evdev -fpit -hyperpen -jamstudio -magellan -microtouch -mutouch -palmax -penmount -spaceorb -summa -synaptics -tek4957 -tslib -ur98 -virtualbox -vmmouse -void -wacom" VIDEO_CARDS="fbdev nv nvidia vesa -apm -ark -ast -chips -cirrus -dummy -epson -fglrx (-geode) -glint -i128 (-i740) (-impact) (-imstt) -intel -mach64 -mga -neomagic -r128 -radeon -radeonhd -rendition -s3 -s3virge -savage -siliconmotion -sis -sisusb (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx -tga -trident -tseng -v4l (-vermilion) -via -virtualbox -vmware -voodoo (-xgi) (-newport%)" 0 kB [blocks B ] dev-libs/libusb-compat ("dev-libs/libusb-compat" is blocking dev-libs/libusb-0.1.12-r5) [blocks B ] dev-libs/libusb:0 ("dev-libs/libusb:0" is blocking dev-libs/libusb-compat-0.1.0) Total: 16 packages (14 upgrades, 2 in new slots), Size of downloads: 0 kB Conflict: 2 blocks (2 unsatisfied) * Error: The above package list contains packages which cannot be * installed at the same time on the same system. ('installed', '/', 'dev-libs/libusb-compat-0.1.0', 'nomerge') pulled in by dev-libs/libusb-compat required by ('installed', '/', 'sys-apps/hal-0.5.12_rc1-r6', 'nomerge') dev-libs/libusb-compat required by ('ebuild', '/', 'media-libs/libgphoto2-2.4.6', 'merge') dev-libs/libusb-compat required by ('installed', '/', 'sys-apps/usbutils-0.82', 'nomerge') (and 3 more) ('ebuild', '/', 'dev-libs/libusb-0.1.12-r5', 'merge') pulled in by dev-libs/libusb:0 required by ('installed', '/', 'media-gfx/sane-backends-1.0.19-r2', 'nomerge') For more information about Blocked Packages, please refer to the following section of the Gentoo Linux x86 Handbook (architecture is irrelevant): http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?full=1#blocked
Andre: That's not a circular dep, but rather a conflict between what's declared. sane-backends is saying it MUST have libusb:0, while you presently have libusb-compat installed.
(In reply to comment #3) > Andre: That's not a circular dep, but rather a conflict between what's > declared. sane-backends is saying it MUST have libusb:0, while you presently > have libusb-compat installed. Fair enough, but what's the solution?
OK I unmerged libusb-compat manually first, which removed the blocker. An emerge --depclean further removed libusb-1.0.1. Not sure that this is what I want but this bug suggests that's the case...
Sorry, I missed the original reason for this bug with Andre's interjection. It's added to both libusb-compat and the original libusb-0* now. Give me a shout about libnfc sometime soon via IRC please?