0
votes

I just installed msys2 and mingw64, with their development packages. I really need perl-Gtk3. Perl is msys2 and compiled with gcc-4.9.x, Gtk and friends are mingw and compiled with gcc-5.

Perl complains "Glib.c: loadable library and perl binaries are mismatched (got handshake key 0xde00080, needed 0xdd80080)" when building Glib. Should this work?

Thanks.

PS ... mingw-w64-x86_64-perl is simply unable to compile. And yes, I'm careful to use a mingw shell vs an msys shell.

1
Why and how are you building glib?David Grayson
I'm trying to link an msys2 perl against it. Glib, and Gtk3 and friends are mingw64 ... msys2 perl is msys2.Michael Ferrara
MSYS2 has a glib2 package; is that not what you need? github.com/Alexpux/MSYS2-packages/blob/master/glib2/PKGBUILD Again, since you are asking for help building glib, you should really explain exactly how you are attempting to build it instead of making people guess.David Grayson
Yes, glib2 is there, but what about the rest of the gtk3 stack? BTW ... msys2 pkg-config doesn't seem to know about it. The real question is, is it ok for msys2 and mingw to use different major version number gcc? The perl error when trying to link to Glib seems to indicate that this is a problem.Michael Ferrara
Yeah, it should be fine for the msys2 environment to use GCC 4 while the mingw-w64 environment uses GCC 5. Any binaries you link together should come from one and only one of those toolchains; don't try to link an msys2 thing with a mingw-w64 thing.David Grayson

1 Answers

0
votes

Are you still having this problem? I have been able to build a Perl dev environment in MinGW64, current as of this time.

I have been able to build Perl Gtk2 / Gtk3 applications in that environment and the GUIs work. (Both Gtk2 and Gtk3 based). These applications are used in a production environment with several thousand desktop users. The application runs on OSX, Windows, and Linux, and can be packed into a binary for release as an "executable" for those operating systems. The details here are for the Windows version.

I do this by either installing the requisite system packages first with pacman, then as necessary rebuilding whatever system library packages that I may have modified, from source, using makepkg-mingw.

Then I build the requisite Perl modules using the CPAN shell, and the "look" command.

I use pkg-config to detect what library and header files are needed.

I then build (at minimum), the Perl Glib, Pango, Cairo, Gtk2, and Gtk3 modules using the perl Makefile.PL command.

The LIBS and INC options need to be added to that command to create a Makefile that includes the correct header files, and links to the correct libraries. The EXTRALIBS and LDLOADLIBS sections of the Makefile needs be correct.

Also ExtUtils::MM_Win32.pm ExtUtils::Liblist::Kid.pm needed to be edited due to the different archname reported by the MinGW64 perl.

I am only giving a general answer, because I was thinking offing a YouTube video on this. If this is a desired topic I will.