After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 724890 - GI shlib resolution on W32 is basically non-existent
GI shlib resolution on W32 is basically non-existent
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-02-21 13:27 UTC by LRN
Modified: 2015-02-07 16:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix shlib resolution on W32 (3.11 KB, patch)
2014-02-21 13:27 UTC, LRN
committed Details | Review
Make shlib resolution on Windows also work with Visual C++ builds (5.33 KB, patch)
2014-02-24 04:55 UTC, Fan, Chun-wei
committed Details | Review

Description LRN 2014-02-21 13:27:45 UTC
GI just adds '.dll' to library name and calls it a day.
There's a comment about how this function might work, i've used it to
implement something better.
This requires a compiler that supports -print-search-dirs argument (i.e.
gcc) and a dlltool.
Comment 1 LRN 2014-02-21 13:27:48 UTC
Created attachment 269918 [details] [review]
Fix shlib resolution on W32
Comment 2 Colin Walters 2014-02-22 23:56:08 UTC
Review of attachment 269918 [details] [review]:

Cool, this looks like it was quite nontrivial to implement.  Thanks for the patch!

I just cleaned it up to make the pep8 checks happy.
Comment 3 Fan, Chun-wei 2014-02-24 02:46:55 UTC
Hi,

Unfortunately I am going to have to reopen this bug as this seems that it is very likely going to break to MSVC builds of building the introspection files.  Please let me know whether I should post patches in this bug (as it would serve the same purpose, if doable), or should I open another bug.

With blessings, thank you!
Comment 4 Fan, Chun-wei 2014-02-24 04:55:27 UTC
Created attachment 270093 [details] [review]
Make shlib resolution on Windows also work with Visual C++ builds

Hi,

This patch fixes the build of introspection files with Visual C++ builds, with the shlib resolution functionality for Windows also provided for the Visual C++ builds.  Basically what happens there is that Visual C++/Windows SDK ships with a dumpbin utility where one can use it with dumpbin -symbols something.lib, and it will return some info about something.lib, including the DLL that the .lib file is linked to, and the paths where the linker looks for the .lib file(s) is determined by the LIB environment variable.

This means that shlib resolution would also be supported with Visual C++ builds as well.

---

Hi LRN, can you please check whether this patch does not break for you on the GCC/MinGW side?

---

Hi Colin,

As it seems that we have better support for Windows for g-i, can we also commit Dieter's patch at bug 620566 comment 5 ("Make g-ir-annotiotion-tool, g-ir-doc-tool and g-ir-scanner 'relocatable' at runtime") in too, as that patch would be really helpful for Windows builds of g-i, whether one that is built with MinGW/GCC or Visual C++?  Sorry to bug you on this...

With blessings, thank you!
Comment 5 LRN 2014-02-24 16:49:49 UTC
Yeah, this works for me.

As for relocatability, there's also bug 724885
Comment 6 Colin Walters 2014-02-24 17:57:09 UTC
(In reply to comment #4)
 
> As it seems that we have better support for Windows for g-i, can we also commit
> Dieter's patch at bug 620566 comment 5 ("Make g-ir-annotiotion-tool,
> g-ir-doc-tool and g-ir-scanner 'relocatable' at runtime") in too, as that patch
> would be really helpful for Windows builds of g-i, whether one that is built
> with MinGW/GCC or Visual C++?  Sorry to bug you on this...

BTW, I don't consider myself the sole maintainer here - anyone who feels qualified to review should go ahead and review!  So Chun-Wei or LRN, if either of you wanted to approve Dieter's patch, please go ahead.

I obviously would still want to be involved for core things like changes to the typelib format, but for Windows builds - please let's have it be a cooperative and equal effort!
Comment 7 Fan, Chun-wei 2014-02-25 04:04:02 UTC
Review of attachment 270093 [details] [review]:

Hello,

Thanks for the feedback, since things seem alright, I am pushing the patch anyways, as f3128da2.  I will close this bug at this point.

With blessings, thank you!
Comment 8 André Klapper 2015-02-07 16:52:33 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]