Issues getting started with the Programmer Shield

Hi all !

Recently i purchased a programmer shield and want to start experimenting with it. To get going i’m following this tutorial:

I did everything up and including running:

./configure --enable-ftdi

The output of this command fails with:

configure: error: libusb-1.x is required for the MPSSE mode of FTDI based devices

I don’t know what should I do next, and need some guidance…

Here is what i’m using as equipment:

  • Macbook Pro
  • OSX El Capitan

Here is the entire output of the command:

MacBook-Pro:openocd-0.9.0 Alex$ ./configure --enable-ftdi
checking for makeinfo... makeinfo
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... none needed
checking whether gcc and cc understand -c and -o together... yes
checking for ranlib... ranlib
checking for pkg-config... no
checking build system type... x86_64-apple-darwin15.0.0
checking host system type... x86_64-apple-darwin15.0.0
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-apple-darwin15.0.0 file names to x86_64-apple-darwin15.0.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin15.0.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... (cached) ranlib
checking command to parse /usr/bin/nm output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin15.0.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for an ANSI C-conforming const... yes
checking for unsigned long long int... yes
checking for long long int... yes
checking for library containing ioperm... no
checking for library containing dlopen... none required
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for arpa/inet.h... yes
checking elf.h usability... no
checking elf.h presence... no
checking for elf.h... no
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for ifaddrs.h... yes
checking malloc.h usability... no
checking malloc.h presence... no
checking for malloc.h... no
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking for netinet/in.h... yes
checking for netinet/tcp.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for strings.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/stat.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking for net/if.h... yes
checking whether to enable assertions... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether byte ordering is bigendian... no
checking for strndup... yes
checking for strnlen... yes
checking for gettimeofday... yes
checking for usleep... yes
checking for vasprintf... yes
checking whether to build a release... yes
checking whether to build Doxygen as HTML... yes
checking whether to build Doxygen as PDF... no
checking whether to enable verbose JTAG I/O messages... no
checking whether to enable verbose USB I/O messages... no
checking whether to enable verbose USB communication messages... no
checking whether to enable malloc free space logging... no
checking whether to enable ZY1000 minidriver... no
checking whether to enable dummy minidriver... no
checking whether standard drivers can be built... yes
checking for LIBUSB1... no
configure: WARNING: libusb-1.x not found, trying legacy libusb-0.1 as a fallback; consider installing libusb-1.x instead
checking for LIBUSB0... no
checking for HIDAPI... no
checking for HIDAPI... no
checking for HIDAPI... no
configure: error: libusb-1.x is required for the MPSSE mode of FTDI based devices

Thanks for your help in advance.

Try to install libusb with brew install libusb

@jvanier

Hi Julien, thank you for answering.

Here’s what I get when I try that:

MacBook-Pro:openocd-0.9.0 Alex$ brew install libusb
Warning: libusb-1.0.20 already installed
MacBook-Pro:openocd-0.9.0 Alex$ 

Any ideas?

That must only include the release version, not the files needed to compile a program using libusb.

Try

git clone http://git.libusb.org/libusb.git
cd libusb
./autogen.sh
./configure
make
sudo make install

ok so here’s what i’ve got…

git clone http://git.libusb.org/libusb.git

Output:

MacBook-Pro:openocd-0.9.0 Alex$ git clone http://git.libusb.org/libusb.git
Cloning into 'libusb'...
remote: Counting objects: 3062, done.
remote: Compressing objects: 100% (1446/1446), done.
remote: Total 3062 (delta 2258), reused 2222 (delta 1613)
Receiving objects: 100% (3062/3062), 728.11 KiB | 450.00 KiB/s, done.
Resolving deltas: 100% (2258/2258), done.
Checking connectivity... done.

…then while in libusb:

./autogen.sh

Output:

MacBook-Pro:libusb Alex$ ./autogen.sh
glibtoolize: putting auxiliary files in '..'.
glibtoolize: copying file '../ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
glibtoolize: copying file 'm4/libtool.m4'
glibtoolize: copying file 'm4/ltoptions.m4'
glibtoolize: copying file 'm4/ltsugar.m4'
glibtoolize: copying file 'm4/ltversion.m4'
glibtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:38: installing '../compile'
configure.ac:29: installing '../missing'
examples/Makefile.am:1: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
examples/Makefile.am: installing '../depcomp'
libusb/Makefile.am:4: warning: source file 'os/darwin_usb.c' is in a subdirectory,
libusb/Makefile.am:4: but option 'subdir-objects' is disabled
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled.  For now, the corresponding output
automake: object file(s) will be placed in the top-level directory.  However,
automake: this behaviour will change in future Automake versions: they will
automake: unconditionally cause object files to be placed in the same subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.
libusb/Makefile.am:3: warning: source file 'os/linux_usbfs.c' is in a subdirectory,
libusb/Makefile.am:3: but option 'subdir-objects' is disabled
libusb/Makefile.am:5: warning: source file 'os/openbsd_usb.c' is in a subdirectory,
libusb/Makefile.am:5: but option 'subdir-objects' is disabled
libusb/Makefile.am:6: warning: source file 'os/poll_windows.c' is in a subdirectory,
libusb/Makefile.am:6: but option 'subdir-objects' is disabled
libusb/Makefile.am:6: warning: source file 'os/windows_usb.c' is in a subdirectory,
libusb/Makefile.am:6: but option 'subdir-objects' is disabled
libusb/Makefile.am:35: warning: source file 'os/threads_windows.c' is in a subdirectory,
libusb/Makefile.am:35: but option 'subdir-objects' is disabled
libusb/Makefile.am:35: warning: source file 'os/threads_posix.c' is in a subdirectory,
libusb/Makefile.am:35: but option 'subdir-objects' is disabled
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./../install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... x86_64-apple-darwin15.0.0
checking host system type... x86_64-apple-darwin15.0.0
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking how to convert x86_64-apple-darwin15.0.0 file names to x86_64-apple-darwin15.0.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin15.0.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin15.0.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for windres... no
checking for inline... inline
checking operating system... Darwin/Mac OS X
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking for nfds_t... yes
checking sys/timerfd.h usability... no
checking sys/timerfd.h presence... no
checking for sys/timerfd.h... no
checking whether TFD_NONBLOCK is declared... no
checking whether to use timerfd for timing... no (header not available)
checking for struct timespec... yes
checking for sigaction... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for gettimeofday... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating libusb-1.0.pc
config.status: creating Makefile
config.status: creating libusb/Makefile
config.status: creating examples/Makefile
config.status: creating doc/Makefile
config.status: creating doc/doxygen.cfg
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

#Then for ./configure

MacBook-Pro:libusb Alex$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./../install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... x86_64-apple-darwin15.0.0
checking host system type... x86_64-apple-darwin15.0.0
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking how to convert x86_64-apple-darwin15.0.0 file names to x86_64-apple-darwin15.0.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin15.0.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin15.0.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for windres... no
checking for inline... inline
checking operating system... Darwin/Mac OS X
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking for nfds_t... yes
checking sys/timerfd.h usability... no
checking sys/timerfd.h presence... no
checking for sys/timerfd.h... no
checking whether TFD_NONBLOCK is declared... no
checking whether to use timerfd for timing... no (header not available)
checking for struct timespec... yes
checking for sigaction... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for gettimeofday... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating libusb-1.0.pc
config.status: creating Makefile
config.status: creating libusb/Makefile
config.status: creating examples/Makefile
config.status: creating doc/Makefile
config.status: creating doc/doxygen.cfg
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

#Then for make:

MacBook-Pro:libusb Alex$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in libusb
  CC       libusb_1_0_la-core.lo
  CC       libusb_1_0_la-descriptor.lo
  CC       libusb_1_0_la-io.lo
  CC       libusb_1_0_la-sync.lo
  CC       libusb_1_0_la-darwin_usb.lo
os/darwin_usb.c:291:51: warning: address of array 'handle->os_priv' will always evaluate to 'true'
      [-Wpointer-bool-conversion]
      if (dpriv->location == location  && handle->os_priv) {
                                       ~~ ~~~~~~~~^~~~~~~
os/darwin_usb.c:1151:27: warning: expression which evaluates to zero treated as a null pointer constant of type
      'IOUSBInterfaceInterface300 **' (aka 'struct IOUSBInterfaceStruct300 **') [-Wnon-literal-null-conversion]
  cInterface->interface = IO_OBJECT_NULL;
                          ^~~~~~~~~~~~~~
/System/Library/Frameworks/IOKit.framework/Headers/IOTypes.h:164:24: note: expanded from macro 'IO_OBJECT_NULL'
<#>define IO_OBJECT_NULL  ((io_object_t) 0)
                        ^~~~~~~~~~~~~~~~~
2 warnings generated.
  CC       libusb_1_0_la-threads_posix.lo
  CCLD     libusb-1.0.la
Making all in doc
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all-am'.

#Then for sudo make install:

MacBook-Pro:libusb Alex$ sudo make install
Password:
Making install in libusb
 .././../install-sh -c -d '/usr/local/lib'
 /bin/sh ../libtool   --mode=install /usr/bin/install -c   libusb-1.0.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libusb-1.0.0.dylib /usr/local/lib/libusb-1.0.0.dylib
libtool: install: (cd /usr/local/lib && { ln -s -f libusb-1.0.0.dylib libusb-1.0.dylib || { rm -f libusb-1.0.dylib && ln -s libusb-1.0.0.dylib libusb-1.0.dylib; }; })
libtool: install: /usr/bin/install -c .libs/libusb-1.0.lai /usr/local/lib/libusb-1.0.la
libtool: install: /usr/bin/install -c .libs/libusb-1.0.a /usr/local/lib/libusb-1.0.a
libtool: install: chmod 644 /usr/local/lib/libusb-1.0.a
libtool: install: ranlib /usr/local/lib/libusb-1.0.a
 .././../install-sh -c -d '/usr/local/include/libusb-1.0'
 /usr/bin/install -c -m 644 libusb.h '/usr/local/include/libusb-1.0'
Making install in doc
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Nothing to be done for `install-exec-am'.
 ./../install-sh -c -d '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 libusb-1.0.pc '/usr/local/lib/pkgconfig' 

#Then i tried again

./configure --enable-ftdi

MacBook-Pro:openocd-0.9.0 Alex$ ./configure --enable-ftdi
checking for makeinfo... makeinfo
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... none needed
checking whether gcc and cc understand -c and -o together... yes
checking for ranlib... ranlib
checking for pkg-config... no
checking build system type... x86_64-apple-darwin15.0.0
checking host system type... x86_64-apple-darwin15.0.0
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-apple-darwin15.0.0 file names to x86_64-apple-darwin15.0.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin15.0.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... (cached) ranlib
checking command to parse /usr/bin/nm output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin15.0.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for an ANSI C-conforming const... yes
checking for unsigned long long int... yes
checking for long long int... yes
checking for library containing ioperm... no
checking for library containing dlopen... none required
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for arpa/inet.h... yes
checking elf.h usability... no
checking elf.h presence... no
checking for elf.h... no
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for ifaddrs.h... yes
checking malloc.h usability... no
checking malloc.h presence... no
checking for malloc.h... no
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking for netinet/in.h... yes
checking for netinet/tcp.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for strings.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/stat.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking for net/if.h... yes
checking whether to enable assertions... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether byte ordering is bigendian... no
checking for strndup... yes
checking for strnlen... yes
checking for gettimeofday... yes
checking for usleep... yes
checking for vasprintf... yes
checking whether to build a release... yes
checking whether to build Doxygen as HTML... yes
checking whether to build Doxygen as PDF... no
checking whether to enable verbose JTAG I/O messages... no
checking whether to enable verbose USB I/O messages... no
checking whether to enable verbose USB communication messages... no
checking whether to enable malloc free space logging... no
checking whether to enable ZY1000 minidriver... no
checking whether to enable dummy minidriver... no
checking whether standard drivers can be built... yes
checking for LIBUSB1... no
configure: WARNING: libusb-1.x not found, trying legacy libusb-0.1 as a fallback; consider installing libusb-1.x instead
checking for LIBUSB0... no
checking for HIDAPI... no
checking for HIDAPI... no
checking for HIDAPI... no
configure: error: libusb-1.x is required for the MPSSE mode of FTDI based devices

It appears I got the same error…

I actually just ran into this as well. Just for full disclosure, I have not yet finished setting this up, but I am at least passed where you are in the process. I was using ZSH, and I have no idea exactly what caused the error, but all I know is I think I fixed it. Here’s what I did to fix it:

bash
brew install --HEAD openocd

This got me past that error. But then I ran into something else which you may or may not run into. Clang gave me an error:

sim3x.c:867:20: error: address of array 'sim3x_info->device_package' will always evaluate to 'true' .

So I used the patch posted here: http://openocd.zylin.com/#/c/2838/2/src/flash/nor/sim3x.c referenced in here: http://sourceforge.net/p/openocd/mailman/message/34242861/ which solved that issue as well.

Hopefully this helps.

1 Like

Looks like I already installed this as well…

MacBook-Pro:openocd-0.9.0 Alex$ brew install --HEAD openocd 
Warning: open-ocd-0.9.0 already installed

Interesting, that fixed my issue when I went back and tried to configure it again. You may want to make sure that you did

brew install libusb-compat

Just a guess, sorry I couldn’t be more help.

MacBook-Pro:openocd-0.9.0 Alex$ brew install libusb-compat
Warning: libusb-compat-0.1.5 already installed

Thanks for trying....weird stuff. I just wished it was simpler to get going with this thing.... hehe

I ran into the same issue with “…configure: error: libusb-1.x is required for the MPSSE mode of FTDI based devices”. Use Macports to install OpenOcd (see http://openocd.org/doc-release/README.OSX) instead of brew

1 Like

OK…So I’ve installed MacPorts and it seems that ./configure --enable-ftdi did not provide any errors. Thank you for that. :thumbsup:

Now however I’m trying to do: make install

I get version mismatch errors:

libtool: Version mismatch error.  This is libtool 2.4.6, but the
libtool: definition of this LT_INIT comes from libtool 2.4.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.6

Here’s what my full output looks like:

Making install in jimtcl
/usr/bin/tclsh ./make-load-static-exts.tcl aio array clock eventloop exec file history load namespace pack package posix readdir regexp signal syslog tclprefix binary glob nshelper oo stdlib tclcompat tree >_load-static-exts.c || ( rm _load-static-exts.c; exit 1)
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o _load-static-exts.o _load-static-exts.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim-subcmd.o jim-subcmd.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim-interactive.o jim-interactive.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim-format.o jim-format.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim.o jim.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o utf8.o utf8.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jimregexp.o jimregexp.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o linenoise.o linenoise.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim-aio.o jim-aio.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim-array.o jim-array.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim-clock.o jim-clock.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim-eventloop.o jim-eventloop.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim-exec.o jim-exec.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim-file.o jim-file.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim-history.o jim-history.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim-load.o jim-load.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim-namespace.o jim-namespace.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim-pack.o jim-pack.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim-package.o jim-package.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim-posix.o jim-posix.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim-readdir.o jim-readdir.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim-regexp.o jim-regexp.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim-signal.o jim-signal.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim-syslog.o jim-syslog.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jim-tclprefix.o jim-tclprefix.c
/usr/bin/tclsh ./make-c-ext.tcl binary.tcl >_binary.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables  -c -o binary.o _binary.c
/usr/bin/tclsh ./make-c-ext.tcl glob.tcl >_glob.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables  -c -o glob.o _glob.c
/usr/bin/tclsh ./make-c-ext.tcl nshelper.tcl >_nshelper.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables  -c -o nshelper.o _nshelper.c
/usr/bin/tclsh ./make-c-ext.tcl oo.tcl >_oo.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables  -c -o oo.o _oo.c
/usr/bin/tclsh ./make-c-ext.tcl stdlib.tcl >_stdlib.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables  -c -o stdlib.o _stdlib.c
/usr/bin/tclsh ./make-c-ext.tcl tclcompat.tcl >_tclcompat.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables  -c -o tclcompat.o _tclcompat.c
/usr/bin/tclsh ./make-c-ext.tcl tree.tcl >_tree.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables  -c -o tree.o _tree.c ar cr libjim.a _load-static-exts.o jim-subcmd.o jim-interactive.o jim-format.o jim.o utf8.o jimregexp.o linenoise.o jim-aio.o jim-array.o jim-clock.o jim-eventloop.o jim-exec.o jim-file.o jim-history.o jim-load.o jim-namespace.o jim-pack.o jim-package.o jim-posix.o jim-readdir.o jim-regexp.o jim-signal.o jim-syslog.o jim-tclprefix.o binary.o glob.o nshelper.o oo.o stdlib.o tclcompat.o tree.o
ranlib libjim.a
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -c -o jimsh.o jimsh.c
/usr/bin/tclsh ./make-c-ext.tcl initjimsh.tcl >_initjimsh.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables  -c -o initjimsh.o _initjimsh.c
cc -D_GNU_SOURCE -Wall  -I. -g -O2 -fno-unwind-tables -fno-asynchronous-unwind-tables    -o jimsh jimsh.o initjimsh.o libjim.a  
Making install in src
cat helper/startup.tcl jtag/startup.tcl target/startup.tcl flash/startup.tcl server/startup.tcl > startup.tcl
../src/helper/bin2char.sh < startup.tcl > startup_tcl.inc || { rm -f startup_tcl.inc; false; }
/Applications/Xcode.app/Contents/Developer/usr/bin/make  install-recursive
Making install in jtag
cp drivers/minidriver_imp.h minidriver_imp.h
/Applications/Xcode.app/Contents/Developer/usr/bin/make  install-recursive
Making install in hla
depbase=`echo hla_transport.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../..  -I../../../src -I../../../src -I../../../src/helper -DPKGDATADIR=\"/usr/local/share/openocd\" -DBINDIR=\"/usr/local/bin\" -I../../../jimtcl -I../../../jimtcl   -g -O2 -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -MT hla_transport.lo -MD -MP -MF $depbase.Tpo -c -o hla_transport.lo hla_transport.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: Version mismatch error.  This is libtool 2.4.6, but the
libtool: definition of this LT_INIT comes from libtool 2.4.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.6
libtool: and run autoconf again.
make[5]: *** [hla_transport.lo] Error 63
make[4]: *** [install-recursive] Error 1
make[3]: *** [install] Error 2
make[2]: *** [install-recursive] Error 1
make[1]: *** [install] Error 2
make: *** [install-recursive] Error 1

Fix to the mismatch issue

The error message is pretty straightforward, it seems to be a version mismatch of libtool.
So I managed to resolve this by removing the aclocal.m4 file, and then running:

$ aclocal             //followed by
$ autoconf         //this corrects the mismatch of libtool

New Issue

Now however, I get another error when trying to ./configure --enable-ftdi.

sim3x.c:867:20: error: address of array 'sim3x_info->device_package' will always evaluate to 'true'
      [-Werror,-Wpointer-bool-conversion]

So again I’m stuck…if suggestions exist I’m fully open. :stuck_out_tongue_winking_eye:

Apply patch @ http://openocd.zylin.com/#/c/2838/

"This fixes a warning as reported by the current clang version:
…/…/…/…/src/flash/nor/sim3x.c:867:20: error: address of array
’sim3x_info->device_package’ will always evaluate to ‘true’ "

1 Like

Thank you…I’ll give this a try. :thumbsup:

Just to make it easier, in OpenOCD directory run:

wget http://openocd.zylin.com/changes/2838/revisions/169db31ae06627a073c8179dc33d1bce1e88f4d6/patch\?zip -O 169db31.diff.zip; unzip 169db31.diff.zip; patch -u src/flash/nor/sim3x.c 169db31a.diff
2 Likes