Many thanks for the response, Soeren!


That branch has been merged to libusb mainline in the meanwhile, see

https://github.com/libusb/libusb/issues/252

and

https://github.com/libusb/libusb/commit/d67eb5beaa44c17c09f089a522ff483f4978a978

Hence, using a libusb checkout of this commit or later should work.


Thanks for that - great to know!

I should have mentioned, that since the `$GIT_CLONE 
git://github.com/dickens/libusb -b event-abstraction-v4` will fail immediately, 
I did try to first use the libusb master branch - however, that one is 6 years 
old. Then, after realizing the `examples` branch of libusb is newer, instead I 
used this in the cross-compile/msys2/sigrok-native-msys2:

```
$ git diff
diff --git a/cross-compile/msys2/sigrok-native-msys2 
b/cross-compile/msys2/sigrok-native-msys2
index bb692db..1d25c57 100755
--- a/cross-compile/msys2/sigrok-native-msys2
+++ b/cross-compile/msys2/sigrok-native-msys2
@@ -117,7 +117,7 @@ fi
 # -----------------------------------------------------------------------------

 # libusb
-$GIT_CLONE git://github.com/dickens/libusb -b event-abstraction-v4
+$GIT_CLONE git://github.com/dickens/libusb -b examples # -b 
event-abstraction-v4
 cd libusb
 ./bootstrap.sh
 ./configure $C $L

```

And now I looked at the libusb history, and both the `examples` and `WIP` 
branches contain commit d67eb5bea. So, `examples` should be OK - but the above 
error, I get during a build of libsigrok with the `examples` branch of libusb!?

I've found that this is the part that causes the error, in (for my build) a 
file called build_debug_64/libsigrok/configure :

```
if test -z "$NEED_USB_TRUE"; then :
  case $sr_have_libusb_os_handle:$host_os in #(
  no:mingw*) :
    as_fn_error $? "Windows builds require the event-abstraction branch of libusb" 
"$LINENO" 5 ;; #(
  *) :
     ;;
esac
fi
```

Unfortunately, I'm really bad at reading/understanding configure scripts; but I 
guess $sr_have_libusb_os_handle is what triggers the condition, and that is 
derived a bit earlier:

```
ac_fn_c_check_type "$LINENO" "libusb_os_handle" "ac_cv_type_libusb_os_handle" 
"#include <libusb.h>
"
if test "x$ac_cv_type_libusb_os_handle" = xyes; then :

cat >>confdefs.h <<_ACEOF
#define HAVE_LIBUSB_OS_HANDLE 1
_ACEOF

sr_have_libusb_os_handle=yes
else
  sr_have_libusb_os_handle=no
fi
```

I have a really hard parsing what is happening here; but I guess, this somehow sets 
sr_have_libusb_os_handle to "no" even with the libusb `examples` branch build.

So, if there are some more suggestions, I'd love to hear them - in the meantime, I'll try 
to comment that part `if test -z "$NEED_USB_TRUE"; then :`, see if stuff 
compiles with it ...

Cheers!




Regards,
  -Soeren


On Wed, 2020-10-28 at 12:35 +0100, sdbbs wrote:
Hi all,

I was trying to build sigrok/PulseView on MINGW64 on Windows 10, via

    
https://sigrok.org/gitweb/?p=sigrok-util.git;a=blob;f=cross-compile/msys2/sigrok-native-msys2

... - and I got stuck at this part:

...
checking for libusb_os_handle... no
checking for zip_discard... yes
configure: error: Windows builds require the event-abstraction branch of libusb

... which is all great - except, there is no event-abstraction branch in 
https://github.com/dickens/libusb/branches/all

Any suggestions on how to get over this?

Thanks in advance!


_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel



_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to