OPENOCD on Mac Lion

Hi,

Im trying to install opened from git on my iMac (Intel) Lion (10.7.2) and it seems to not working…

My configuration: ./configure --enable-maintainer-mode --enable-jlink

Try to “make” become following Errors:

usb_common.h:28: warning: ‘struct usb_dev_handle’ declared inside parameter list

usb_common.h:28: warning: its scope is only this definition or declaration, which is probably not what you want

usb_common.c:27: warning: ‘struct usb_device’ declared inside parameter list

usb_common.c: In function ‘jtag_usb_match’:

usb_common.c:31: error: dereferencing pointer to incomplete type

usb_common.c:32: error: dereferencing pointer to incomplete type

usb_common.c: At top level:

usb_common.c:41: warning: ‘struct usb_dev_handle’ declared inside parameter list

usb_common.c:42: error: conflicting types for ‘jtag_usb_open’

usb_common.h:28: error: previous declaration of ‘jtag_usb_open’ was here

usb_common.c: In function ‘jtag_usb_open’:

usb_common.c:43: warning: implicit declaration of function ‘usb_find_busses’

usb_common.c:44: warning: implicit declaration of function ‘usb_find_devices’

usb_common.c:46: warning: implicit declaration of function ‘usb_get_busses’

usb_common.c:46: warning: initialization makes pointer from integer without a cast

usb_common.c:47: error: dereferencing pointer to incomplete type

usb_common.c:49: error: dereferencing pointer to incomplete type

usb_common.c:49: error: ‘struct usb_device’ declared in ‘for’ loop initial declaration

usb_common.c:49: error: dereferencing pointer to incomplete type

usb_common.c:51: warning: passing argument 1 of ‘jtag_usb_match’ from incompatible pointer type

usb_common.c:54: warning: implicit declaration of function ‘usb_open’

usb_common.c:54: warning: assignment makes pointer from integer without a cast

make[6]: *** [usb_common.lo] Error 1

make[5]: *** [all-recursive] Error 1

make[4]: *** [all] Error 2

make[3]: *** [all-recursive] Error 1

make[2]: *** [all] Error 2

make[1]: *** [all-recursive] Error 1

make: *** [all] Error 2

Can someone help, please?

THX a lot!

Sebastian

Hi everyone,

i get the same output on my Macbook running OSX 10.6.8 when i try to compile openocd 0.5.0.

My configuration: ./configure --enable-usbprog --enable-ft2232_libftdi

Did anyone find a solution or has an idea to fix it? Are there known problems with the usb_common.c ?

Well, any help is appreciated…

Ok, after all i have openocd running…

I manually uninstalled all libusb dependencies via terminal (http://forums.macrumors.com/showthread.php?t=901978)

Again i installed libusb-devel from macports (sudo port install libusb-devel) and libusb for OSX 10.6 (http://www.macsven.de/libusb_10.6.html). Now I downloaded openocd 0.4.0 and patched it (http://code.google.com/p/usbprog-jtag/s … svn14&r=14).

now i finally could compile and install openocd with usbprog enabled! yeppyepp

My problem was, i think, to have had a bunch of funny lib-usb installations parallel - i sort of got lost in too many different installations on my way to get it running.

best regards+++