I’ve opened a pull request that adds CI targets for 32- and 64-bit Windows using MinGW-w64 and GCC: https://github.com/gnustep/libs-base/pull/136
It’s not fully working (more details in the PR), but I think it’s a start. I’d appreciate any feedback and thoughts on how to get the builds and tests fixed. Frederik > Am 15.05.2020 um 10:00 schrieb Frederik Seiffert <frede...@algoriddim.com>: > > Hi all, > > Following up on this thread I wanted to give a quick update on building > GNUstep for Windows. > > First, I managed to build Base successfully using GCC on MinGW 64-bit > following Riccardo’s helpful instructions at > http://wiki.gnustep.org/index.php/Installation_MSYS2 > <http://wiki.gnustep.org/index.php/Installation_MSYS2>. > Two small things here (I can’t edit the wiki, so would be great if someone > could add these): > > 1. The build instructions for Make are obviously missing a "make install" > step. > 2. I also had to install the following packages for ICU: > - mingw64/mingw-w64-x86_64-icu > - msys/icu-devel > > I did not have to patch the MSYS2 headers as written in the instructions, but > maybe that’s only needed for Gui? > > It does show a lot of warnings during build, some of which look somewhat > concerning. If I find some time I’ll try to add a Windows OS target to the > Travis setup to run the tests and ensure this is kept working. > > As a side note, Make doesn’t seem to handle spaces in the home directory > correctly – does someone know where to fix this? > >> $ /mingw64/bin/gnustep-config --objc-flags >> -MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_RUNTIME=1 >> -DGNUSTEP_BASE_LIBRARY=1 -DGNUSTEP_WITH_DLL -fno-strict-aliasing >> -fno-omit-frame-pointer -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -g -O2 >> -fconstant-string-class=NSConstantString -I. -I/home/Frederik >> -ISeiffert/GNUstep/Library/Headers -I/mingw64/include > > > > Moving on to building with Clang and libobjc2, as mentioned in an earlier > message to this thread, I first built libobjc2 in a Visual Studio command > prompt using CMake and clang-cl, which according to David is the way to go. > > I’ve then been trying two approaches for building GNUstep: > > 1. Using MinGW 32/64-bit, and setting CC/CXX env vars to Clang: > > I have not been able to get this to work at all so far, as I can’t > figure out how to change the linker to LLD or ld.gold, as required for this > setup. Neither setting LD=lld or LDFLAGS="-fuse-ld=lld" or "=gold" seems to > have any effect. Calling "clang --print-prog-name=ld" (which is what Make > does to check which linker is being used) will always output ld. I’m probably > missing something here – can anyone point me in the right direction how to > change the linker? > > 2. Using the llvm-mingw toolchain (https://github.com/mstorsjo/llvm-mingw > <https://github.com/mstorsjo/llvm-mingw>), which is preconfigured to use LLD: > > This goes pretty far (after a couple fixes I pushed yesterday), but in > the end fails for me with the following: > >> No rule to make target 'Additions/obj/subproject.o', needed by >> 'obj/libgnustep-base.a' > > > I’d appreciate any thoughts on the above. > > Thanks! > Frederik >