Open spongythecake opened 3 months ago
It fixed itself with this cmd:
sudo apt install mir-graphics-drivers-desktop
Sorry for the late response. Nice catch though :smile: I will add this as a dependency to the project
I'm happy its a straightforward bug.
Since this issue was labelled "good first issue", I would like to kindly nominate myself to patch this. It would be my first patch here! Any thoughts?
In fixing, my approach is to use dpkg provided by cmake's tooling to detect if package is available. If missing, cmake will raise a typical error, then developer with missing dependencies can take heed.
I think this, in a nutshell, is the way to move forward.
I'm happy its a straightforward bug.
Since this issue was labelled "good first issue", I would like to kindly nominate myself to patch this. It would be my first patch here! Any thoughts?
In fixing, my approach is to use dpkg provided by cmake's tooling to detect if package is available. If missing, cmake will raise a typical error, then developer with missing dependencies can take heed.
I think this, in a nutshell, is the way to move forward.
Yeah that would very be much appreciated :smile: You should be able to follow what we do in https://github.com/mattkae/miracle-wm/blob/master/CMakeLists.txt with the help of pkg_check_modules
. Let me know if you run into any trouble there though.
The package mir-graphics-drivers-desktop
is a metapackage, as per source.
The status of pkgconf
is unaffected by the mentioned package being installed or removed. So, in this case I have determined the library presence by searching these specified paths. For example:
find_library(MIR_SERVER_GRAPHICS_PLATFORM
NAMES graphics-gbm-kms renderer-egl-generic server-virtual server-x11
REQUIRED
)
message(STATUS "Found graphics library: ${MIR_SERVER_GRAPHICS_PLATFORM}")
Therefore, I am posting here because I think this is the correct solution but require assistance.
On a side-note, there are also some platform checks in the mir library, it might be okay to reuse them, however this is beyond my level of expertise with regards to Mir.
Actually the above config complains when you omit the version number e.g. graphics-gbm-kms.so.21
. Considering version numbers will change, it isn't a flexible solution.
In other words, pkg_check_modules
didn't work for me and I resorted to using find_library
, despite it feeling like a rigid approach.
The package
mir-graphics-drivers-desktop
is a metapackage, as per source.The status of
pkgconf
is unaffected by the mentioned package being installed or removed. So, in this case I have determined the library presence by searching these specified paths. For example:find_library(MIR_SERVER_GRAPHICS_PLATFORM NAMES graphics-gbm-kms renderer-egl-generic server-virtual server-x11 REQUIRED ) message(STATUS "Found graphics library: ${MIR_SERVER_GRAPHICS_PLATFORM}")
Therefore, I am posting here because I think this is the correct solution but require assistance.
On a side-note, there are also some platform checks in the mir library, it might be okay to reuse them, however this is beyond my level of expertise with regards to Mir.
Actually the above config complains when you omit the version number e.g.
graphics-gbm-kms.so.21
. Considering version numbers will change, it isn't a flexible solution.In other words,
pkg_check_modules
didn't work for me and I resorted to usingfind_library
, despite it feeling like a rigid approach.
I also think this is the correct solution. I believe that we define no *.pc
file in this scenario, so it makes sense why pkg_check_modules
isn't picking that up. I probably failed to realize this since I usually have those libraries installed.
Also, sorry for getting back to this so late :smile: Would you like to open a PR for this? I believe the find_library
solution is the best in this case
So regarding the wildcard in find_library. It is not supported. See screengrab.
From my POV, albeit very rigid, a "best known list" is a reasonable solution.
Curious to explore more options if you've got any suggestions.
I don't think there's a simple fix in miracle-wm, or in Mir.
The error message should include something like: "Failed to load Mir any "graphics platform" libraries, please install the appropriate platforms for your system: For example, mir-graphics-drivers-desktop or mir-graphics-drivers-desktop."
Detecting the right platform packages automatically isn't easy. On Ubuntu and Debian Mir provides:
and these meta packages, for desktop-like systems, that group the above:
But, from the Mir perspective, there are also "third-party" platforms that support other graphics stacks which is why none are installed by default. (Probably not a problem for miracle-wm, which could arguably make "all of the above" a default.)
Also note, that the installation location varies between systems and installation method (e.g. make install
installs under /usr/loca/lib
) and that the .so names can vary between Mir versions.
I kind of decided in Fedora to sidestep this whole mess and ship the server platform libraries in the mir-server-libs package... 😅
But if Mir were to be packaged in openSUSE or Mageia, for example, then it would get some very odd names for the packages based on their sonames.
Steps
The error message provided indicates that a file or directory named /usr/lib/x86_64-linux-gnu/mir/server-platform does not exist on your system.
I can confirm a
ls
yields a non-existent directory. However, I am unsure what dependencies these relate to.Full error log
Here is the output log full error:
Specs
=== System Specs