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

linking problem on alpine with matrix-sdk-crypto-nodejs #19

Open
eburghar opened this issue Oct 16, 2022 · 5 comments
Open

linking problem on alpine with matrix-sdk-crypto-nodejs #19

eburghar opened this issue Oct 16, 2022 · 5 comments
Assignees

Comments

@eburghar
Copy link

On alpine 3.16 I had to rebuild matrix-sdk-crypto-nodejs (v0.1.0-beta.1) and overwrite the matrix-sdk-crypto.linux-x64-musl.node which is downloaded by download-lib.js when trying to run matrix-hookshot, because of that dynamic linking error :

Error: Error relocating /usr/share/matrix-hookshot/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/matrix-sdk-crypto.linux-x64-musl.node: __register_atfork: symbol not found

Specifically this is object dependencies of the the original lib

ldd matrix-sdk-crypto.linux-x64-musl.node 
        /lib/ld-musl-x86_64.so.1 (0x7f941bb4c000)
        /lib/libmimalloc.so.2.0 => /lib/libmimalloc.so.2.0 (0x7f941b3c7000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f941b3ae000)
        libc.so.6 => /lib/ld-musl-x86_64.so.1 (0x7f941bb4c000)
        ld-linux-x86-64.so.2 => /lib/ld-linux-x86-64.so.2 (0x7f941b3a8000)

And this is for the rebuilt one

ldd matrix-sdk-crypto.linux-x64-musl.node 
        /lib/ld-musl-x86_64.so.1 (0x7f40c6de5000)
        /lib/libmimalloc.so.2.0 => /lib/libmimalloc.so.2.0 (0x7f40c5353000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f40c533a000)
        libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f40c6de5000)

Is this a cross-compile issue ?

@Hywan Hywan self-assigned this Oct 31, 2022
@Hywan
Copy link
Member

Hywan commented Jan 25, 2023

Hello,

Sorry for the late reply. Did you compile matrix-sdk-crypto-nodejs by hand, or has it been downloaded?

@eburghar
Copy link
Author

I download it, compile and replace the dir matrix-sdk-crypto-nodejs in node_modules (so the .so got overwritten)

It is a kind of ugly hack as it needs to be manually synchronized with the version appearing in package.json at each new revision, but this works and it is stable on alpine.

@Hywan Hywan transferred this issue from matrix-org/matrix-rust-sdk Aug 10, 2023
@to-kn
Copy link

to-kn commented Nov 2, 2023

as i am running into the same problem, how can it be fixed? We don't event need it, at the moment, but since it is a dependency of matrix-bot-sdk, i would like to get it working somehow :)

@Gnuxie
Copy link

Gnuxie commented Oct 4, 2024

Hi, you might not want to use ubuntu here https://github.com/matrix-org/matrix-rust-sdk-crypto-nodejs/blob/main/.github/workflows/release.yml#L54-L56

Just revisited this because i would like to be able to use alpine for Draupnir to shrink the image size a little the-draupnir-project/Draupnir#595

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

No branches or pull requests

4 participants