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

Check out https://github.com/tomnotcat/glib-win32. If that helps let me know. I would still like to get Gtk3 installed.

Thanks, Don

Replies are listed 'Best First'.
Re^5: Gtk3 Install Problems
by syphilis (Archbishop) on Feb 24, 2014 at 07:43 UTC
    Looks promising. (I'm using the mingw.org port of gcc-4.7.0 btw.) I downloaded the package and unpacked it to:

    C:\usr\local
    Then I cut'n'pasted everything from C:/usr/local/glib-win32-master folder to C:/usr/local - ie moved those directories up one level.
    The pc files (that the Glib-Object-Introspection-0.020 build process will reference have {prefix} set to /usr/local/ ... and I'm thinking it's best to honor that spec. Added /usr/local/bin and my GTK-3 bin to the beginning of the PATH. For me:
    set PATH=C:\usr\local\bin;C:\GTK+3.6.1\bin;%PATH%

    Set the PKG_CONFIG_PATH envvar to include both C:\usr\local\lib\pkgconfig and the GTK-3 pkgconfig folder.
    For me:
    set PKG_CONFIG_PATH=C:\usr\local\lib\pkgconfig;C:\GTK+3.6.1\lib\pkgconfig

    Set the CPATH envvar to include the introspection headers:
    set CPATH=C:\usr\local\include\gobject-introspection-1.34.2

    Then created a copy of libffi.dll.a named libffi.a.
    ie copied C:\GTK=3.6.1\lib\libffi.dll.a to C:\GTK=3.6.1\lib\libffi.a

    Then created a copy of girepository.lib named libgirepository-1.0.a:
    ie copied C:\usr\local\lib\girepository.lib to C:\usr\local\lib\libgirepository-1.0.a

    Then I ran the 'perl Makefile.PL', 'dmake' mantra.

    That built a loadable version of Glib-Object-Introspection-0.020 ... but the test libraries aren't being built (during the Makefile.PL step), so all tests are skipped.
    I still need to work out what's going wrong there. I'll update this post when (if) I get that sorted.

    Then we get to see what horrors await us when we try to build the Gtk3 module. (Hopefully none !!)

    Don, if you're impatient, just build and install Glib-Object-Introspection-0.020 as per the outline given above, and then see what happens when you try to build Gtk3.
    Don't worry (for the moment) about the tests being skipped.

    Cheers,
    Rob

    Update: Turns out that we don't have a /usr/local/bin/g-ir-scanner.exe ... instead we have /usr/local/bin/g-ir-scanner.py.
    And, to build the test libraries on Win32, we're hit with this in the Makefile.PL:
    if ($^O eq 'MSWin32') { my @path = File::Spec->path; my $found = 0; foreach my $base (map { File::Spec->catfile ($_, 'g-ir-scanner') + } @path) { if (-f $base) { $gir_cmd = qq(python $base); $found = 1; last; } } return 0 unless $found;
    Well, of course, the file is called 'g-ir-scanner.py' not 'g-ir-scanner' ... therefore $found doesn't get set and 0 is returned.
    Changing the 'g-ir-scanner' to 'g-ir-scanner.py' means that the file *does* get found and the python command then ultimately gets executed. But, unfortunately, that just errors out with:
    Traceback (most recent call last): File "C:\usr\local\bin\g-ir-scanner.py", line 43, in <module> from giscanner.scannermain import scanner_main ImportError: No module named giscanner.scannermain
    Now, I don't know what's needed there. (All I know about python is that there's a lot of half-witted wankers who reckon it's the ant's pants.)

    So, I'm currently left to wonder whether the G::O::I I've just built is right to go, or whether there are problems with it that won't be properly revealed until the tests are run.
    (BTW, if you want to see the diagnostics as the test libraries are being built, there's a variable in the Makefile.PL named $pipe that needs to be changed from 1>NUL 2>NUL to the empty string.)

    I installed G::I::O-0.020 and then tried building GTk3-0.016 (which is apparently a pure-perl module) but all of the test scripts I tried errored out (and hanged) with:
    t/00-init.t .................... (perl.exe:4968): Glib-GObject-CRITICAL **: ..\..\..\gobject\gtype.c:27 +22: You forgot to call g_type_init() (perl.exe:4968): Glib-CRITICAL **: file ..\..\..\glib\gthread.c: line +713: assertion `result != 0' failed (perl.exe:4968): Glib-GObject-CRITICAL **: file ..\..\..\gobject\gobje +ct.c: line 1538: assertion `G_TYPE_IS_OBJECT (object_type)' failed
    Perhaps this is because G::O::I-0.020 is no good, or perhaps it's something that might be fixed quite simply. I'd recommend that a bug report, containing the above output, be filed against Gtk3-0.016 ... and take it from there. The bug report should also mention that all of the G::O::I tests were skipped because the test libraries were not built, but that G::O::I loads ok.
      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.

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