On Jan 9, 2014, at 8:10 AM, Paul Fertser wrote:

> On Thu, Jan 09, 2014 at 08:02:16AM +0100, Colin Howarth wrote:
>> I'm trying to compile OpenOCD-0.7.0 to use the USBprog 4.0 interface on 
>> Mac-OS-X
> 
> Please do not try to compile 0.7.0, try current code, and if that has
> any issues, report.

Sorry about that.


OK, I downloaded the latest git master using git clone 
git://git.code.sf.net/p/openocd/code openocd-code.

I have Xcode 3.2.2 installed.

I've installed libtool automake autoconf pkgconfig libusb using MacPorts

(some problems there -- I ended up deleting my entire /usr/local dir. So now 
I'm a pure /opt/local guy ... :-/ )


./configure --enable-usbprog resulted in

checking for LIBUSB1... yes
configure: libusb-1.0 header bug workaround: LIBUSB1_CFLAGS changed to 
"-isystem /opt/local/include/libusb-1.0"
checking for LIBUSB0... no
configure: error: libusb-0.1 is required for the USBProg JTAG Programmer

So, I tried

sudo port install libusb-compat

which resulted in

--->  Computing dependencies for libusb-compat
--->  Installing libusb-compat @0.1.4_0
Error: org.macports.install for port libusb-compat returned: no destroot found 
at: 
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libusb-compat/libusb-compat/work/destroot
Please see the log file for port libusb-compat for details:
    
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libusb-compat/libusb-compat/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port libusb-compat failed


port list libusb gives

libusb                         @1.0.17         devel/libusb
libusb-compat                  @0.1.4          devel/libusb-compat
libusb-devel                   @1.0.8.20101017 devel/libusb-devel
libusb-legacy                  @0.1.12         devel/libusb-legacy


So, I tried installing libusb-legacy instead (which is at version 0.1.12 
instead of 0.1.4).

That works OK, (except that the files are installed in 
/opt/local/[include|lib]/libusb-legacy/ and even called e.g. 
libusb-legacy-0.1.4.dylib. *groan* )


pkg-config --list-all  then gives

...
libusb-1.0    libusbx-1.0 - C API for USB device access from Linux, Mac OS X, 
Windows and OpenBSD/NetBSD userspace
ncurses       ncurses - ncurses 5.9 library
libusb-legacy libusb-legacy - USB access library
...


It looks like the configure script is testing for "libusb"

   { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists 
--print-errors \"libusb\""; } >&5


but, of course, pkg-config --exists --print-errors libusb, results in "No 
package 'libusb' found".



Unless I'm being silly, I suppose these are MacPorts problems?


I tried changing "libusb" to "libusb-legacy" throughout the configure script -- 
but it still said LIBUSB0 wasn't there :-( which is a shame, because pkg-config 
--cflags --libs libusb-legacy gives correct results.





colin
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to