Compiling OpenOCD on Mac OS X for jlink

I am trying to compile the latest repository version of the code under Mac OS X (Snow Leopard 10.6.2) using the following configure command:

./configure --enable-jlink --enable-rlink

and I am getting the following error:

...
libtool: link: gcc -std=gnu99 -g -O2 -I/Users/loudon/openocd/include -Wall -Wstrict-prototypes -Wformat-security -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -o openocd main.o  -L/Users/loudon/openocd/lib ./.libs/libopenocd.a /usr/local/lib/libusb.dylib
ld: warning: in /usr/local/lib/libusb.dylib, file is not of required architecture
Undefined symbols:
  "_usb_release_interface", referenced from:
      _rlink_quit in libopenocd.a(rlink.o)
  "_usb_bulk_read", referenced from:
      _rlink_reset in libopenocd.a(rlink.o)
...

I have libusb v0.1.4.4.4 installed at /usr/local/lib

I also have libusb from MacPort installed at /opt/local/lib.

I can’t figure out how to resolve this issue.

Thanks,

Steve

You should configure with --enable-maintainer-mode - it’s required for builds of git snapshots.

4/3!!

Please follow up if that builds and works. I have been using a dusty old OpenOCD that I built from SVN many many revisions ago; would like to hear a success story on OSX before pulling the latest source and making a new attempt at a build.

There are success stories on the mailing list, which should be your primary source of knowledge.

4/3!!