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

Compiling on Arch-Linux #9

Closed
mike-vivas opened this issue Apr 17, 2020 · 7 comments
Closed

Compiling on Arch-Linux #9

mike-vivas opened this issue Apr 17, 2020 · 7 comments

Comments

@mike-vivas
Copy link

Hi,
thanks a lot! Awesome piece of code to control my new MSI monitor!

Just had a problem compiling it under arch. "Make" did not find the lusb library.
I had to modify the makefile and specify "lusb-1.0" to make it compile.
It might be worth to add "TARGETOS=arch" to the makefile and use this specific libusb version for arch (might reduce problems to other arch users).

By the way, the needed libraries under arch are called: libusb and hidapi
sudo pacman -S libusb hidapi

Thanks for sharing the code!

@mike-vivas mike-vivas changed the title Bildung on Arch-Linux Compiling on Arch-Linux Apr 17, 2020
@couriersud
Copy link
Owner

Hi Mike,

I have added the TARGETOS=arch option to the makefile and updated README.md.
Can you please check if this is now working?

What monitor are you using? The information would be helpful to update the supported monitor matrix in README.md.

@cosmicdan
Copy link

cosmicdan commented Apr 18, 2020

Just FYI, I didn't have to do anything special on Arch - I just compiled as normal while installing those packages.

With the latest update, I can still just call make fine. With TARGETOS=arch I get a linker error though, easily fixed by changing -lhidapi to -lhidapi-libusb in arch makefile bit :)

@mike-vivas
Copy link
Author

Hi @couriersud,
thank you for the changes and sorry for the delay.
The lusb-1.0 is now working but, as cosmicdan mentioned, now the hidapi-library link is broken.
In arch the library is called -lhidapi-hidraw (like for the normal "linux" targetos)
could you please change it back in the makefile?
(The pacman command that you put in the README is correct - the library is installed as "hidapi" but it has to be linked as "lhidapi-hidraw" or "lhidapi-libusb" - I do not really know the difference but it compiles with both)

@cosmicdan: thanks for the feedback.
How is this possible? Before posting I also checked with a friend of mine running on arch (kernel 5.6.4). He also installed the libusb library but was not able to build with the -lusb link. He had to change it to -lusb-1.0 as well.
What does it depend upon? It is just a missing link in /usr/lib/ I guess...

@cosmicdan
Copy link

cosmicdan commented Apr 19, 2020 via email

couriersud added a commit that referenced this issue Apr 19, 2020
@couriersud
Copy link
Owner

When make TARGETOS=arch is used, LIBS now default to
LIBS = -lusb-1.0 -lhidapi-hidraw
@mike-vivas : Can you please check this is working now? Thanks a lot!

@mike-vivas
Copy link
Author

works perfectly! Thanks!

As for your question about the monitor: I've got a MAG321CURV, which seems to be quite well documented in the README...
should you need any additional information, let me know.

@couriersud
Copy link
Owner

Mike, thanks a lot!
And well, the MAG321CURV is the monitor in front of me :-)

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

No branches or pull requests

3 participants