emk / rust-musl-builder

Docker images for compiling static Rust binaries using musl-libc and musl-gcc, with static versions of useful C libraries. Supports openssl and diesel crates.
Apache License 2.0
1.54k stars 193 forks source link

[WIP] add SQLite to container #29

Closed euclio closed 6 years ago

euclio commented 7 years ago

This almost works, but I can't seem to figure out why it's failing on linking diesel-codegen. Figure I'd put it up in case it's something obvious.

Fixes #28.

I'm getting:

error: /home/rust/src/target/release/deps/libdiesel_codegen-5040d9c8f61d2cff.so: undefined symbol: SSL_set_ex_data
 --> src/main.rs:4:1
  |
4 | extern crate diesel_codegen;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: Could not compile `using-diesel`.
emk commented 7 years ago

You may need to submit a PR to the SQLite crate, too, to support cross compilation.

The problem is that diesel_codegen needs to be pointed at the Ubuntu copy of sqlite, because it runs at compile time. But diesel needs to be pointed at the musl-libc copy!

I'm on the road and can't paste a link, but if you search through recently closed bugs for this project, you should find a bug talking about how we're dealing with this for PostgreSQL. Look also at the Postgres env vars in the Dockerfile, and note how some of them are platform specific.

I'll have internet connectivity by Monday, and I can answer more questions then.

emk commented 6 years ago

This has been implemented upstream. Thank you!