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

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' . . .

Replies are listed 'Best First'.
Re^8: Gtk3 Install Problems
by syphilis (Archbishop) on Feb 28, 2014 at 06:50 UTC
    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

        so I will download Strawberry 32 bit this weekend and start from the beginning

        The G::O::I build should then work for you, using the binaries you already have.
        Just make sure you use those same binaries to build the Glib module (which is a pre-requisite for G::O::I). I was using a Glib module that had been built against different binaries - when I rebuilt Glib-1.301 against the same binaries most of my problems with G::O::I disappeared.

        The only problem I now have (afaik) is that the typelib files are not being found by default, and I have to use the search_path option (mentioned near the beginning of the G::O::I docs) in order that they are found.
        Of course, the test suites for both G::O::I and Gtk assume that the typelib files will be found ... and hence, the tests still fail for me.

        When I find out how to properly handle these typelib files, I expect both G::O::I and Gtk3 to build, test, and install just fine.

        BTW, when I build Glib-1.301, some of the tests fail. I just ignore those failures and install the module anyway.

        Cheers,
        Rob

        Update: Found it:
        set GI_TYPELIB_PATH=C:\usr\local\lib\girepository-1.0
        Dunno why they have to keep that such a closely guarded secret.
        Anyway, with that in place, G::O::I-0.020 builds, tests and installs fine.
        *I* still have some issues because I pretty much need to rebuild Cairo against the same binaries that I used for G::O::I .... for the same reason that I needed to re-build Glib.
        But you should be right.

      perl -V:aarchname returns

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

      Don
Re^8: Gtk3 Install Problems
by bulk88 (Priest) on Feb 28, 2014 at 02:04 UTC
    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.