-
Notifications
You must be signed in to change notification settings - Fork 237
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
Provide pkg-config file with the C library #592
Comments
It will also make static linking easier as all the required linker flags would be part of the pkg-config file |
I'm not familiar with |
Out of scope unless someone would send a path. |
You might want to add something to the README.md that Linux distros should not package it for the time being then as without a proper soname etc it's only going to cause problems. I'm not using resvg myself and only reported that here because someone ran into such problems and had the impression that Rust's build tools are too immature for providing proper C shared libraries. (Which is kind of true if only using cargo, like in your project here) |
Afaik this is a cargo bug, not resvg one. And Linux-only one. It's up to distro maintainers to decide what to do. Out of scope. |
Fine with me, next time someone complains about stuff being broken I'll just point them to this issue :)
On macOS you don't get proper dylib versioning either.
More a missing feature than a bug, but until then cargo alone is unsuitable for this purpose. rust-lang/cargo#5045 and rust-lang/cargo#2273 FWIW |
Providing a pkg-config file makes it easier for users of the library to actually find it, check its version and get the correct compiler and linker flags.
cargo-c could be helpful here for generating the pkg-config file and also to provide a mechanism for installing it, the library itself and the header. It also ensures that the library has a valid and correct soname set, which cargo doesn't set at all when building a
cdylib
.cargo-c
also allows running cbindgen automatically but AFAIU you're manually editing the output of it so that's maybe not very useful here.The text was updated successfully, but these errors were encountered: