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

fix: test bindings on x86_64-unknown-linux-musl #306

Merged
merged 2 commits into from
Mar 11, 2024

Conversation

yisibl
Copy link
Member

@yisibl yisibl commented Mar 3, 2024

mimalloc-rust is no longer maintained, migrated to mimalloc.

local_dynamic_tls must be enabled in Linux, otherwise the following error will occur:

Error: Error relocating /build/resvgjs.linux-x64-musl.node: mprotect: initial-exec TLS resolves to dynamic definition in /build/resvgjs.linux-x64-musl.node

  › Object.<anonymous> (js-binding.js:175:31)
  › Module._compile (node_modules/pirates/lib/index.js:117:24)

  ✘ __test__/index.spec.ts exited with a non-zero exit code: 1

Copy link

vercel bot commented Mar 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
resvg-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 11, 2024 7:39am

@yisibl yisibl force-pushed the fix-ci-x86_64-unknown-linux-musl branch from 32cf55c to f7e2fc8 Compare March 3, 2024 05:20
@yisibl yisibl force-pushed the fix-ci-x86_64-unknown-linux-musl branch from f7e2fc8 to 0901e0d Compare March 5, 2024 12:12
@yisibl yisibl force-pushed the fix-ci-x86_64-unknown-linux-musl branch from 0901e0d to 46acea5 Compare March 5, 2024 12:24
@yisibl yisibl force-pushed the fix-ci-x86_64-unknown-linux-musl branch from 46acea5 to bf498c4 Compare March 5, 2024 12:29
@yisibl yisibl force-pushed the fix-ci-x86_64-unknown-linux-musl branch from bf498c4 to 04c0016 Compare March 5, 2024 13:34
@yisibl yisibl force-pushed the fix-ci-x86_64-unknown-linux-musl branch from 04c0016 to a1f4956 Compare March 5, 2024 13:41
@yisibl yisibl force-pushed the fix-ci-x86_64-unknown-linux-musl branch from a1f4956 to 59dc174 Compare March 9, 2024 07:07
@yisibl yisibl force-pushed the fix-ci-x86_64-unknown-linux-musl branch from 59dc174 to 0640511 Compare March 9, 2024 07:17
@Brooooooklyn Brooooooklyn marked this pull request as ready for review March 11, 2024 06:59
@yisibl yisibl force-pushed the fix-ci-x86_64-unknown-linux-musl branch from f605acb to 8df909b Compare March 11, 2024 07:17
mimalloc = "0.1"

[target.'cfg(target_os = "linux")'.dependencies]
mimalloc = { version = "0.1", features = ["local_dynamic_tls"] }
Copy link
Member Author

@yisibl yisibl Mar 11, 2024

Choose a reason for hiding this comment

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

迁移到 mimalloc 测试就好了?@Brooooooklyn

Copy link
Collaborator

Choose a reason for hiding this comment

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

你需要在 Linux 下开启 local_dynamic_tls

Copy link
Member Author

Choose a reason for hiding this comment

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

原先的 mimalloc-rust 支持 local_dynamic_tls

Copy link
Collaborator

Choose a reason for hiding this comment

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

支持, 但是不维护了

Copy link
Member Author

Choose a reason for hiding this comment

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

感谢!

yisibl and others added 2 commits March 11, 2024 15:39
```bash
Error: Error relocating /build/resvgjs.linux-x64-musl.node: mprotect: initial-exec TLS resolves to dynamic definition in /build/resvgjs.linux-x64-musl.node

  › Object.<anonymous> (js-binding.js:175:31)
  › Module._compile (node_modules/pirates/lib/index.js:117:24)

  ✘ __test__/index.spec.ts exited with a non-zero exit code: 1
```
@yisibl yisibl force-pushed the fix-ci-x86_64-unknown-linux-musl branch from 8df909b to 4b55451 Compare March 11, 2024 07:39
@yisibl yisibl merged commit 543684c into main Mar 11, 2024
37 checks passed
@yisibl yisibl deleted the fix-ci-x86_64-unknown-linux-musl branch March 11, 2024 07:49
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.

2 participants