MaxPerl/perl-Gtk3-windows-installer

install fails at last step

jstaursky opened this issue · 4 comments

Using fresh install of msys2, was using the mingw64 prompt and got the following

$ perl ./install-perl-Gtk3-mingw64.pl
Welcome to the Perl/Gtk3 Installer for Mingw64/MSys2 on Windows
--------------------------------------------------------------
This program is free software; you can redistribute it and/or modify it under th e same terms as Perl itself. This software comes with NO WARRANTY of any kind. T his script is heavily inspired by the work of Zakariyya Mughal and especially hi s extraordinary desciption of the installation of curie on Windows.

Please note that you need a complete installed MSys2 environment with perl insta lled. Therefore you should do the following steps before running this script:

  1. Download and install the installer from https://msys2.github.io/
  2. Start the MinGW64 Terminal
  3. Run update-core
  4. Close (X or Alt-4) and restart the MinGW64 Terminal
  5. Run pacman -Suu (and if needed/the program asked for close the terminal)

NOTE that you can get the following warning:
the shell starting scripts have been unified. Please update your shortcuts to th e following targets, otherwise they will STOP WORKING:

  • MSYS2_ROOT\msys2_shell.cmd -mingw32
  • MSYS2_ROOT\msys2_shell.cmd -mingw64
  • MSYS2_ROOT\msys2_shell.cmd -msys
  1. Therefore if needed update your shortcuts
  2. Repeat step 5 until nothing is to update anymore
  3. Install perl with pacman -S --needed --noconfirm mingw-w64-x86_64-perl

If you followed these steps, press to start the installation!
Otherwise exit the program with Ctrl-C!

Please give the Path to your msys2 environment [default: C:\msys64]

*----------------------------------------

  • INSTALLING THE BUILD TOOLCHAIN
    *----------------------------------------
    ......................................................... [OK]

*----------------------------------------

  • INSTALLING NATIVE DEPENDENCIES
    *----------------------------------------
    ...............................................[ OK]

*----------------------------------------

  • INSTALLING PERL DEPENDENCIES
    *----------------------------------------
    Running pl2bat on pl2bat [OK]
    Installing App::cpanminus.(23) Failed writing body
    [OK]
    Installing ExtUtils::Depends and ExtUtils::PkgConfig... [OK]

*--------------------------

  • INSTALLING GLIB
    *--------------------------
    Download Glib [OK]
    Extract Glib [OK]
    Hacking Makefile.PL
    LIBS: :nosearch -LC:/msys64/mingw64/lib -lgobject-2.0 -lglib-2.0 -lintl -lgthrea d-2.0 -pthread
    Hack completed [OK]
    Building Glib........ [OK]
    Installing Glib....... [OK]

*--------------------------

  • INSTALLING CAIRO
    *--------------------------
    Download Cairo [OK]
    Extract Cairo [OK]
    Hacking Makefile.PL
    LIBS: :nosearch -LC:/msys64/mingw64/lib -lcairo -lfreetype
    Hack completed [OK]
    Building Cairo..... [OK]
    Installing Cairo.... [OK]

*----------------------------------------

  • INSTALLING GLIB::OBJECT::INTROSPECTION
    *----------------------------------------
    Download Glib::Object::Introspection [OK]
    Extract Glib::Object::Introspection [OK]
    Hacking Makefile.PL
    Use of uninitialized value $libs in scalar chomp at ./install-perl-Gtk3-mingw64. pl line 142.
    Use of uninitialized value $libs in substitution (s///) at ./install-perl-Gtk3-m ingw64.pl line 143.
    Use of uninitialized value $libs in substitution (s///) at ./install-perl-Gtk3-m ingw64.pl line 144.
    Use of uninitialized value $libs in split at ./install-perl-Gtk3-mingw64.pl line 145.
    Hack completed [OK]
    Building Glib::Object::Introspection. [FAIL]
    255: ERROR: Could not build Glib::Object::Introspection:

Hello,
it seems that the installer doesn't find the libs to which Glib::Object::Introspection has to link to.

Could you post the output of perl Makefile.PL verbose in the Glib::Object::Introspection perl Module
(that means for example cpanm --look Glib::Object::Introspection and then there perl Makefile.PL verbose)

I will try the installer on weekend, I hope..

Best wishes,
Max

Today I started from a clean MSYS2 install, then I updated MSYS2 and restarted the shell. After running this script, I was able to run https://github.com/project-renard/curie with no issues.

Could you try running the following commands:

$ echo $MSYSTEM; pkg-config --libs gobject-introspection-1.0 gmodule-2.0 libffi

The output I get is:

MINGW64
-LC:/msys64/mingw64/lib -LC:/msys64/mingw64/lib/../lib -lgirepository-1.0 -lgobject-2.0 -lgmodule-2.0 -pthread -lglib-2.0 -lintl -lffi

I'm going to attempt to delete and install again overnight using this script just to be sure.

This is a response to your post in https://github.com/project-renard/curie/issues/188

Hi MaxPerl,
Yes I had tried hard coding in E:/Programming/msys64 but this also had not worked neither had /e/Programming/msys64 I can't remember the full scope of the errors but they tended to be along the lines of what I posted earlier.
Also this is just a suggestion but maybe when the user inputs the custom path you could make a system call to use cygpath -ua 'users-input' rather than regex swapping out fwd and back slashes. This might reduce potiential miss-swaps so to speak. It would also automatically detect the correct drive letter for you (if the install path is outside of $MSYS_ROOT directory).
Anyway I redid the install using E:\msys64 as my install path and it seemed to work (albeit I had to swap C: with E: in the original script as you noted)..

Dear jstaursky,

Sorry for my late response. I had no Windows the last months, so that I couldn't fix the issue.

Thank you very very much for your great cygpath tip!

I saw during the code cleaning, that the specification of the msys Path is not necessary for hacking the Makefiles.PL. Therefore I think, that the script now should work on every msys path and install path. It would be great, if you could test the script on a different setup.

I close the issue.

Best wishes,
Max