-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
diesel_codegen forces dynamic linkage #19
Comments
not sure why diesel_codegen needs to force us into dynamic land. Both rocket_codegen and serde_codegen work fine statically linked. At any rate |
Actually, golddranks musl image does successfully build diesel_codegen! I was using it with wrong parameters. It's also reliant on sgrif/pq-sys#18 so need a patched pq-sys in Cargo.toml, but should be able to bisect from here. |
So the codegen crates do create dynamic libraries, but interestingly they are only used at build time (to generate code naturally), so they can use the gnu toolchain in the build image (which the diesel_codegen is doing). Today's version of muslrust will have the fix, which will work for people as long as they patch pq-sys to follow that PR above: [dependencies.diesel]
features = ["postgres"]
version = "0.16.0"
[dependencies.diesel_codegen]
features = ["postgres"]
version = "0.16.0"
[patch.crates-io]
pq-sys = { git = 'https://github.com/golddranks/pq-sys' } |
With newer versions of diesel, and a merged pr, this can now use the official versions (however with a yet to be released pq-sys): [dependencies.diesel]
features = ["postgres"]
version = "1.1.1"
[patch.crates-io]
pq-sys = { git = 'https://github.com/sgrif/pq-sys' } |
libpq exists now, and the pq-sys crate will compile, however, programs using diesel_codegen will not. Not quite sure what to do about it. It is apparently trying to link dynamically itself with ssl:
The text was updated successfully, but these errors were encountered: