You can try this for free by using Virtual Box and a non activated Windows
- Install virtual box
- Create a virtual machine and call it Windows 10 or something. The wizard should auto complete most of the information
- Download the Windows 10 iso from Microsoft, mount it in your virtual machine and install it
- Install some text editor to edit files. I would recommend https://notepad-plus-plus.org/
The only limitations of not activating Windows that I'm aware of is that you get a transparent watermark and are unable to change your desktop background.
In the setup you can also choose to install the N/EuropeanUnion version to reduce bloat. So Skype, OneDrive, and some other things are not preinstalled.
Install msys2 by getting the one click installer and just follow the wizard.
Msys2 has some limitations with symlinks unless the shell is run as admin. You can build Nix without fixing this but make install
will fail when creating links of the built .exe files to usr/bin
.
To fix this you have to edit C:\msys64\msys2_shell.cmd
and uncomment
and change the line:
rem set MSYS=winsymlinks:nativestrict
to
set MSYS=winsymlinks
Which is located nearly at the top.
Once you've done this you need to run MSYS2 MinGW 64-bit
as admin. The installer should add some shortcuts to the start menu in the recently added section. Open the start menu, right click MSYS2 MinGW 64-bit
click on More > Open file location
. An explorer window should popup. In there right click the shortcut and click run as administrator
Sources:
- https://sourceforge.net/p/msys2/tickets/41/
- https://stackoverflow.com/questions/18654162/enable-native-ntfs-symbolic-links-for-cygwin
- https://superuser.com/questions/782104/trouble-creating-real-ntfs-links-using-cygwin
pacman -Syu #update msys2 first if you haven't
pacman -Syu --noconfirm autoconf
pacman -Syu --noconfirm automake
pacman -Syu --noconfirm tar
pacman -Syu --noconfirm gcc
pacman -Syu --noconfirm make
pacman -Syu --noconfirm patch
pacman -Syu --noconfirm perl
pacman -Syu --noconfirm pkg-config
pacman -Syu --noconfirm libbz2-devel
pacman -Syu --noconfirm mingw-w64-i686-libressl
pacman -Syu --noconfirm liblzma-devel
pacman -Syu --noconfirm libcurl-devel
pacman -Syu --noconfirm libunistring-devel #this one is not checked for in ./configure
pacman -Syu --noconfirm bison #this one is not checked for in ./configure
#see workarounds for the rest (2018 January 28th)
#pacman -Syu perl-DBI
#cpan WWW::Curl # requires DBI.
#cpan DBD::SQLite # requires DBI.
perl-DBI will successfully install but perl -e 'use DBI'
will fail because DBI.dll depends on perl 5.22 while the current version of perl in msys is at 5.24
To workaround this issue just rebuild the DBI package.
mkdir tempworkaround && cd tempworkaround
wget https://github.com/Alexpux/MSYS2-packages/raw/master/perl-DBI/PKGBUILD
wget https://github.com/Alexpux/MSYS2-packages/raw/master/perl-DBI/DBI-1.627.patch
makepkg
pacman -U perl-DBI-1.634-1-x86_64.pkg.tar.xz
Something is messed up with the defines when building this library. A workaround is to #define CURL_STRICTER=0
mkdir tempworkaround && cd tempworkaround
wget https://github.com/szbalint/WWW--Curl/archive/master.tar.gz
tar -xf master.tar.gz && WWW--Curl-master
perl Makefile.PL
make CCFLAGS=-DCURL_STRICTER=0 #the workaround
make install
wget https://github.com/NixOS/nix/archive/master.tar.gz
tar -xzvf master.tar.gz && cd nix-master
./bootstrap
#https://github.com/NixOS/nix/issues/506
./configure --disable-doc-gen
#in mysys2, echo $OS returns Windows_NT
#and the Nix makefiles has many workarounds for Cygwin
make OS=CYGWIN
make install OS=CYGWIN
relocation truncated to fit: R_X86_64_PC32 against undefined symbol TLS init function for nix::curActivity'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59364
This seems to only affect x64 builds. I did this which seemed to work but is probably wrong. (please suggest a better way)
- in
src/libutil∕logging.cc:88
removethread_local
- in
src/libutil∕logging.hh:80
removethread_local