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
Build issue using Musl rather than glibc #503
Comments
We're not in a position to actively support a port to Musl, but would be happy to consider PRs. |
Yeah I'm slowly working through the errors myself, and will PR everything that fixes the issues I encounter. |
@PureTryOut I've seen the patches at https://gitlab.com/postmarketOS/pmaports/tree/feature/unity8/unity8/mir and wondered if you're ready to PR some fixes? How well is Mir working for you? |
This morning I helped z3ntu get Mir master to compile for pmOS. They're packaging gtest now AFAIK because its not on Alpine yet. |
Huh, Mir master already compiled, why did he need help? @AlanGriffiths most fixes can be upstreamed imo, but at least one is not good enough. Basicall it's just removing I could do the rest separately though, we at least got it running! |
Apparently protobuf was upgraded in Alpine between the time you and me compiled it and 7c426ea is not in 0.32.1 |
So I hit this error message when basically doing anything with the compiled
After spending much time and fortunately @PureTryOut telling me, that v0.32.1 worked, I wrote a git bisect script and it resulted in this:
EDIT: After reverting that commit on master (plus my patches), the shared library seems to work properly. I'm now trying to get miral-shell to work. |
Tests look surprisingly good.
(most failures are caused by the patches linked below) The acceptance tests have more problems though :) Using https://github.com/z3ntu/mir/commits/e9f0a81d6fa96417783a6cfc69bb483ae02b07d6 |
@z3ntu browsing through those commits I see that you change I understand that Do you have |
We can add it as a dependency, so that would work yes. |
OK, proposed that: #637 |
I'm happy to report that when merging the following branches onto master (they all have an open PR currently) and applying the tiny patch from #696, Mir compiles on Alpine Linux: Tests are a different story though ^^ (and #503 (comment) is still valid too) |
@AlanGriffiths I get the following warning/error now:
|
@z3ntu that's just weird. It is initialized on creation: auto parent_role = parent_surface->window_role();
specification->type = mir_window_type_freestyle;
specification->placement_hints = mir_placement_hints_slide_any;
if (parent_role)
specification->parent_id = parent_role.value()->surface_id(); |
I also find it weird because I didn't see that error when building in a shell in an Alpine VM but I get the error when building for a postmarketOS package (which technically should be 1:1 the same packages but something is different) Build commands:
gcc command that triggers that warning/error:
|
I replaced you're absolute paths with the ones on my system and replaced Things that didn't remove the warning:
Things that did:
|
Interesting. when I replace the body of the if with
I still get the warning |
Moving
to below the if/else block fixes it, wtf? |
Wtf |
This is clearly a compiler bug. How about coming up with a minimal example and reporting it? |
It will take some amount of work to get a minimal example (especially since many minor changes make the bug go away. I want to do it eventually, but it's low on my priorities. It may be useful to know that |
@wmww Did you make any progress on that issue? |
It might be this bug report https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86465 ? |
@z3ntu Haven't been back to it, but that bug report does appear to be about the issue. |
@z3ntu this is clearly a compiler issue. As there is no obvious rephrasing of the code that works around it, could you try detecting the compiler+version and disabling |
I've changed the Alpine package to use clang instead of gcc for now |
I came across this and though of this problem. |
This issue is basically solved - except that the tests don't work (what doesn't really annoy me too much). What I would appreciate it, if the CI would be set up to also compile everything on Alpine Linux to make sure there are no "compile-time regressions" :) |
@z3ntu while it's a noble goal, it's basically impossible to cover every distro / toolchain in CI… If you have infrastructure onto which we could deploy this, we could try. I suppose we could also try and include a |
Sure, a musl on Ubuntu CI would suffice. |
Raised that as a specific issue. Can we close this issue now? (Possibly first raise a new issue for the tests?) |
Opened #778. Sure, let's close this issue as Mir now compiles and runs fine on Alpine/postmarketOS. |
I'm trying to compile Mir as part of my effort to port Unity8 to postmarketOS. Being based on Alpine Linux, postmarketOS uses Musl rather than glibc. This hasn't caused any major problems so far up till Mir, as it uses the function
dlvsym
(here) which is a glibc extension and not described by POSIX (see here).When patching that out (using this patch), it fails later on line 59 to 65 with the following:
I'm able to fix that using this patch.
Then it fails on line 87-88 here, as
dev_t
was not declared in this scope. Full error:That was fixed using this patch.
The text was updated successfully, but these errors were encountered: