Hi Mike,

I've just been working through building Glib-1.3293 on my 64-bit perl-5.38.0 on Windows 11.
You'll want the mingw-w64 packages (which will be automatically installed into your MSYS2/mingw64 folder). Here are my notes:
For 64-bit build: Install Gtk2 in MSYS2 $ pacman -Sy mingw64/mingw-w64-x86_64-gtk2 Install pkg-config.exe $ pacman -Sy mingw64/mingw-w64-x86_64-pkg-config Add pkg-config.exe to PATH: set PATH=%PATH%;D:\msys64\mingw64\bin set PKG_CONFIG_PATH=D:\msys64\mingw64\lib\pkgconfig Install ExtUtils::PkgConfig (and ExtUtils::Depends if it's not already + installed) ########### Glib-1.3293 ########### Hide (by changing '.a' extension to '.a_static') for following libs: "D:\msys64\mingw64\lib\libgobject-2.0.a" "D:\msys64\mingw64\lib\libglib-2.0.a" "D:\msys64\mingw64\lib\libintl.a" "D:\msys64\mingw64\lib\libgthread-2.0.a" And create a copy of the corresponding import ("*.dll.a") libs with the ".dll" removed from the name. Run 'perl Makefile.PL', 'gmake test', 'gmake install'. (All tests passed for me.)
See how you go with that.
There's some paths there that will need to be modified to match your set up.
The stuff about the renaming of the various libs is a bit of a nuisance. I'm hoping to eventually find a less hackish way of dealing with it.
Basically, you want the Glib build to use the shared libraries (dlls), but EU::MM generates a Makefile that references the static libs - eg .../mingw64/lib/libintl.a instead of .../mingw64/lib/libintl.dll.a.
(If you run 'perl Makefile.PL' and have a look at the EXTRALIBS and LDLOADLIBS entries in the generated Makefile, you'll see what I mean.)
This ought to be fixed properly, but in the meantime I've just renamed libintl.a to libintl.a_static, and copied libintl.dll.a to libintl.a. (And do the same for the other libs I've specified.)
So ... libintl.a and libintl.dll.a end up being the same import library, and libintl.a_static is the (effectively hidden) static lib.

Here's the rest of my notes at this stage:
########### Cairo-1.109 ########### Hide (by changing '.a' extension to '.a_static') for following libs : "D:\msys64\mingw64\lib\libcairo.a" "D:\msys64\mingw64\lib\libfreetype.a" And create a copy of the corresponding import ("*.dll.a") libs with the ".dll" removed from the name. Run 'perl Makefile.PL', 'gmake test', 'gmake install'. One test failed for me: ~~~~~~~~~~~~~~~~~~~~~~~~~~ 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 ################### Hide (by changing '.a' extension to '.a_static') for following libs : "D:\msys64\mingw64\lib\libcairo-gobject.a" And create a copy of the corresponding import ("*.dll.a") libs with the ".dll" removed from the name. Run 'perl Makefile.PL' and then: Edit generated Makefile (EXTRALIBS and LDLOADLIBS spec) to start with: "C:\perl-5.38.0-1310-mcf\site\lib\MSWin32-x64-multi-thread\auto\Glib\G +lib.dll" "C:\perl-5.38.0-1310-mcf\site\lib\MSWin32-x64-multi-thread\a +uto\Cairo\Cairo.dll" ExtUtils::Depends is supposed to pull those in ... actually, it's prob +ably supposed to pull in the corresponding '.a' files (Glib.a and Cairo.a), but those files don +'t exist. Then run 'gmake test' and 'gmake install'. All tests passed for me. ########### Pango-1.227 ########### Hide (by changing '.a' extension to '.a_static') for following libs : "D:\msys64\mingw64\lib\libpango-1.0.a" "D:\msys64\mingw64\lib\libharfbuzz.a" "D:\msys64\mingw64\lib\libpangocairo-1.0.a" And create a copy of the corresponding import ("*.dll.a") libs with the ".dll" removed from the name. Run 'perl Makefile.PL' and then: Edit generated Makefile (EXTRALIBS and LDLOADLIBS spec) to start with: "C:\perl-5.38.0-1310-mcf\site\lib\MSWin32-x64-multi-thread\auto\Glib\G +lib.dll" "C:\perl-5.38.0-1310-mcf\site\lib\MSWin32-x64-multi-thread\a +uto\Cairo\Cairo.dll" Then run 'gmake test' and 'gmake install'. All tests passed for me. ############ Gtk2-1.24993 ############ Hide (by changing '.a' extension to '.a_static') for following libs : "D:\msys64\mingw64\lib\libpangowin32-1.0.a" "D:\msys64\mingw64\lib\libatk-1.0.a" "D:\msys64\mingw64\lib\libgdk_pixbuf-2.0.a" "D:\msys64\mingw64\lib\libgio-2.0.a" And create a copy of the corresponding import ("*.dll.a") libs with the ".dll" removed from the name. Run 'perl Makefile.PL' and then: Edit generated Makefile (EXTRALIBS and LDLOADLIBS spec) to start with +(and NOTE addition of "Pango.dll'): "C:\perl-5.38.0-1310-mcf\site\lib\MSWin32-x64-multi-thread\auto\Cairo\ +Cairo.dll" "C:\perl-5.38.0-1310-mcf\site\lib\MSWin32-x64-multi-thread +\auto\Glib\Glib.dll" "C:\perl-5.38.0-1310-mcf\site\lib\MSWin32-x64-mu +lti-thread\auto\Pango\Pango.dll" Rename t/GtkStyle.t to t/GtkStyle.t_hide as it fails in a way that aborts the test suite. Then run 'gmake test' and 'gmake install'. Apart from the t/GtkStyle failure, we get: Test Summary Report ------------------- 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/GdkKeys.t (Wstat: 1280 (exited 5) Tests: 6 Fail +ed: 0) Non-zero exit status: 5 Parse errors: Bad plan. You planned 46 tests but ran 6. t/GdkPixbuf.t (Wstat: 256 (exited 1) Tests: 112 Fai +led: 1) Failed test: 44 Non-zero exit status: 1 t/PangoFontset.t (Wstat: 256 (exited 1) Tests: 7 Faile +d: 1) Failed test: 1 Non-zero exit status: 1 Files=227, Tests=4900, 32 wallclock secs ( 0.05 usr + 0.00 sys = 0.0 +5 CPU) Result: FAIL Failed 5/227 test programs. 4/4900 subtests failed. make: *** [Makefile:3727: test_dynamic] Error 255 Install Gtk3: $ pacman -Sy mingw64/mingw-w64-x86_64-gtk3 Install GObject-Introspection: $ pacman -Sy mingw64/mingw-w64-x86_64-gobject-introspection ############################### Glib-Object-Introspection-0.050 ############################### Hide (by changing '.a' extension to '.a_static') for following libs : "D:\msys64\mingw64\lib\libgmodule-2.0.a" "D:\msys64\mingw64\lib\libffi.a" And create a copy of the corresponding import ("*.dll.a") libs with the ".dll" removed from the name. Run 'perl Makefile.PL' and then: Edit generated Makefile (EXTRALIBS and LDLOADLIBS spec) to start with: "C:\perl-5.38.0-1310-mcf\site\lib\MSWin32-x64-multi-thread\auto\Glib\G +lib.dll" Then run 'gmake install'. ('gmake test' can't be run because test scri +pts aren't generated.)
That's as far as I've got, so far. (Next up is to install Gtk3.)
Sorry - those notes are clear to me, but just ask me about the bits that are unclear to you.

UPDATE: If you're using Strawberry Perl, those "Glib.dll", "Cairo.dll" and "Pango.dll" entries will need to be altered to "Glib.xs.dll", "Cairo.xs.dll" and "Pango.xs.dll"

Cheers,
Rob

In reply to Re^3: gmake error on Glib compile by syphilis
in thread gmake error on Glib compile by MikeMc69

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.