Project

General

Profile

Partial success building on the Windows MSYS2 environment

Added by Runar Tenfjord about 1 year ago

With the following addition to the Makefile:

   else ifdef MSYSTEM
    CP := cp -f
    RM := rm -f
    TC := touch

    PRG :=
    DIR = $1
    DIRP = $1
    ESC = \$(strip $1)
    NUL := /dev/null

    ENVIRONMENT := windows.cpp

    ifdef CommonProgramFiles(x86)
        HOSTENVIRONMENTS := win32 win64
    else
        HOSTENVIRONMENTS := dos win32
    endif

    ifeq "$(MSYSTEM)" "CLANG64" 
        toolchain := clang
    else
        toolchain := gcc
    endif


I was able to build the code with the CLANG compiler.
GCC ended with a error:
In file included from mapsearch.cpp:21:
utilities.hpp:407:29: error: template-id not allowed for destructor in C++20 [-Werror=template-id-cd
tor]
  407 | inline ECS::Restore<Value>::~Restore<Value> ()
      |                             ^
compilation terminated due to -Wfatal-errors.
cc1plus.exe: all warnings being treated as errors
make: *** [makefile:722: tools/mapsearch.o] Error 1

GCC version is 14.1.0
I did not investigate this any further.

CLANG completes the build without any problems.

Running the tests run mostly clean except for:

Results of test suite 'doccheck.tst':
number of tests: 38
succeeded tests: 19
failed tests:    19

Usually getting software to work on MSYS2 platforms involves some
grinding, but here it works directly from a Makefile. Quite impressive.


Replies (2)

RE: Partial success building on the Windows MSYS2 environment - Added by Florian Negele about 1 year ago

Thanks reporting. I just improved the logic of the automatic environment detection to accommodate your changes, see the attached patch file. Now the desired environment as well as the desired toolchain can be specified using either options or environment variables when invoking the makefile. I will also investigate the GCC error. The questionable line of code was added to fix a compiler issue with CLANG or some other version of GCC.

RE: Partial success building on the Windows MSYS2 environment - Added by Runar Tenfjord about 1 year ago

Excellent.
GCC is the official compiler for MSYS2 and CLANG is still considered experimental.
There are a lot of patching going on to get these compilers working, so it could be
tied to this platform.

    (1-2/2)