Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: Add libusb support to builds #1532

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

faha223
Copy link
Contributor

@faha223 faha223 commented Sep 23, 2023

Changed the meson.build: in the following ways
Changed the libusb dependency to have 'required' set to true if enabled, otherwise false. This ensures that the build system looks for the library but doesn't fail if the library isn't found.

Updated the dockerfile in the following ways:
Changed the mxe commit to the latest one because of an issue with zlib caused by a dead link
Added libusb1 to the mxe packages installed

Relevant issue:
#1234

@faha223 faha223 changed the title Enabled libusb passthrough in builds when it's available, add libusb1 to Docker image Build: Add libusb support to builds Sep 23, 2023
@faha223 faha223 marked this pull request as draft September 24, 2023 19:04
@faha223
Copy link
Contributor Author

faha223 commented Sep 24, 2023

I converted this to a draft because the mac arm64 build is broken and I'm not sure how best to fix it.

This is the problem:
ld: warning: ignoring file /usr/local/Cellar/libusb/1.0.26/lib/libusb-1.0.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64

@mborgerson
Copy link
Member

I converted this to a draft because the mac arm64 build is broken and I'm not sure how best to fix it.

This is the problem: ld: warning: ignoring file /usr/local/Cellar/libusb/1.0.26/lib/libusb-1.0.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64

xemu macos builds pull library dependencies from macports, both x86-64 and arm64 for cross compilation. You can try adding libusb here https://github.com/xemu-project/xemu/blob/master/scripts/download-macos-libs.py

@faha223 faha223 marked this pull request as ready for review February 26, 2024 14:55
@faha223
Copy link
Contributor Author

faha223 commented Feb 26, 2024

The the mac version is now building on both x86_64 and arm64 and the compile log indicates that libusb is enabled on both builds.

I verified that the Ubuntu Release build is working with USB Passthrough via the monitor. using the following commands with auto-bind off:
device_add usb-hub,port=1.3
device_add usb-host,vendorid=0x045e,productid=0x0289,port=1.3.1

The Windows version builds, but is waiting on an updated docker image with the libusb1 package installed before it'll build with libusb passthrough enabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants