Skip to content

[ion-c-sys] builds on musl may be broken #100

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

Closed
almann opened this issue Sep 17, 2020 · 2 comments
Closed

[ion-c-sys] builds on musl may be broken #100

almann opened this issue Sep 17, 2020 · 2 comments

Comments

@almann
Copy link
Contributor

almann commented Sep 17, 2020

As per https://twitter.com/webbonet/status/1306114634043273223

The C didn't compile with musl for lambda and we didn't really wanted to force the project to compile C.

We should investigate this and make sure there isn't something in Ion C that is broken here (could be an amzn/ion-c issue).

@almann almann changed the title ion-c-sys and musl may be broken [ion-c-sys] builds on musl may be broken Sep 20, 2020
@almann
Copy link
Contributor Author

almann commented Oct 1, 2020

I whipped up a simple Dockerfile based on Alpine Linux (which uses musl) to try to debug this a bit:

https://gist.github.com/almann/e33183a06e32ad9933d013f7c19cb1c4

Here is the error I encountered:

thread 'main' panicked at 'Unable to find libclang: "the `libclang` shared library at /usr/lib/libclang.so.10 could not be opened: Dynamic loading not supported"', /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.54.0/src/lib.rs:1959:31

I think part of the problem is this:

rust-lang/rust#34987

In theory cross-compiling should not be affected by this (e.g. targeting x86_64-unknown-linux-musl and delegating to musl-gcc and musl-g++ in the CMake delegation), but it needs to be tried and tested.

@almann
Copy link
Contributor Author

almann commented Oct 2, 2020

Put together a Dockerfile based on Ubuntu 20.04 + musl gcc:

https://gist.github.com/almann/276c9eda7489cc39edfb69014d5bc12a

This builds and runs, so this would confirm that the problem seems to be with running the build with Rust's musl built toolchain, but not as a target.

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

2 participants