Open JesseMFrey opened 3 years ago
Did you try the install.sh script or are you manually building?
Manually building
I'd recommend the install script. You might be missing a package that is needed. You could even look at the packages the install script installs. The install script is in the dash directory after you clone that repo. The install script will build aasdk, Openauto, qt-gstreamer, and dash.
What hardware and OS are you using?
The install script uses apt (I think) and this, doesn't work I'm using arch on a pi4
Yeah, we haven't had any support for another OS outside of RPi OS and Ubuntu (debian based). I think I might be the only one to try Ubuntu 64bit 20.10 on the Pi4 with OpenDash. I got everything installed but I had to find a few packages that had different names due to those packages having a 64bit variant.
You should check your libusb version against the package in debian based OS and see if what Arch has is the same or newer. I've never used Arch so I couldn't tell you without diving into it. Let us know what you find.
Also, everything for dash is written to not require running as root. Only exception is when installing aasdk and Openauto to /usr/local directory with "sudo make install". If built using root, there can be issues when connecting your device for Openauto functionality.
Like I said in the first post, I have libusb version 1.0.24. Not sure what version other distros are using but, Arch often adopts new things first.
I did get it to work with the following patch, just casting to libusb_hotplug_flag
(not sure this is the "right way" but, it works)
diff --git a/src/USB/USBHub.cpp b/src/USB/USBHub.cpp
index cc302d9..7898d48 100644
--- a/src/USB/USBHub.cpp
+++ b/src/USB/USBHub.cpp
@@ -49,7 +49,7 @@ void USBHub::start(Promise::Pointer promise)
if(self_ == nullptr)
{
self_ = this->shared_from_this();
- hotplugHandle_ = usbWrapper_.hotplugRegisterCallback(LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED, LIBUSB_HOTPLUG_NO_FLAGS, LIBUSB_HOTPLUG_MATCH_ANY, LIBUSB_HOTPLUG_MATCH_ANY,
+ hotplugHandle_ = usbWrapper_.hotplugRegisterCallback(LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED, (libusb_hotplug_flag)LIBUSB_HOTPLUG_NO_FLAGS, LIBUSB_HOTPLUG_MATCH_ANY, LIBUSB_HOTPLUG_MATCH_ANY,
LIBUSB_HOTPLUG_MATCH_ANY, reinterpret_cast<libusb_hotplug_callback_fn>(&USBHub::hotplugEventsHandler), reinterpret_cast<void*>(this));
}
});
installing things has not been a huge problem. The Arch scripts install things to a temp directory as fakeroot and then it's installed to /
with the package manager.
Nice. It'll be good to document how to get it working on other distros. Hope everything else goes smooth. When you get to qt-gstreamer, perhaps Arch has it already for installation like Ubuntu. Instead of having to build it manually for the Pi.
I ended up building dash with:
cmake -DCMAKE_BUILD_TYPE=Release ../ -DRPI_BUILD=FALSE -DGST_BUILD=TRUE
arch does have a qt-gstreamer package
So you had to build qt-gstreamer then? Was that as intended or did you have to make adjustments?
Are you using an official Raspberry Pi 7" touchscreen? If so, make sure you create the udev rules for the backlight.
It was missing libraries without -DGST_BUILD=TRUE
it would complain about some includes
Not sure if I made some rules previously or added myself to the right group but, brightness works
Awesome yeah that makes sense. Probably that you are in the right group.
Just curious, Are you using 32bit or 64bit Arch?
I'm using the 32 bit arch linux
FWIW, in order to get the build to work on WSL I had to change apt to apt-get. I don't know of any reason why that can't be done across the board.
@JesseMFrey how's the build running for you on Arch?
I haven't tried but, switching from apt to apt-get shouldn't help because Arch uses pacman
Should be easy enough to conditionalize the script for Arch and pacman
I suppose that's possible. I guess I'd rather have an actual package built with dependencies
Not sure I understand. This project doesn't have a prebuilt images so you have to build it yourself by running the install script.
~~~~~~In file included from /home/alarm/pkgbuilds/aasdk-git/src/aasdk-dash-git/src/USB/USBHub.cpp:20: /home/alarm/pkgbuilds/aasdk-git/src/aasdk-dash-git/include/aasdk/USB/IUSBWrapper.hpp:75:108: note: initializing argument 2 of 'virtual aasdk::usb::HotplugCallbackHandle aasdk::usb::IUSBWrapper::hotplugRegisterCallback(libusb_hotplug_event, libusb_hotplug_flag, int, int, int, libusb_hotplug_callback_fn, void*)' 75 | virtual HotplugCallbackHandle hotplugRegisterCallback(libusb_hotplug_event events, libusb_hotplug_flag flags, int vendor_id, int product_id, int dev_class, |
~~~~^~~~~ make[2]: [CMakeFiles/aasdk.dir/build.make:678: CMakeFiles/aasdk.dir/src/USB/USBHub.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:100: CMakeFiles/aasdk.dir/all] Error 2 make: *** [Makefile:136: all] Error 2 ` I have libusb version 1.0.24