Skip to content

Instantly share code, notes, and snippets.

@pragmatrix
Created July 27, 2020 20:47
Show Gist options
  • Save pragmatrix/76b37adfbdd42e6e8f2c84b14c2a7729 to your computer and use it in GitHub Desktop.
Save pragmatrix/76b37adfbdd42e6e8f2c84b14c2a7729 to your computer and use it in GitHub Desktop.
> rustup component add x86_64-unknwon-linux-musl
- change build_support to support musl
- build with target musl
Failed to find tool Is musl-g++ installed
> sudo apt install musl-dev
> sudo apt install musl-tools
https://github.com/emk/rust-musl-builder/issues/53
sudo ln -s /bin/g++ /bin/musl-g++
- https://github.com/rust-lang/rust/issues/36710
SkTypeface.cpp:(.text._ZN10SkTypeface18GetDefaultTypefaceENS_5StyleE+0x135): undefined reference to `__dso_handle'
/usr/bin/ld: /home/armin/dev/rust-skia/target/x86_64-unknown-linux-musl/debug/deps/libskia_bindings-fb65cf06d0573da9.rlib(libskia.SkFontMgr.o): in function `SkFontMgr::RefDefault()':
SkFontMgr.cpp:(.text._ZN9SkFontMgr10RefDefaultEv+0x10d): undefined reference to `__dso_handle'
/usr/bin/ld: /home/armin/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd-4c028497f01d89c4.rlib(std-4c028497f01d89c4.std.823zux3k-cgu.0.rcgu.o):(.data._rust_extern_with_linkage___dso_handle+0x0): undefined reference to `__dso_handle'
/usr/bin/ld: /home/armin/dev/rust-skia/target/x86_64-unknown-linux-musl/debug/deps/skia_org-3731707497c700f7: hidden symbol `__dso_handle' isn't defined
RUSTFLAGS="-C target-feature=-crt-static"
- no change
https://stackoverflow.com/questions/34308720/where-is-dso-handle-defined
> add -fno-use-cxa-atexit flags to the skia build
rustup toolchain add stable-x86_64-unknown-linux-musl
cargo clean:
Error loading shared library libgcc_s.so.1:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment