What does "(skip)" mean ???

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

What does "(skip)" mean ???

Gtk+ - Dev - General mailing list
All of a sudden I've hit a problem when building glib with MSVC.  It
seems to be affecting calls to g_mkstemp() / g_getenv() and various
others.  Let's take g_mkstemp() as an example.  It gets called in
glib-genmarshal.c

Prior to commit #d1528402, git master had some lines looking like this
(in 'gfileutils.h'):-

     #ifndef __GTK_DOC_IGNORE__
     #ifdef G_OS_WIN32
     #define g_file_test               g_file_test_utf8
     #define g_file_get_contents g_file_get_contents_utf8
     #define g_mkstemp              g_mkstemp_utf8

     // and a few others

     #endif /* G_OS_WIN32 */
     #endif /* __GTK_DOC_IGNORE__ */

so in the past (when building for WIN32) calls to 'g_mkstemp()' got
converted to use 'g_mkstemp_utf8()' instead.  But now that the above
lines have been removed, 'g_mkstemp()' is coming up as an unresolved
symbol when I try to link the glib-genmarshal DLL.  I'm a bit baffled
about this because it does seem to be getting exported from libglib (so
I don't understand why it can't be imported).  Maybe there's some
confused linkage somewhere??

However... in gfileutils.c, I see a comment, looking like this:-

     /**
      * g_mkstemp: (skip)
      * @tmpl: (type filename): template filename
      *
      * Opens a temporary file. See the mkstemp() documentation
      *
      *   // some other stuff
      *
      */

So I'm wondering - what's the significance of the word "skip" here??  I
can't see any obvious reason why this isn't linking but maybe that'll
give me a clue...

John
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: What does "(skip)" mean ???

Sébastien Wilmet-2
Hi,

Replying only to the mail subject:

It's a GObject Introspection annotation !!!

https://wiki.gnome.org/Projects/GObjectIntrospection/Annotations

--
Sébastien
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: What does "(skip)" mean ???

Christoph Reiter
In reply to this post by Gtk+ - Dev - General mailing list
On Sun, Apr 16, 2017 at 7:44 PM, John Emmas via gtk-devel-list
<[hidden email]> wrote:
> All of a sudden I've hit a problem when building glib with MSVC.  It seems
> to be affecting calls to g_mkstemp() / g_getenv() and various others.  Let's
> take g_mkstemp() as an example.  It gets called in glib-genmarshal.c
>
> Prior to commit #d1528402, git master had some lines looking like this (in
> 'gfileutils.h'):-

:/ I'll have a look tomorrow, maybe I missed something there.
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: What does "(skip)" mean ???

Gtk+ - Dev - General mailing list
In reply to this post by Sébastien Wilmet-2
On 16/04/2017 19:25, Sébastien Wilmet wrote:
> It's a GObject Introspection annotation !!!
>
> https://wiki.gnome.org/Projects/GObjectIntrospection/Annotations
>

Thanks Sébastien,

I can't claim to understand it all but it seems like GObject
Introspection is a way of compiling modules with one language such that
they can be used by some different language.  If I use "dumpbin
/EXPORTS" on my built DLL, I see these entries:-

         755  2F2 00002680 g_mkstemp = @ILT+5755(_g_mkstemp)
         756  2F3 0000132A g_mkstemp_full = @ILT+805(_g_mkstemp_full)
         757  2F4 00001870 g_mkstemp_utf8 = @ILT+2155(_g_mkstemp_utf8)

so all three functions are getting exported - BUT - if I examine the
corresponding link lib, I can see a reference to g_mkstemp_full(). I can
also see a reference to g_mkstemp_utf8().  But there's no reference to
g_mkstemp().  In other words, although that function does get exported
from the DLL, the accompanying link lib doesn't seem to know about it.  
I've never seen anything like that before but I'm guessing (maybe
wrongly) it wouldn't have anything to do with Introspection??

I've also discovered that if I revert the changes from commit
#d1528402,it fixes the problem for g_mkstemp().  So I'm assuming that if
I reverted Christoph's other changes from that time, it'd fix the other
problems I'm seeing with g_getenv() etc.

Should I transfer this discussion to bugzilla here:-

https://bugzilla.gnome.org/show_bug.cgi?id=780634

Also - has anyone else managed to build this successfully with MSVC?  
Maybe there's a new #define somewhere that I need to know about?

Thanks, John
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: What does "(skip)" mean ???

Emmanuele Bassi
On 17 April 2017 at 10:38, John Emmas via gtk-devel-list
<[hidden email]> wrote:

> so all three functions are getting exported - BUT - if I examine the
> corresponding link lib, I can see a reference to g_mkstemp_full(). I can
> also see a reference to g_mkstemp_utf8().  But there's no reference to
> g_mkstemp().  In other words, although that function does get exported from
> the DLL, the accompanying link lib doesn't seem to know about it.  I've
> never seen anything like that before but I'm guessing (maybe wrongly) it
> wouldn't have anything to do with Introspection??

Correct: this has nothing to do with introspection.

> Should I transfer this discussion to bugzilla here:-
>
> https://bugzilla.gnome.org/show_bug.cgi?id=780634

Please, do, detailing how you build GLib.

Ciao,
 Emmanuele.

--
https://www.bassi.io
[@] ebassi [@gmail.com]
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: What does "(skip)" mean ???

Gtk+ - Dev - General mailing list
On 17/04/2017 11:25, Emmanuele Bassi wrote:
>> Should I transfer this discussion to bugzilla here:-
>>
>> https://bugzilla.gnome.org/show_bug.cgi?id=780634
> Please, do, detailing how you build GLib.
>

Okay - just before I do that though, a bit more investigation might have
revealed the problem...

I'm building with VS8, using my own vcproj files.  Essentially they're
the same as the official ones except that as well as building a Debug
target and a Release target, I also build a "Debuggable Release"
target.  Apart from that there are only minor differences - for example
when I build the Debug modules I append a letter "D" to the target name
(in line with what normally gets done when building with MSVC).

Here's where it gets interesting... my VS8 projects seem to use
".symbols" files for determining what gets exported from the built
DLLs.  I can't remember why I needed to do that but I probably just need
to amend them - or hopefully find a way to stop using them now!

John
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: What does "(skip)" mean ???

Gtk+ - Dev - General mailing list
On 17/04/2017 12:16, John Emmas via gtk-devel-list wrote:
>
> my VS8 projects seem to use ".symbols" files for determining what gets
> exported from the built DLLs.  I can't remember why I needed to do
> that but I probably just need to amend them - or hopefully find a way
> to stop using them now!
>

Yes - that was it.!  My ".symbols" file was getting converted into
module definition files (".def" files).  The file was very subtly
different for a Debug build compared to a Release build.  It looks like
the difference was due to this function:-

       g_slice_debug_tree_statistics()

 From what I can tell, it's only supposed to be relevant in a Debug
build.  But there must have been a time when it was somehow getting
included in a Release build (and presumably causing some kind of
problem).  My ".def" file just made sure that it didn't get exported
when it wasn't needed.

Anyway... whatever the problem was, it looks like it eventually got
fixed and I can now get rid of my def/symbols files..  Sorry for the noise.

John
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

RE: What does "(skip)" mean ???

Gtk+ - Dev - General mailing list

Hi John,

 

Note that since a few release series ago we stopped using .symbol files to export symbols but instead use a __declspec(dllexport) approach to export them.

 

See config.h.win32.in in your checkout in the _GLIB_EXTERN part—if it is not defined in your build files, define it as it is in config.h.win32.in, and things should do.

 

With blessings, and cheers!

 

Windows 10 手機傳送

 

寄件者: [hidden email]
傳送時間: 2017417 20:47
副本: [hidden email]
主旨: Re: What does "(skip)" mean ???

 

On 17/04/2017 12:16, John Emmas via gtk-devel-list wrote:

> 

> my VS8 projects seem to use ".symbols" files for determining what gets

> exported from the built DLLs.  I can't remember why I needed to do

> that but I probably just need to amend them - or hopefully find a way

> to stop using them now!

> 

 

Yes - that was it.!  My ".symbols" file was getting converted into

module definition files (".def" files).  The file was very subtly

different for a Debug build compared to a Release build.  It looks like

the difference was due to this function:-

 

       g_slice_debug_tree_statistics()

 

From what I can tell, it's only supposed to be relevant in a Debug

build.  But there must have been a time when it was somehow getting

included in a Release build (and presumably causing some kind of

problem).  My ".def" file just made sure that it didn't get exported

when it wasn't needed.

 

Anyway... whatever the problem was, it looks like it eventually got

fixed and I can now get rid of my def/symbols files..  Sorry for the noise.

 

John

_______________________________________________

gtk-devel-list mailing list

[hidden email]

https://mail.gnome.org/mailman/listinfo/gtk-devel-list

 


_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list