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

Fix DRM cross-compile without sysroot #3839

Merged
merged 1 commit into from
Feb 27, 2024
Merged

Fix DRM cross-compile without sysroot #3839

merged 1 commit into from
Feb 27, 2024

Conversation

zuckschwerdt
Copy link
Contributor

Encountering /usr/include/xf86drm.h:40:10: fatal error: drm.h: No such file or directory
when doing a cross-compile I found that

cmake -DCMAKE_C_FLAGS=-I/usr/include/libdrm …

is needed. Some digging revealed that in my case #1717 spoils the libdrm includes.

The unexpected and different situation here: I'm doing a cross-compile on a multi-arch image.
I.e. I run an arm-linux-gnueabihf compiler on aarch64 and the armhf libs are installed side-by-side with the arm64 libs -- no need for a sysroot.

I propose to only drop the libdrm include path if a sysroot is actually used.

@raysan5 raysan5 merged commit 074fbb0 into raysan5:master Feb 27, 2024
@raysan5
Copy link
Owner

raysan5 commented Feb 27, 2024

@zuckschwerdt Thanks for the review!

@zuckschwerdt zuckschwerdt deleted the fix-drmsysroot branch February 27, 2024 13:00
@zuckschwerdt
Copy link
Contributor Author

Kudos!
Using the cmake example project was a completely frictionless experience.
I went from a functioning sketch to feature-complete in 2 days.
Then another day to sort out Github Actions…
My project is https://github.com/zuckschwerdt/ledstrip-ddp-simulator

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