Closed gdesmott closed 4 years ago
@sdroege @GuillaumeGomez : this was a build test using my metadeps sys branch.
To my surprise all tests passed so I'm wondering what's the actual use case for all the current build.rs
hacks: GTK_INCLUDE_DIR
, GTK_LIB_DIR
, windows specific paths, etc?
Maybe they're not even required anymore and are just cargo culted for future generations. @EPashkin would know.
But as I said on IRC, we should really get rid of those hacks and instead set up the Windows CI environment correctly. Which might've happened by now (maybe msys2 fixed their packages...).
I tested on Windows with last msys2x64 and seems hardcode_shared_libs
branches in good pkgconfig case now not needed (I not remember why it was added).
But IMHO we still better have GTK_LIB_DIR and fallback.
Not sure about GTK_INCLUDE_DIR
But IMHO we still better have GTK_LIB_DIR and fallback. Not sure about
GTK_INCLUDE_DIR
The fallback is provided by metadeps in this branch, which allows to override things in a generic way for each dependency so that people can continue to work around their broken environments.
The fallback is provided by metadeps in this branch, which allows to override things in a generic way for each dependency so that people can continue to work around their broken environments.
I don't see fallback not in sys branch not in https://github.com/gdesmott/metadeps/blob/master/src/lib.rs
It's all in my wip branch for now.
I missed that it have branch, but IMHO it still don't have "similar" failure case https://github.com/gdesmott/metadeps/blob/wip/src/lib.rs#L310
What do you mean? This feature is meant for crates building internally the underlying C library to statically link to it. That's not something we currently support in gtk-rs
.
Yes, that why I say that you sys'es needed special fallback for this errors.
How so? metadeps will raise an error if user tries to use this feature as our sys don't implement a build closure.
How so? metadeps will raise an error if user tries to use this feature as our sys don't implement a build closure.
And pkgconfig error is lost and we can't find it by metadeps error.
But that only happens if user explicitly defined METADEPS_GTK_BUILD_INTERNAL=auto
or always
. The default value is never
so metadeps
will fail on pkg-config and report its error.
Sorry, I seems totally go to wrong direction. So we just need don't forget to add it in your sys'es.
So we just need don't forget to add it in your sys'es.
Add what?
That's something for metadeps to take care of. The goal here is to move away from all these custom hacks that work differently for every crate.
Also the above part you linked shouldn't be done unconditionally as that regularly causes problems for users, especially on Windows. It needs to be something to opt-in for the user, which is already possible with metadeps by setting the correct libraries for the corresponding crate.
This was merged
Not meant to be merged, I just want to have the CI running.