-
Notifications
You must be signed in to change notification settings - Fork 3
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
Failure when loaded in Alpine Linux with musl-dev #106
Comments
The problem is also related to this: metanorma/emf2svg-ruby#17 |
Platform is detected as
So it matches The next step is to create a build for |
The mismatch between
And that it is a known issue on Alpine that Rubygems can mistakenly install
I reviewed the code in rubygems/rubygems#4082 and apparently there is this rather undocumented differentiation of platforms: 'x86_64-linux' => ['x86_64', 'linux', nil],
'x86_64-linux-gnu' => ['x86_64', 'linux', nil],
'x86_64-linux-musl' => ['x86_64', 'linux', 'musl'],
'x86_64-linux-uclibc' => ['x86_64', 'linux', 'uclibc'], According to this PR, technically, a platform gem that specifies However, in the latest 'x86_64-linux' => ['x86_64', 'linux', nil],
'x86_64-linux-musl' => ['x86_64', 'linux', 'musl'], And the behavior at rubygems is now just broken: The way we have to solve this is either:
|
"/lib/ld-linux-x86-64.so.2" -- is a dynamic loader. expressir is using rake-compiler-dock that supports: Alpine will need to be added to this list |
The compatibility package
@maxirmx Maybe we should make a PR to |
@ronaldtse, we can if ruby really support differentiation but I am afraid that it won't be straightforwards either. |
This (or closely related) issue is a blocker for: Whe packaged with |
Then if we update the platform logic, so it does not treat it as |
I do not understand why other gems work. Probably it shall be possible to implement platform logic as others do it |
Summary of research re Alpine (musl) support
The bottom line. For gems that use Rice there is no way to x86_64-linux platform gems to work on musl unless gcompat package is installed |
What can be done
|
@maxirmx thank you for the extensive investigation!
This is reasonable for packed-mn and our gems. We should take this approach.
This is risky for us because we do not know when the Ruby team is interested enough in musl. This PR has implications in the Rubygems system because other there is a backwards compatibility concern too, i.e. all currently available platform gems are assigned to 'glibc' to differentiate from 'musl'.
I think this is also a reasonable approach, and it should be doable, but it will bloat the gems, and there are not that many people who use Alpine anyway. Prefer using the |
I will do more tests with gcompat and/or packed_mn to be sure that gcompat is solid approach |
Update
I found that this exception is related to
Attn @ronaldtse |
@maxirmx what is the best course ahead for now? Is Alpine a lost cause? |
@ronaldtse
If you ask about packed-mn, the first version is ready as far as compilation and packaging is considered (metanorma/packed-mn#158 (comment)) There is run-time issue with fontist gem that needs to be fixed So the real question is if and where you are ready to invest |
|
- MSys packaging for gems without native extensions (partial implementation #27) - Ruby version upgrade to 2.7.7 - Bundler version upgrade to 2.3.22 -- we can address lutaml/expressir#106 now - Packaging optimization - Ruby extensions are not reconfigured on each tabako execution anymore (adresses #91)
@maxirmx is this issue to be closed? Thanks! |
Actually there are (there were) two related issues:
As a solution for both problems we do not use precompiled native extensions when Alpine version of tebako package is created. If we consider metanorma the issue was nokogiri. The maintainers claimed that its x64-linux extension worked for Alpine but in fact it did not. At least not for me. So the answers is
|
@maxirmx in this case, could you please help schedule 1 and 2 after the recent tebako work? Thanks! |
Packaging of expressir gem is implemented with rack-compiler-dock |
In Alpine, the musl-dev library is used instead of glibc. Somehow, the platform gem "x86_64-linux" is installed for expressir.
When I install on aarch64, it correctly detects that I am on a different platform and therefore does not install the platform gem and compiles properly.
The text was updated successfully, but these errors were encountered: