in reply to Re^5: Gtk3 Install Problems
in thread Gtk3 Install Problems

Perhaps this is because G::O::I-0.020 is no good, or perhaps it's something that might be fixed quite simply

I've just had a quick look at the G::O::I documentation and it says:
To allow Glib::Object::Introspection to create bindings for a libr +ary, it must have installed a typelib file, for example "$prefix/lib/girepository-1.0/Gtk-3.0.typelib".
I can see the various typelib files in C:/usr/local/lib/girepository-1.0/ ... but G::O::I did not make any attempt to install them anywhere.
To where should they go and how does one get them to go there ?
How does one arrange things so that those typelib files are found automatically ? The docs state that they'll be found automatically if "you use typelibs from system directories, or if your environment is set up correctly", but provide no further details AFAICS.

Cheers,
Rob

Update: ppm packages (32-bit perl only) for G::O::I-0.020 have been uploaded.
Once installed, the various typelib files will be found in the perl/site/lib/Glib/typelibs folder - in case they're needed.
It would be interesting to know whether something useful can be done with these ppm packages.

Replies are listed 'Best First'.
Re^7: Gtk3 Install Problems
by drdon (Novice) on Feb 27, 2014 at 22:57 UTC

    I followed what you had and tried some tricks of my own but failed.

    Where is the makefile you reference in "Then I ran the 'perl Makefile.PL', 'dmake' mantra." ?

    I'm not new to Perl. I did a lot of Perl programming years ago and thought I'd return to it. However, I am quite new to the make/install package aspect.

    I will keep at this. GTk3 has been installed by many Windows users I'm sure. I just don't understand why it is so difficult.

    Let me know if you find a successful recipe for the install

    Thanks,

    Don

    c:\usr\local\Glib-Object-Introspection-0.020>dmake Skip blib\lib\Glib\Object/Introspection.pm (unchanged) cp build/IFiles.pm blib\arch/Glib\Object\Introspection/Install/Files.p +m Running Mkbootstrap for Glib::Object::Introspection () C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e chmod -- 644 In +trospection.bs [ CC GObjectIntrospection.c ] dlltool --def Introspection.def --output-exp dll.exp [ LD blib\arch\auto\Glib\Object\Introspection\Introspection.dll ] GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x28b): undefined + reference to `g_base_info_unref' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x293): undefined + reference to `g_free' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x590): undefined + reference to `g_type_info_get_tag' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x642): undefined + reference to `g_base_info_get_namespace' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x650): undefined + reference to `g_base_info_get_name' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x6ac): undefined + reference to `g_registered_type_info_get_g_type' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x6c5): undefined + reference to `g_registered_type_info_get_type_name' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x6d2): undefined + reference to `g_type_from_name' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x6e9): undefined + reference to `g_base_info_get_namespace' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x6f7): undefined + reference to `g_base_info_get_name' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x72e): undefined + reference to `g_strconcat' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x739): undefined + reference to `g_type_from_name' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x746): undefined + reference to `g_free' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x76a): undefined + reference to `g_type_from_name' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x777): undefined + reference to `g_free' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x904): undefined + reference to `g_assertion_message_expr' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x92a): undefined + reference to `g_base_info_get_namespace' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x942): undefined + reference to `g_base_info_get_name' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x984): undefined + reference to `g_type_info_get_tag' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0x9c6): undefined + reference to `g_type_info_is_pointer' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0xa52): undefined + reference to `g_strconcat' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0xa78): undefined + reference to `g_free' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0xae3): undefined + reference to `g_malloc0' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0xaee): undefined + reference to `g_base_info_ref' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0xafc): undefined + reference to `g_malloc0' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0xb15): undefined + reference to `g_callable_info_prepare_closure' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0xb63): undefined + reference to `g_malloc0' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0xb7a): undefined + reference to `g_base_info_ref' GObjectIntrospection.o:GObjectIntrospection.c:(.text+0xb88): undefined + reference to `g_malloc0' . . .
      Where is the makefile you reference in "Then I ran the 'perl Makefile.PL', 'dmake' mantra." ?

      The Makefile.PL ships with the G::O::I-0.020 source and is found in the top level directory.
      Running 'perl Makefile.PL' will create a file named "Makefile" (in the same directory) for dmake to use.

      Those "undefined" references that you get, are defined for me by C:/usr/local/lib/glib-2.0.lib.
      However, my build is wanting to resolve things like "_g_free", whereas for you it's "g_free" (ie no leading underscore.)

      What does perl -V:archname report for you ?
      In order to use these Introspection binaries, it needs to match x86, not x64.
      That is, it needs to be a 32-bit build of Strawberry Perl - which will work fine on your 64-bit Windows, btw. If you haven't already done so, you could always grab a 32-bit "portable" Stawberry Perl - then you can have both perls on the same machine without them interfering with each other.

      I've also discovered that there's a bit more I need to do before I have a serviceable build of G::O::I. For the current state of play, see the bug report I opened.

      GTk3 has been installed by many Windows users I'm sure

      I don't think so. I certainly don't know of any.

      Cheers,
      Rob

      Afterthought: If you run dmake in verbose mode (ie dmake -v) then you'll get to see precisely which library files are being linked in.

        So new ground being broken here. It would be great to detail the install procedure for GTk3. I don't want to fight with the 64 bit install so I will download Strawberry 32 bit this weekend and start from the beginning. I'll mess with the 64 bit install at some later date. For now I just want to get started using Gtk3.

        Thanks

        Don

        perl -V:aarchname returns

        archname='MSWin322-x64-multi-thread';

        Don
      The command lines given to the linker and CC are not showing. You need the linker to be given a ".a" or ".o" that exports g_base_info_unref and g_free symbols. Looking at my "C:\perl512\site\lib\auto\Glib\Glib.dll", g_free is imported from a file called libglib-2.0-0.dll . Since it looks like your are building the XS GTK DLLs, you will need a .a since I assume you are dynamic linking to some GTK DLLs. Not static linking. I'm not sure your can build a static GTK for perl in a single XS DLL since XS Glib.dll and XS Gtk2.dll need to use to same GTK/Glib C code and the same C statics.