Menu

#2190 --disable-libusb option is missing

v3.x
open
nobody
None
Buildsystem
2026-01-28
2026-01-04
gpz
No

The addition of usb sid pico pulled in libusb as a dependency. It should be possible to disable it even if libusb is detected by configure.

Related: https://www.lemon64.com/forum/viewtopic.php?p=1076184#p1076184

@loud would you please have a look?

Discussion

  • LouD

    LouD - 2026-01-04

    Hi gpz, usbsid compilation was disabled by default previously and had to be enabled with configuration, I removed this at your request in favour of enabling usbsid when libusb was present, see https://sourceforge.net/p/vice-emu/patches/400/#7131
    The code in configure.ac does a check to see if it's enabled at each part with if test x"$enable_usbsid" != "xno" and after that a separate check for libusb.
    I think adding an option to disable usbsid compilation should be as easy as adding an ARG_ENABLE for enable_usbsid. Previously I this option here: https://github.com/LouDnl/Vice-USBSID/blob/main/vice/configure.ac

     
  • LouD

    LouD - 2026-01-04

    I will have a look if I can create an easy patch

     
  • gpz

    gpz - 2026-01-04

    Hi gpz, usbsid compilation was disabled by default previously and had to be enabled with configuration, I removed this at your request in favour of enabling usbsid when libusb was present,

    Well the request was to enable it when detected, and optionally disable it - just like any other config option (and as you can see in the thread, i thought thats what you did)

    Anyway, would be nice if you could look at it (If you have some time to waste, perhaps even fix that strange compilation error - no idea what would cause this)

     
  • LouD

    LouD - 2026-01-04

    Will have a look. haven't seen that error before, but could be a newer libusb version etc.

     
  • LouD

    LouD - 2026-01-05

    Here's a first patch for adding the --disable-usbsid feature.

     
  • gpz

    gpz - 2026-01-05

    Thanks but... the option should disable libusb (and then everything that wants to use it, which now happens to be just usbsid) :)

     
  • LouD

    LouD - 2026-01-05

    the libusb check for.usbsid isn't done if usbsid is disabled, it's not the orher way around?

     
  • gpz

    gpz - 2026-01-05

    the libusb check for.usbsid isn't done if usbsid is disabled, it's not the orher way around?

    not sure what that is supposed to mean. the point is: the option should be named --disable-libusb, which den disables whatever uses libusb.

    Think of the case when we have a dozen things that rely on libusb - you don't want to disable every single one. You want to disable libusb instead :)

     
  • LouD

    LouD - 2026-01-05

    okay, will have a look at this. Ive seen libusb is also used for some joystick thing. will report back.

     
  • gpz

    gpz - 2026-01-05

    Ive seen libusb is also used for some joystick thing. will report back.

    AFAIK it is not used for anything else (yet). That "usb joystick" stuff is some ancient linux stuff that isnt even used anymore i think :)

     
  • LouD

    LouD - 2026-01-06

    I've added a --without-libusb option in addition to the --disable-usbsid option in this patch, can you check if you can work with this?

     

    Last edit: LouD 2026-01-06
    • gpz

      gpz - 2026-01-22

      Sorry - this still does too much. The separate option "--disable-usbsid" is pointless, no reference to usbsid is needed in configure at all, just libusb should be detected (and have the option to disable it), no more no less :)

       
      • LouD

        LouD - 2026-01-28

        Will look at this

         
  • LouD

    LouD - 2026-01-06

    Here's an attempted fix for the conversion error, I couldn't reproduce it no matter what I tried.

     
    • gpz

      gpz - 2026-01-22

      forgot: applied in r45950

       
      😄
      1
      • LouD

        LouD - 2026-01-28

        No one is perfect eh :)

         

Log in to post a comment.

MongoDB Logo MongoDB