in reply to Re^4: gmake error on Glib compile
in thread gmake error on Glib compile

On 64-bit Strawberry Perl 5.38.0 (portable edition) The following pacman commands install needed packages and must be run (if they haven't already). $ pacman -Sy mingw64/mingw-w64-x86_64-gtk2 $ pacman -Sy mingw64/mingw-w64-x86_64-pkg-config $ pacman -Sy mingw64/mingw-w64-x86_64-gtk3 $ pacman -Sy mingw64/mingw-w64-x86_64-gobject-introspection set PATH=%PATH%;D:\msys64\mingw64\bin set PKG_CONFIG_PATH=D:\msys64\mingw64\lib\pkgconfig set LIBRARY_PATH=D:\msys64\mingw64\lib ########### Glib-1.3293 ########### Accessing same renamed libraries as I used with my own build of perl. set CPATH=D:\msys64\mingw64\include;D:\msys64\mingw64\include\glib-2.0 +;D:\msys64\mingw64\lib\glib-2.0\include Run 'perl Makefile.PL', 'gmake test', 'gmake install'. All tests passed for me. ('auto/Glib/Glib.a' was created and installed.) ########### Cairo-1.109 ########### Accessing same renamed libraries as I used with my own build of perl. set CPATH=%CPATH%;D:\msys64\mingw64\include\cairo;D:\msys64\mingw64\in +clude\freetype2; Run 'perl Makefile.PL', 'gmake test', 'gmake install'. ('auto\Cairo\Cairo.a' was created and installed.) One test failed: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ t/CairoFont.t ..... 1/29 unknown cairo_font_type_t value 5 encountered + at t/CairoFont.t line 79. # Failed test at t/CairoFont.t line 79. # Looks like you failed 1 test of 29. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ################### Cairo-GObject-1.005 ################### Accessing same renamed libraries as I used with my own build of perl. No need to amend CPATH environment variable. Run 'perl Makefile.PL' The generated Makefile correctly lists (in both EXTRALIBS and LDLOADLI +BS) the 'auto/Glib/Glib.a' file. But it misses the 'auto/Cairo/Cairo.a' file. Therefore, at the beginnig of both the EXTRALIBS and LDLOADLIBS entrie +s in the generated Makefile, we need to insert the full path to that Cairo.a file. For me, I insert: "C:\sp\_64\sp-5.38.0\perl\site\lib\auto\Cairo\Cairo.a" Run 'gmake test', 'gmake install'. All tests passed. ########### Pango-1.227 ########### Accessing same renamed libraries as I used with my own build of perl. set CPATH=%CPATH%;D:\msys64\mingw64\include\pango-1.0;D:\msys64\mingw6 +4\include\harfbuzz Run 'perl Makefile.PL' Again, 'auto/Cairo/Cairo.a' is omitted from EXTRALIBS and LDLOADLIBS. Again, in both places, I insert: "C:\sp\_64\sp-5.38.0\perl\site\lib\auto\Cairo\Cairo.a" Run 'gmake test', 'gmake install'. All tests passed. ############ Gtk2-1.24993 ############ Accessing same renamed libraries as I used with my own build of perl. set CPATH=%CPATH%;D:\msys64\mingw64\include\gtk-2.0;D:\msys64\mingw64\ +lib\gtk-2.0\include;D:\msys64\mingw64\include\gdk-pixbuf-2.0;D:\msys6 +4\mingw64\include\atk-1.0 Run 'perl Makefile.PL' EXTRALIBS and LDLOADLIBS both include 'auto/Glib/Glib.a' and 'auto/Pan +go/Pango.a' but again, 'auto/Cairo/Cairo.a' is omitted from EXTRALIBS and LDLOADLI +BS. Again, in both places, I insert: "C:\sp\_64\sp-5.38.0\perl\site\lib\auto\Cairo\Cairo.a" Run 'gmake test', 'gmake install'. In addition to t/GtkStyle.t (which crashes the entire test suite), we get the following report: Test Summary Report ------------------- t/01.GtkWindow.t (Wstat: 65280 (exited 255) Tests: 0 F +ailed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 120 tests but ran 0. t/GdkDisplay.t (Wstat: 256 (exited 1) Tests: 27 Fail +ed: 1) Failed test: 23 Non-zero exit status: 1 t/GdkImage.t (Wstat: 256 (exited 1) Tests: 23 Fail +ed: 1) Failed test: 1 Non-zero exit status: 1 t/GdkInput.t (Wstat: 65280 (exited 255) Tests: 0 F +ailed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 20 tests but ran 0. t/GdkKeys.t (Wstat: 65280 (exited 255) Tests: 0 F +ailed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 46 tests but ran 0. t/GdkPixbuf.t (Wstat: 256 (exited 1) Tests: 112 Fai +led: 1) Failed test: 44 Non-zero exit status: 1 t/GtkAccelGroup.t (Wstat: 65280 (exited 255) Tests: 0 F +ailed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 19 tests but ran 0. t/GtkAccelMap.t (Wstat: 65280 (exited 255) Tests: 0 F +ailed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 24 tests but ran 0. t/GtkStock.t (Wstat: 65280 (exited 255) Tests: 0 F +ailed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 9 tests but ran 0. t/GtkWidget.t (Wstat: 65280 (exited 255) Tests: 0 F +ailed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 158 tests but ran 0. t/PangoFontset.t (Wstat: 256 (exited 1) Tests: 7 Faile +d: 1) Failed test: 1 Non-zero exit status: 1 Files=227, Tests=4544, 42 wallclock secs ( 0.02 usr + 0.05 sys = 0.0 +6 CPU) Result: FAIL Failed 11/227 test programs. 4/4544 subtests failed. gmake: *** [makefile:3727: test_dynamic] Error 255 This is (apparently) worse than the results I got on my own build of p +erl-5.38.0, which reported only 5/227 failing test programs. I don't know what accounts for the difference, but it would be interes +ting to know. ############################### Glib-Object-Introspection-0.050 ############################### Accessing same renamed libraries as I used with my own build of perl. set CPATH=%CPATH%;D:\msys64\mingw64\include\gobject-introspection-1.0 Run 'perl Makefile.PL', 'make install'. (Can't make any sense of 'make + test' at all.) ########## Gtk3-0.038 ########## Run 'perl Makefile.PL', 'make test'. All 22 tests fail - needs investigating, no point in installing. On my own build of perl-5.38.0, only 3 of the 22 tests failed. Could there be some interference from libraries in Strawberry's c/lib +folder ?
Cheers,
Rob

Replies are listed 'Best First'.
Re^6: gmake error on Glib compile
by syphilis (Archbishop) on Aug 23, 2023 at 14:15 UTC
    The poorer result for the Gtk2-1.24993 tests that I get with Strawberry Perl is entirely due to the fact that perl/site/lib/Gtk2/Gdk/Keysyms.pm is generated as an empty file on Strawberry.
    When I replace that empty file with the correctly generated Keysyms.pm that my own build of perl-5.38.0 created, then I get identical results of "5/227 failing test programs", not "11/227 failing test programs.
    I tried to put the contents of that Keysyms.pm on my scratchpad, but it's too big for perlmonks to accommodate.
    If anyone wants a copy of it just /msg me with an email address I can post it to.

    I don't know why Strawberry doesn't provide the same Keysyms.pm. (I've got some notes on my Windows 7 machine from 5 years ago that inform me that the same thing happened back then, too.)

    I've also got some old notes stating that installing Font::FreeType improves the capabilities of Cairo.
    I was going to try that out, but Devel::CheckLib is a prereq, and I'm not up to dealing with that annoying hoop tonight.

    <UPDATE>
    I've now (approx 24 hours later) built and installed Font-FreeType-0.16. It builds and tests fine, but doesn't change anything AFAICS. To build Font-FreeType, I replaced the Makefile.PL that ships with the distro with:
    use strict; use warnings; use ExtUtils::MakeMaker; WriteMakefile( NAME => 'Font::FreeType', AUTHOR => 'Geoff Richards <qef@laxan.com>', VERSION_FROM => 'lib/Font/FreeType.pm', LIBS => '-LD:/msys64/mingw64/lib -lfreetype', INC => '-ID:/msys64/mingw64/include/freetype2', );
    </UPDATE>

    I've yet to work out why Gtk3 is so broken on the Strawberry build.
    The (fairly fundamental) problem is that the following runs fine on my own build of perl-5.38.0:
    D:\>perl -MGtk3 -wle "my ($success, $rest) = Glib::Object::Introspecti +on->invoke ('Gtk', undef, 'init_check', [$0, @ARGV]); print 'ok';" ok
    But on Strawberry's 5.38.0, running the same command, I get:
    D:\>perl -MGtk3 -wle "my ($success, $rest) = Glib::Object::Introspecti +on->invoke ('Gtk', undef, 'init_check', [$0, @ARGV]); print 'ok'" Could not prepare a call interface at -e line 1.
    Looks like the problem lies with the Glib-Object-Introspection module.

    Cheers,
    Rob

      FWIW, Font::FreeType builds and passes all tests for me when using SP 5.38.0.1 PDL edition. (Edit - and also the non_PDL edition).

      Is this perhaps a clash between the SP DLLs and the MSYS2 DLLs?

        FWIW, Font::FreeType builds and passes all tests for me when using SP 5.38.0.1 PDL edition

        Yes - my only issue with Font::FreeType is a personal thing I have against Devel::CheckLib.
        Devel::CheckLib is a module that's not present on my own perl-5.38.0 build, and I'm averse to installing it.
        I updated my previous post to show the Makefile.PL I used to build Font::FreeType.

        The main issue is that Glib-Object-Inrospection-0.050 being built on SP-5.38.0 is unusable - whereas the G-O-I-0.050 that I build on my own 5.38.0 works fine.
        Having installed it on SP, anyway, the problem is demonstrated by the one-liner I provided at the end of my previous post.

        With G-O-I, the test scripts are not generated, and the test suite should just skip all of the test scripts.
        But errors that include "Can't load 'C:/sp/_64/sp-5.38.0/perl/site/lib/auto/Glib/Glib.xs.dll' for module Glib: load_file:The specified module could not be found at C:/sp/_64/sp-5.38.0/perl/lib/DynaLoader.pm line 206" are being generated for each test script.
        The same thing usually (but not always) happens when I build G-O-I on my own perl ... it's a bit perplexing, but I'll continue to poke at it until that one-liner works on SP.
        With my own build of perl, that one-liner always works - which means that the Gtk3 test scripts don't abort, and instead (most of them) pass.

        Cheers,
        Rob
Re^6: gmake error on Glib compile
by Anonymous Monk on Aug 23, 2023 at 10:16 UTC
    Get error message from event log or what not (depends.exe)