gtkd-developers / GtkD

GtkD is a D binding and OO wrapper of GTK+ originally created by Antonio Monteiro
http://gtkd.org
Other
322 stars 71 forks source link

GtkD 3.6.x requires libgdkglext now when dynamically linked #202

Closed gnunn1 closed 7 years ago

gnunn1 commented 7 years ago

In Tilix I build release builds using ldc2 with libphobos and druntime statically linked and everything else dynamically linked. When I build with the 3.6.x series and try to run Tilix I get the error below. Building with 3.5.1 under the same configuration results in a working tilix. I think something in the GtkD refactoring has started dragging in this dependency even when the application doesn't explicitly use the GL modules.

object.Exception@../../../.dub/packages/gtk-d-3.6.5/gtk-d/generated/gtkd/gtkd/Loader.d(125): Library load failed (libgdkglext-3.0.so.0): libgdkglext-3.0.so.0: cannot open shared object file: No such file or directory
MikeWey commented 7 years ago

Although i can't seem to reproduce this locally. I think this is because listing the top level gtkd package as a dependency builds and links everything (gtk, gtkgl, sourceview, vte, peas) and then it's up to the linker on what to include.

Depending on the different sub packages should work:

    "dependencies": {
        "gtk-d:gtkd": "~>3.6.5",
        "gtk-d:vte": "~>3.6.5"
}

I probably also need to revert the changes for issue #175 since dub now also builds a separate library that includes everything for the top level package.

gnunn1 commented 7 years ago

Thanks, changing the dependency to the sub-packages works fine.

MikeWey commented 7 years ago

I've set the target type back to none, so hopefully this will be less of an issue in the future.