Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: libusb-1.0 for NetBSD

On Wed, May 30, 2012 at 10:32 PM, Xiaofan Chen <> 
> On Wed, May 30, 2012 at 10:31 PM, Jeremy C. Reed 
> <> wrote:
>> I built it with  --enable-examples-build. How to use the examples?
>> sunflower:examples$ ./listdevs
>> sunflower:examples$ ./dpfp
>> Could not find/open device
>> sunflower:examples$ ./dpfp_threaded
>> Could not find/open device
>> The listdevs shows nothing.
> libusb-1.0 under OpenBSD/NetBSD use ugen, so only
> ugen device are supported. And you may need to
> set up proper permission to run the examples
> under normal user account. You can try run as
> root first or use sudo.

Since I am one of the admins of libusbx (non-developer admin,
I mainly contributed by testing and support since I
am not a software guy), here is the run log for libusbx
1.0.11 under NetBSD 6.0 Beta 1.

localhost$ ./configure --enable-examples-build
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 to enable maintainer-specific portions of Makefiles... no
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 build system type... i386-unknown-netbsdelf6.0.
checking host system type... i386-unknown-netbsdelf6.0.
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... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) 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 "+="... no
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... match_pattern
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
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... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... NetBSD ld.elf_so
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 whether gcc and cc understand -c and -o together... yes
checking operating system... NetBSD (using OpenBSD backend)
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... 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
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: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands

localhost$ make
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-openbsd_usb.lo
os/openbsd_usb.c: In function '_sync_control_transfer':
os/openbsd_usb.c:638:2: warning: dereferencing type-punned pointer
will break strict-aliasing rules
os/openbsd_usb.c:639:2: warning: dereferencing type-punned pointer
will break strict-aliasing rules
os/openbsd_usb.c:640:2: warning: dereferencing type-punned pointer
will break strict-aliasing rules
  CC     libusb_1_0_la-threads_posix.lo
Making all in doc
Making all in examples
  CC     listdevs.o
  CCLD   listdevs
  CC     xusb.o
  CCLD   xusb
  CC     dpfp.o
  CCLD   dpfp
  CC     dpfp_threaded-dpfp_threaded.o
  CCLD   dpfp_threaded

localhost$ cd examples/

localhost$ ./listdevs
1366:0101 (bus 0, device 2)

localhost$ ./xusb 1366:0101
Using libusbx v1.0.11.10513

Opening device...
speed: 12 Mbit/s (USB 1.0 FullSpeed)

Reading device descriptor:
            length: 18
      device class: 0
               S/N: 3
           VID:PID: 1366:0101
         bcdDevice: 0001
   iMan:iProd:iSer: 1:2:3
          nb confs: 1

Reading configuration descriptors:
             nb interfaces: 1
              interface[0]: id = 0
interface[0].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: FF.FF.FF
       endpoint[0].address: 81
           max packet size: 0040
          polling interval: 00
       endpoint[1].address: 02
           max packet size: 0040
          polling interval: 00

Claiming interface 0...

Reading string descriptors:
   String (0x01): "SEGGER"
   String (0x02): "J-Link"
   String (0x03): "xxxxxxxxxx"

Releasing interface 0...
Closing device...


Home | Main Index | Thread Index | Old Index