[solved] Failing to build wxWidgets using MSYS2

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
Micheus
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Apr 02, 2019 6:46 am

[solved] Failing to build wxWidgets using MSYS2

Post by Micheus »

Hi there
I'm trying to build the library by myself, but I have had no success.

I'm using a fresh install of MSY2 under Windows 7, all updated.

I download the wxWidgets' sources from git repository; I unpacked them and I followed the instructions in Building from Git Sources.
Then, I tried to follow the instructions to build wxWidgets that are in Installing wxWidgets for Windows related to CygWin/MinGW, but running the step 2 ($ ../configure --enable-debug) it was ending with a error related to X11:

Code: Select all

$ ../configure --enable-debug
configure: loading site script /etc/config.site
checking build system type... x86_64-pc-msys
checking host system type... x86_64-pc-msys
configure: WARNING: *** System type x86_64-pc-msys is unknown, assuming generic Unix and continuing nevertheless.
configure: WARNING: *** Please report the build results to [email protected].
 :
 :
checking for expat.h... no
configure: WARNING: system expat library not found, will use built-in instead
checking for gcc option to accept ISO C99... none needed
checking for X... no
configure: error: X11 not found, please use --x-includes and/or --x-libraries options (see config.log for details)
Then looking into doc folder I found the instruction in msw/msys2-msw.md -> Building wxMSW port with Win32 MSys2 backend which I followed until the step 2.iv ($ ../configure --with-msw --disable-shared --disable-precomp-headers), but this time the error is related to the system:

Code: Select all

$ ../configure --with-msw --disable-shared --disable-precomp-headers
configure: loading site script /etc/config.site
checking build system type... x86_64-pc-msys
checking host system type... x86_64-pc-msys
configure: WARNING: *** System type x86_64-pc-msys is unknown, assuming generic Unix and continuing nevertheless.
configure: WARNING: *** Please report the build results to [email protected].
checking for toolkit... msw
 :
 :
checking for ar... (cached) ar
checking for strip... strip
checking for nm... nm
checking if make is GNU make... yes
configure: error: unknown system type x86_64-pc-msys.

Does anybody has any idea about what I can do to be able to build the library using MSY2?

Thanks in advanced
Micheus
Last edited by Micheus on Sat Apr 06, 2019 4:52 pm, edited 1 time in total.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Failing to build wxWidgets using MSYS2

Post by ONEEYEMAN »

Hi,
Micheus wrote: Tue Apr 02, 2019 7:27 am Hi there
I'm trying to build the library by myself, but I have had no success.

I'm using a fresh install of MSY2 under Windows 7, all updated.

I download the wxWidgets' sources from git repository; I unpacked them and I followed the instructions in Building from Git Sources.
Then, I tried to follow the instructions to build wxWidgets that are in Installing wxWidgets for Windows related to CygWin/MinGW, but running the step 2 ($ ../configure --enable-debug) it was ending with a error related to X11:

Code: Select all

$ ../configure --enable-debug
configure: loading site script /etc/config.site
checking build system type... x86_64-pc-msys
checking host system type... x86_64-pc-msys
configure: WARNING: *** System type x86_64-pc-msys is unknown, assuming generic Unix and continuing nevertheless.
configure: WARNING: *** Please report the build results to [email protected].
 :
 :
checking for expat.h... no
configure: WARNING: system expat library not found, will use built-in instead
checking for gcc option to accept ISO C99... none needed
checking for X... no
configure: error: X11 not found, please use --x-includes and/or --x-libraries options (see config.log for details)
You didn't supply "--with-msw" option, and so it was defaulting to do a *nix build.
Micheus wrote: Tue Apr 02, 2019 7:27 am Then looking into doc folder I found the instruction in msw/msys2-msw.md -> Building wxMSW port with Win32 MSys2 backend which I followed until the step 2.iv ($ ../configure --with-msw --disable-shared --disable-precomp-headers), but this time the error is related to the system:

Code: Select all

$ ../configure --with-msw --disable-shared --disable-precomp-headers
configure: loading site script /etc/config.site
checking build system type... x86_64-pc-msys
checking host system type... x86_64-pc-msys
configure: WARNING: *** System type x86_64-pc-msys is unknown, assuming generic Unix and continuing nevertheless.
configure: WARNING: *** Please report the build results to [email protected].
checking for toolkit... msw
 :
 :
checking for ar... (cached) ar
checking for strip... strip
checking for nm... nm
checking if make is GNU make... yes
configure: error: unknown system type x86_64-pc-msys.

Does anybody has any idea about what I can do to be able to build the library using MSY2?

Thanks in advanced
Micheus
It says it right there:

Code: Select all

configure: WARNING: *** System type x86_64-pc-msys is unknown, assuming generic Unix and continuing nevertheless.
configure: WARNING: *** Please report the build results to [email protected].
But just for curiosity - why do you want to build under MSYS{2}?
What does basic MinGW/TDM-GCC doesn't have that MSYS{2} does?

Thank you.
Micheus
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Apr 02, 2019 6:46 am

Re: Failing to build wxWidgets using MSYS2

Post by Micheus »

Thanks for answer me.
ONEEYEMAN wrote: Tue Apr 02, 2019 3:44 pmYou didn't supply "--with-msw" option, and so it was defaulting to do a *nix build.
That information is not in the Cygwin/MinGW Compilation {#msw_build_cygwin} session in the documentation https://github.com/wxWidgets/wxWidgets/ ... install.md

ONEEYEMAN wrote: Tue Apr 02, 2019 3:44 pm It says it right there:

Code: Select all

configure: WARNING: *** System type x86_64-pc-msys is unknown, assuming generic Unix and continuing nevertheless.
configure: WARNING: *** Please report the build results to [email protected].
But just for curiosity - why do you want to build under MSYS{2}?
I already used MSYS before. Currently, I was using MinGW+Git for a couple of years, but I was looking for a way to keep them updated easily - which MSYS2 looked to be.
Since it contains MinGW64 I couldn't imagine that MSYS2 wouldn't be compatible with any other pack that includes it.

I have a environment built into a memory stick which allow me to work on my projects where I am. The most I may need is to change the memory stick letter assigned by the OS where I plug it, and if it's not possible because of admin rights I can change it in my .bash script.

It may not be the best way to work, but it is the way I fell comfortable to work. :)

ONEEYEMAN wrote: Tue Apr 02, 2019 3:44 pmWhat does basic MinGW/TDM-GCC doesn't have that MSYS{2} does?
I din't know, so I just installed it and as far as I understood, I need to work on Windows environment using the CMD console. No git, no pacman and if that user profile path is used for something, then there will exist one in each place I work on my projects (different PC's).

But, I can see that it's a very lightweight pack compared to MSYS2, so it looks like I will need to find a way to work in this new way. :)

Thanks for you help
Micheus
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 548
Joined: Fri Nov 03, 2006 2:00 pm

Re: Failing to build wxWidgets using MSYS2

Post by stahta01 »

When using MSys2, you can build via configure/make.
You can use wxMSW or wxGTK. Note: wxGTK is not yet stable.

Tim S.
Micheus
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Apr 02, 2019 6:46 am

Re: Failing to build wxWidgets using MSYS2

Post by Micheus »

stahta01 wrote: Tue Apr 02, 2019 7:01 pmWhen using MSys2, you can build via configure/make.
You can use wxMSW or wxGTK. Note: wxGTK is not yet stable.
The wxMSW is OK for me. I'm going to give it a try.

Thanks.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Failing to build wxWidgets using MSYS2

Post by ONEEYEMAN »

Hi,
Micheus wrote: Tue Apr 02, 2019 6:23 pm Thanks for answer me.
ONEEYEMAN wrote: Tue Apr 02, 2019 3:44 pm You didn't supply "--with-msw" option, and so it was defaulting to do a *nix build.
That information is not in the Cygwin/MinGW Compilation {#msw_build_cygwin} session in the documentation https://github.com/wxWidgets/wxWidgets/ ... install.md
As @stahta01, mentioned, you can build any ports with configure/make. You should just install appropriate SDK.
Micheus wrote: Tue Apr 02, 2019 6:23 pm
ONEEYEMAN wrote: Tue Apr 02, 2019 3:44 pm It says it right there:

Code: Select all

configure: WARNING: *** System type x86_64-pc-msys is unknown, assuming generic Unix and continuing nevertheless.
configure: WARNING: *** Please report the build results to [email protected].
But just for curiosity - why do you want to build under MSYS{2}?
I already used MSYS before. Currently, I was using MinGW+Git for a couple of years, but I was looking for a way to keep them updated easily - which MSYS2 looked to be.
Since it contains MinGW64 I couldn't imagine that MSYS2 wouldn't be compatible with any other pack that includes it.

I have a environment built into a memory stick which allow me to work on my projects where I am. The most I may need is to change the memory stick letter assigned by the OS where I plug it, and if it's not possible because of admin rights I can change it in my .bash script.

It may not be the best way to work, but it is the way I fell comfortable to work. :)
Understood.
People are usually don't like changes - if it works, it works.
But - my understanding is that very rarely MSYS{2} builds was (and is) tested. I am not sure the current situation improves with introduction of automatic builds and Git.

I know for sure that MSVC and MinGW builds are tested.
Micheus wrote: Tue Apr 02, 2019 6:23 pm
ONEEYEMAN wrote: Tue Apr 02, 2019 3:44 pm What does basic MinGW/TDM-GCC doesn't have that MSYS{2} does?
I din't know, so I just installed it and as far as I understood, I need to work on Windows environment using the CMD console. No git, no pacman and if that user profile path is used for something, then there will exist one in each place I work on my projects (different PC's).

But, I can see that it's a very lightweight pack compared to MSYS2, so it looks like I will need to find a way to work in this new way. :)

Thanks for you help
Micheus
Yes, it is basic CMD Windows emulator.
You can install GitHub client in you Windows machine, and it will create a Git shell for you to work with.

Not sure what pacman is - but you can install anything you want with basic Windows installation.

However, I do see the point of working with Linux environment on top of Windows.

And here I will say it - its your choice!!!

Thank you.
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 548
Joined: Fri Nov 03, 2006 2:00 pm

Re: Failing to build wxWidgets using MSYS2

Post by stahta01 »

Micheus wrote: Tue Apr 02, 2019 7:05 pm
stahta01 wrote: Tue Apr 02, 2019 7:01 pmWhen using MSys2, you can build via configure/make.
You can use wxMSW or wxGTK. Note: wxGTK is not yet stable.
The wxMSW is OK for me. I'm going to give it a try.

Thanks.
If building using configure/make instead of pacman packages; read msys2-msw.md under docs/msw

Tim S.
Micheus
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Apr 02, 2019 6:46 am

Re: Failing to build wxWidgets using MSYS2

Post by Micheus »

ONEEYEMAN wrote: Tue Apr 02, 2019 7:43 pmHowever, I do see the point of working with Linux environment on top of Windows.

And here I will say it - its your choice!!!
Surely. For a Windows user, I like a lot to work in a bash. :D

Thank you guys for all help/comments. I'm going to try prepare this new environment and come back here if I still have problems to build wxWidgets.
Micheus
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Apr 02, 2019 6:46 am

Re: Failing to build wxWidgets using MSYS2

Post by Micheus »

I gave up of MSY2 and I decided to go with my current dev env (MinGW64+Git) and I could go forward, but I needed to use an extra parameter --disable-dependency-tracking. This way I fixed a problem with make stopping (and I also know the problem is related some dependencies only).

But I got a error when I tried to install it. I ran make a second time with the install parameter and after a lot of mkdir message it stops with a "unexpected end of file" message. :?

Code: Select all

$ make install

lots of mkdir...

mkdir -p /usr/local/include/wx-3.1
for f in wx/afterstd.h wx/any.h wx/anystr.h wx/app.h wx/apptrait.h wx/archive.h wx/arrimpl.cpp wx/arrstr.h wx/atomic.h wx/base64.h wx/beforestd.h
 :
ebviewhistoryitem_ie.h wx/msw/webview_ie.h wx/msw/webview_missing.h wx/webview.h wx/webviewarchivehandler.h wx/webviewfshandler.h; do \
if test ! -d /usr/local/include/wx-3.1/`dirname $f` ; then \
mkdir -p /usr/local/include/wx-3.1/`dirname $f`; \
fi; \
/usr/bin/install -c -m 644 ../include/$f /usr/local/include/wx-3.1/$f; \
done
/usr/bin/sh: -c: line 1: syntax error: unexpected end of file
Makefile:13760: recipe for target 'install' failed
make: *** [install] Error 1
I checked and the folder usr/local/include/wx-3.1/ was created.

Does somebody has any idea about what can be causing that?
Micheus
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Apr 02, 2019 6:46 am

Re: Failing to build wxWidgets using MSYS2

Post by Micheus »

Never mind. I moved by hand the content of include folder to /usr/local/include/wx and then I could to build the samples/minimal with success.

ONEEYEMAN wrote: Tue Apr 02, 2019 3:44 pmBut just for curiosity - why do you want to build under MSYS{2}?
Now I built wxWidgets, I just remembered why I had installed MSYS2 - It's all about I build wxFormBuilder and the instructions to build in Windows only include MSYS2 32bits - I tried without it and just discovered it will not be easy build it using my MingGW-64.

Thanks for all help.
Post Reply