On 2021-07-19 at 13:41:53 +0100, Mike Martin wrote:
> Further info (gcc wasnt installed)
> 
> "C:\msys64\mingw64\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty --
> Glib.bs blib\arch\auto\Glib\Glib.bs 644
> loaded
> loaded
> 
> [ CC Glib.c ]
> In file included from
> C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h:283,
>                  from
> C:/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h:10,
>                  from
> C:/msys64/mingw64/x86_64-w64-mingw32/include/crtdefs.h:10,
>                  from
> C:/msys64/mingw64/x86_64-w64-mingw32/include/sys/types.h:13,
>                  from C:\msys64\mingw64\lib\perl5\core_perl\CORE/perl.h:822,
>                  from gperl.h:26,
>                  from Glib.xs:22:
> C:/msys64/mingw64/x86_64-w64-mingw32/include/vadefs.h:14:9: error: expected
> '=', ',', ';', 'asm' or '__attribute__' before '#pragma'
>    14 | #pragma pack(push,_CRT_PACKING)
>       |         ^~~~
> mingw32-make: *** [Makefile:452: Glib.o] Error 1

Hi,

I'm not sure about what is causing this issue. It could be path related
or package related.

When I set up Perl for building, I make sure that all the MSYS2 packages
have been upgraded as listed in the installation steps at
<https://www.msys2.org/> and then installing the packages needed for
building:

    $ pacman -S --needed --noconfirm \
      base-devel \
      mingw-w64-x86_64-toolchain \
      mingw-w64-x86_64-perl \

Perhaps reading through the "building locally" section of
<http://project-renard.github.io/doc/development/meeting-log/posts/2016/05/03/windows-build-with-msys2/>
might help. It's a little old, but I believe the instructions are still
valid.

--

Another way is to setup a clean install of Windows + MSYS2 + Gtk3.  The
repository I mentioned also has a Vagrantfile
<https://github.com/orbital-transfer-example/perl-gtk3-starter-basic/blob/main/Vagrantfile>.
You can use that to get a fresh Windows 10 box set up by running

    $ vagrant up win10

--

Another solution you might want to try in the interim is to download
either the .msi or a build asset from my repository and grab the perl5
lib directory out of there and use it as a local::lib
<https://metacpan.org/pod/local::lib>.

So either the .msi from here:

 1. 
<https://github.com/orbital-transfer-example/perl-gtk3-starter-basic/releases/tag/0.002>

or the win32-dist file from the latest build of the msys2-mingw workflow
<https://github.com/orbital-transfer-example/perl-gtk3-starter-basic/actions/workflows/msys2-mingw.yml>
that I ran last night (the build assets expire eventually and are only
downloadable while logged in to GitHub).

 2. 
<https://github.com/orbital-transfer-example/perl-gtk3-starter-basic/actions/runs/1047380510>

The win32-dist file is much smaller as it contains none of the MSYS2
packages (can not be used independently of an MSYS2 installation).

Hope that helps!

Regards,
- Zaki Mughal


> 
> On Mon, 19 Jul 2021 at 12:36, Mike Martin <redt...@gmail.com> wrote:
> 
> > Thanks for this.
> > I am sill getting an issue, it seems to be an oddity with paths
> >
> > from cpanm build.log
> >
> > [ CC Glib.c ]
> > process_begin: CreateProcess(NULL, gcc -c -I. -mms-bitfields
> > -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/glib-2.0
> > -IC:/msys64/mingw64/lib/glib-2.0/include -pthread -DWIN32 -DWIN64
> > -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
> > -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fno-strict-aliasing -mms-bitfields
> > -s -O2 -DVERSION=\"1.3293\" -DXS_VERSION=\"1.3293\" -o Glib.o
> > -IC:\msys64\mingw64\lib\perl5\core_perl\CORE Glib.c, ...) failed.
> > make (e=2): The system cannot find the file specified.
> >
> > mingw32-make: *** [Makefile:452: Glib.o] Error 2
> > -> FAIL Installing Glib failed. See
> > C:\msys64\home\mike\.cpanm\work\1626621339.5476\build.log for details.
> > Retry with --force to force install it.
> >
> > On Sat, 17 Jul 2021 at 19:02, Zakariyya Mughal <zaki.mug...@gmail.com>
> > wrote:
> >
> >> On 2021-07-17 at 15:19:25 +0100, Mike Martin via gtk-perl-list wrote:
> >> > Hi I am struggling with this, been trying to install on mingw64 for a
> >> week.
> >> >
> >> > Anyone had any joy recently?
> >> > various issues tried compiling one by one and glib fails with symbols
> >> error
> >> > (using cpanm)
> >>
> >> Hi,
> >>
> >> I've been working on a repository that takes all the work needed to
> >> install Gtk3 on different platforms and put it into one repository (I'm
> >> also working on making .dmg and .msi installers --- these work but have
> >> a couple cases I need to address):
> >>
> >> <https://github.com/orbital-transfer-example/perl-gtk3-starter-basic>
> >>
> >> The file you'll want to use for MSYS2/MINGW is
> >> <
> >> https://github.com/orbital-transfer-example/perl-gtk3-starter-basic/blob/0.002/maint/EUMMnosearch.pm
> >> >.
> >>
> >> and what you want to do is add it to be loaded automatically via the
> >> PERL5OPT environment variable
> >>
> >>     export PERL5OPT="-Ipath/to/perl-gtk3-starter-basic/maint
> >> -MEUMMnosearch"
> >>     cpanm Gtk3
> >>
> >> What this module file does is detect when it being run under an
> >> ExtUtils::MakeMaker installation and then run some hacks around the
> >> arguments and build so that EU::MM knows where to find libraries and
> >> generates a file that allows one XS module to link with another (the
> >> comments in EUMMnosearch.pm explain what I'm doing).
> >>
> >> Ideally this would be fixed upstream in ExtUtils::MakeMaker, but I have
> >> not had time to see what I can do.
> >>
> >> Hope that helps.
> >>
> >> Cheers,
> >> - Zaki Mughal
> >>
> >> P.S. The helper.pl script in there also handles the same thing in a
> >> self-contained way. See the commands listed under the "run:" keys in
> >> <
> >> https://github.com/orbital-transfer-example/perl-gtk3-starter-basic/blob/0.002/.github/workflows/msys2-mingw.yml
> >> >
> >> for how to use that.
> >>
> >> >
> >> > On Thu, 8 Jun 2017 at 12:31, <max.augsb...@gmx.de> wrote:
> >> >
> >> > > Hello everybody,
> >> > >
> >> > > I have created a little tutorial about perl-Gtk3 and Windows/MSys2.
> >> > > Especially I show there, how to create an installer for your perl-Gtk3
> >> > > application. Perhaps this little How-To is helpful for some people.
> >> > >
> >> > > You can find the files on
> >> https://github.com/MaxPerl/perl-Gtk3-Tutorial
> >> > >
> >> > > see especially:
> >> > >
> >> > >
> >> https://github.com/MaxPerl/perl-Gtk3-Tutorial/blob/master/perl-Gtk3-and-windows.pdf
> >> > >
> >> > >
> >> https://github.com/MaxPerl/perl-Gtk3-Tutorial/blob/master/perl-Gtk3-and-windows-de.pdf
> >> > > (german version)
> >> > >
> >> > > Improvement suggesstions are highly welcome!
> >> > >
> >> > > Best wishes,
> >> > > Max
> >> > > _______________________________________________
> >> > > gtk-perl-list mailing list
> >> > > gtk-perl-list@gnome.org
> >> > > https://mail.gnome.org/mailman/listinfo/gtk-perl-list
> >> > >
> >>
> >> > _______________________________________________
> >> > gtk-perl-list mailing list
> >> > gtk-perl-list@gnome.org
> >> > https://mail.gnome.org/mailman/listinfo/gtk-perl-list
> >>
> >>

> _______________________________________________
> gtk-perl-list mailing list
> gtk-perl-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-perl-list

_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list

Reply via email to