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

Try to find missing gfx-drivers with CMake #72 #94

Closed
wants to merge 1 commit into from

Conversation

spongythecake
Copy link

This commit brings an extra library check in CMakeLists.txt related to mir graphics drivers desktop. A hardcoded known-library-list was introduced and used with find_library. Also, the build output informs the user of the missing libraries. Fixes #72

This commit brings an extra library check in CMakeLists.txt related to mir graphics drivers desktop. A hardcoded known-library-list was introduced and used with find_library. Also, the build output informs the user of the missing libraries. Fixes miracle-wm-org#72
@spongythecake
Copy link
Author

I decided to raise the warning to a normal status, since you might be interested in building without graphics involved.

Another mention, I allowed the libraries detected to be saved as a cmake cache variable. I made this decision since it might be good insight for future bug reports(!?). I'll leave the rest to you!

@mattkae mattkae self-requested a review April 19, 2024 11:39
Copy link
Collaborator

@mattkae mattkae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome stuff @spongythecake ! I just have two questions for future-proofing this thing. You can also check CI to see it working 😄

CMakeLists.txt Show resolved Hide resolved
foreach(lib_name ${MIR_GRAPHICAL_DESKTOP_DRIVERS})
find_library(${lib_name}_LIBRARY
${lib_name}
PATH /usr/lib/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/mir/server-platform
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to provide the whole path here? Would cmaek not look in the regular LD_LIBRARY_PATHS for us?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the path would be wrong on non-Debian platforms anyway.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is true. Busybox would be alienated. But you could also watch the Cmake targets to decide this. A further debt to implement for this issue

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So would Fedora and everyone else. Only Debian and Ubuntu use that path model.

@Conan-Kudo
Copy link
Collaborator

It might make sense to have Mir export CMake config modules for the platforms instead, because this is likely to be quite brittle.

@mattkae
Copy link
Collaborator

mattkae commented Apr 22, 2024

It might make sense to have Mir export CMake config modules for the platforms instead, because this is likely to be quite brittle.

What would this look like? A bunch of FindGraphicsGbmKms.cmake or something similar?

@Conan-Kudo
Copy link
Collaborator

Well, maybe add a custom pkgconfig variable to the mirserver pc file?

@mattkae
Copy link
Collaborator

mattkae commented Apr 25, 2024

@Conan-Kudo Ah I see what you mean better now. Perhaps something like this does belong in the Mir project now that I've thought about it. Mir already provides some facilities for find package. It would be really nice if it also provided some facilities to find the platform packages as well. I will make a ticket over there

@mattkae
Copy link
Collaborator

mattkae commented Apr 25, 2024

Sorry for all the back and forth @spongythecake ! I believe @Conan-Kudo is right here after thinking about it. I opened up this bug in Mir: canonical/mir#3352

I'll be curious to hear what the rest of the team would think about this before acting on it, but it seems to be a good solution to fix miracle-wm any any other Mir-based compositor that runs into this issue in the future.

@spongythecake
Copy link
Author

Sorry for all the back and forth @spongythecake ! I believe @Conan-Kudo is right here after thinking about it. I opened up this bug in Mir: canonical/mir#3352

I'll be curious to hear what the rest of the team would think about this before acting on it, but it seems to be a good solution to fix miracle-wm any any other Mir-based compositor that runs into this issue in the future.

I want miracle-wm to be the best it can! I also appreciated the updates.

@mattkae
Copy link
Collaborator

mattkae commented Jun 12, 2024

Closing this since we've got that ticket made in Mir ;) But thanks for bringing that issue to light!

@mattkae mattkae closed this Jun 12, 2024
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.

**Missing** /usr/lib/x86_64-linux-gnu/mir/server-platform
3 participants