Skip to content

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