Re: Is a Module Definition File needed when building with MSVC (gtk-2-24)?

2018-01-31 Thread John Emmas

On 30/01/2018 08:28, John Emmas wrote:


Should I file a bug report about this (or is there one already open?)



Bug #793057 submitted:-

https://bugzilla.gnome.org/show_bug.cgi?id=793057
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Is a Module Definition File needed when building with MSVC (gtk-2-24)?

2018-01-30 Thread John Emmas

On 24/01/2018 15:27, John Emmas wrote:


to be absolutely clear... there's no problem when I try to build 
Glib.  Glib itself builds fine.  The linker problem arises when I 
subsequently try to build Gtk-2 (specifically, the 'gtk-2-24' 
branch).  Gtk-2 uses the glib-genmarshal (python) script from Glib to 
generate some source files - notably, 'gtk/gtkmarshal.c'. That's the 
bit that's stopped working.




Should I file a bug report about this (or is there one already open?)

John
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Is a Module Definition File needed when building with MSVC (gtk-2-24)?

2018-01-24 Thread John Emmas

On 24/01/2018 13:26, Emmanuele Bassi wrote:

This is possibly a case that was solved with this commit:

https://git.gnome.org/browse/glib/commit/?id=bf0be21208800d7976b5a660287e1e487f8a57d3

i.e. the older version of the Python port you used generated too many
symbols that aliased the ones provided by GLib.



Hi Emmanuele,

That commit was already present when I tried this morning but to be 
absolutely certain, I just re-built Glib and Gtk-2 again Unfortunately 
though, the problem is still present... :-(


Just to be absolutely clear... there's no problem when I try to build 
Glib.  Glib itself builds fine.  The linker problem arises when I 
subsequently try to build Gtk-2 (specifically, the 'gtk-2-24' branch).  
Gtk-2 uses the glib-genmarshal (python) script from Glib to generate 
some source files - notably, 'gtk/gtkmarshal.c'.  That's the bit that's 
stopped working.


John
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Is a Module Definition File needed when building with MSVC (gtk-2-24)?

2018-01-24 Thread Emmanuele Bassi
Hi;

On 24 January 2018 at 13:20, John Emmas  wrote:

> In my November 2017 version, the most recent commit for
> 'gobject/glib-genmarshal.in' is:- is #100b83a7fa ("genmarshal Only wrap body
> prototypes in C++ guards").  But a couple of further commits got added since
> then.  I'm pretty certain one of those new commits has introduced this
> problem.. :-(

This is possibly a case that was solved with this commit:

https://git.gnome.org/browse/glib/commit/?id=bf0be21208800d7976b5a660287e1e487f8a57d3

i.e. the older version of the Python port you used generated too many
symbols that aliased the ones provided by GLib.

Ciao,
 Emmanuele.

-- 
https://www.bassi.io
[@] ebassi [@gmail.com]
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Is a Module Definition File needed when building with MSVC (gtk-2-24)?

2018-01-24 Thread John Emmas
I've made some good progress on this today and believe it or not, it's 
looking like a problem with Glib - but first, the older (exe) build:-


On 22/01/2018 04:12, ?,?? wrote:


test using the Python version of glib-genmarshal and see whether the 
linking z  works properly?  If not, use the former .exe version of the 
tool




I went back to using glib-genmarshal.exe temporarily but strangely - 
AFAICT it never generated those missing functions 
(gtk_marshal_VOID__BOXED / gtk_marshal_VOID__ENUM etc. etc.)  However... 
by a fortunate coincidence back then, 'gtk.symbols' wasn't trying to 
export them either.  So the fact that they didn't exist just never got 
noticed.


So what about the Python build?  Did that one ever generate those 
functions?  Well, yes - it seems like it did generate them initially...


I still have an older version of glib-2-54 available, dating from the 
middle of November 2017 (note: Glib, not Gtk2).  If I restore my 
November 2017 version of Glib, the Gtk build (python version) suddenly 
starts working again (in other words, 'gtk_marshal_VOID__BOXED' and all 
those others functions do now get generated).  But if I update to my 
most recent version of Glib from a few days ago (regardless of whether I 
select glib-2-54 or glib master) 'glib-genmarshal' always generates its 
files with those particular functions missing.


In my November 2017 version, the most recent commit for 
'gobject/glib-genmarshal.in' is:- is #100b83a7fa ("genmarshal Only wrap 
body prototypes in C++ guards").  But a couple of further commits got 
added since then.  I'm pretty certain one of those new commits has 
introduced this problem.. :-(


Sorry about the long-winded explanation.!  If anyone thinks it seems 
plausible, I'll condense it down and file a proper bug report.


John
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Is a Module Definition File needed when building with MSVC (gtk-2-24)?

2018-01-22 Thread John Emmas

On 22/01/2018 14:47, John Emmas wrote:


BTW - IIRC the previous version of glib-genmarshal was a perl script 
(rather than an exe). I'd need to get a copy of that old perl script 
somehow as I won't have it backed up anywhere.




Apologies... I just found a copy of glib-genmarshal.exe

Will give this a try on Wednesday or Thursday...

John
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Is a Module Definition File needed when building with MSVC (gtk-2-24)?

2018-01-22 Thread John Emmas

On 22/01/2018 08:27, John Emmas wrote:

On 22/01/2018 04:12, 范,君維 wrote:


Hi John,

Can you try generating gtk/gtkmarshalers.[c|h] using 
glib-genmarshal?  Can you also test using the Python version of 
glib-genmarshal and see whether the linking z   works properly?  If 
not, use the former .exe version of the tool, and perhaps file a bug 
against the Python version of glib-genmarshal?




Hi fanc,

Currently, I do build gtk/gtkmarshalers.[c]h] using python   I can try 
going back to the exe builder but I'm about to go away for a couple of 
days.  It'll be Wednesday before I get a chance to try this.




BTW - IIRC the previous version of glib-genmarshal was a perl script 
(rather than an exe). I'd need to get a copy of that old perl script 
somehow as I won't have it backed up anywhere.  However...


I managed to find an older copy of 'gtk/gtkmarshal.c' (generated by the 
old perl script).  That one does contain a function called 
'gtk_marshal_VOID__ENUM' (as well as all the other missing ones, such as 
'gtk_marshal_VOID__BOXED').  However, they aren't contained in the newer 
(python generated) 'gtkmarshal.c' (not here, anyway). While I'm away, 
maybe you can check to see if they get included in your version?  Thanks,


John
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Is a Module Definition File needed when building with MSVC (gtk-2-24)?

2018-01-22 Thread John Emmas

On 22/01/2018 04:12, 范,君維 wrote:


Hi John,

Can you try generating gtk/gtkmarshalers.[c|h] using glib-genmarshal?  
Can you also test using the Python version of glib-genmarshal and see 
whether the linking z   works properly?  If not, use the former .exe 
version of the tool, and perhaps file a bug against the Python version 
of glib-genmarshal?




Hi fanc,

Currently, I do build gtk/gtkmarshalers.[c]h] using python   I can try 
going back to the exe builder but I'm about to go away for a couple of 
days.  It'll be Wednesday before I get a chance to try this.


In the meantime, I noticed that the missing symbols are kinda #defined 
in gtkmarshalers.h (except using underscores).  So whereas I see errors 
like this:-


    gtk.def : error LNK2001: unresolved external symbol 
gtk_marshal_VOID__BOOLEAN
    gtk.def : error LNK2001: unresolved external symbol 
gtk_marshal_VOID__BOXED
    gtk.def : error LNK2001: unresolved external symbol 
gtk_marshal_VOID__ENUM


Those exact symbols aren't defined anywhere - but underscored versions 
are defined in 'gtkmarshalers.h':-


    #define _gtk_marshal_VOID__BOOLEAN g_cclosure_marshal_VOID__BOOLEAN
    #define _gtk_marshal_VOID__BOXED g_cclosure_marshal_VOID__BOXED
    #define _gtk_marshal_VOID__ENUM g_cclosure_marshal_VOID__ENUM

Does that help to explain anything ?

John

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


RE: Is a Module Definition File needed when building with MSVC (gtk-2-24)?

2018-01-21 Thread 范,君維 via gtk-devel-list
Hi John,

Can you try generating gtk/gtkmarshalers.[c|h] using glib-genmarshal?  Can you 
also test using the Python version of glib-genmarshal and see whether the 
linking z   works properly?  If not, use the former .exe version of the tool, 
and perhaps file a bug against the Python version of glib-genmarshal?

(In the gtk\ subdir)
$(glib-genmarshal command) --prefix=_gtk_marshal ./gtkmarshalers.list 
--header > gtkmarshalers.h

echo #include "gtkmarshalers.h" > gtkmarshalers.c
echo #include "gtkalias.h" >> gtkmarshalers.c
$(glib-genmarshal command) --prefix=_gtk_marshal ./gtkmarshalers.list --body >> 
gtkmarshalers.c 

With blessings, thank you!

從 Windows 10 手機傳送

寄件者: John Emmas
傳送時間: 2018年1月22日 00:06
收件者: gtk-devel-list
主旨: Is a Module Definition File needed when building with MSVC (gtk-2-24)?

Perhaps wrongly I've been using a module definition file when building gtk-2-24 
with MSVC (I'm saying "perhaps" because it used to be needed at one time but 
maybe that eventually got superseded and I didn't notice...)

On 8th Jan, the following symbols got added to 'gtk/gtk.symbols' by commit 
#331877fe36 (Fix abicheck):-

  gtk_marshal_VOID__BOOLEAN
  gtk_marshal_VOID__BOXED
  gtk_marshal_VOID__ENUM
  gtk_marshal_VOID__INT
  gtk_marshal_VOID__OBJECT
  gtk_marshal_VOID__POINTER
  gtk_marshal_VOID__STRING
  gtk_marshal_VOID__UINT
  gtk_marshal_VOID__VOID

Like I said, I'd always assumed that 'gtk.symbols' was needed for generating a 
module definition file ('gtk.def') as that's generally what a symbols file gets 
used for (with MSVC).

If the module definition file isn't needed any more, just ignore this (gtk-2-24 
seems to link okay without it).  But if it is still used, MSVC now produces the 
following linker errors:-

    gtk.def : error LNK2001: unresolved external symbol 
gtk_marshal_VOID__BOOLEAN
    gtk.def : error LNK2001: unresolved external symbol gtk_marshal_VOID__BOXED
    gtk.def : error LNK2001: unresolved external symbol gtk_marshal_VOID__ENUM
    gtk.def : error LNK2001: unresolved external symbol gtk_marshal_VOID__INT
    gtk.def : error LNK2001: unresolved external symbol gtk_marshal_VOID__OBJECT
    gtk.def : error LNK2001: unresolved external symbol 
gtk_marshal_VOID__POINTER
    gtk.def : error LNK2001: unresolved external symbol gtk_marshal_VOID__STRING
    gtk.def : error LNK2001: unresolved external symbol gtk_marshal_VOID__UINT
    gtk.def : error LNK2001: unresolved external symbol gtk_marshal_VOID__VOID

Taking 'gtk_marshal_VOID__ENUM' as an example, 'gtk/gtkmarshalers.c' contains 
some variants - e.g.

    gtk_marshal_VOID__ENUM_BOOLEAN
    gtk_marshal_VOID__ENUM_ENUM
    gtk_marshal_VOID__ENUM_FLOAT
    gtk_marshal_VOID__ENUM_FLOAT_BOOLEAN

along with a few others- but I can't find one that's just called 
'gtk_marshal_VOID__ENUM' (hence the linker error if it it gets included in 
gtk.symbols).

Hope this all makes sense...

John

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