Updated Compiling from source (markdown)

JayDDee
2022-01-15 13:16:11 -05:00
parent 5e27950488
commit a44f070881

@@ -94,27 +94,37 @@ cpuminer-opt can now be built on Windows for Windows using MinGW-w64 and MSYS2.
Windows 7 or newer is required. The compiled executable can only run on the system where
it was built. Use the hard way for a portable package.
1. Download and install the latest version of msys2-x86_64 from https://www.msys2.org/.
#### Install MSYS2
Download and install the latest version of msys2-x86_64 from https://www.msys2.org/.
Update packages and install mingw toolchain but leave the MSYS2 MSYS window open at the end to install
more packages in the next step.
2. Install the following additional packages required for compiling cpuminer-opt
#### Instal additoinal packages
Install the following additional packages required for compiling cpuminer-opt
`$ pacman -S autotools libcurl-devel mingw-w64-x86_64-curl gmp-devel jansson-devel openssl-devel zlib-devel`
Other desired packages can also be installed at this time. Some useful ones not installed by default include
git, openssh, wget, vim, zip, unzip ...
3. Set the system Path environment variable to allow cpuminer-opt to run from a Windows terminal,
##### Add MSYS2 to the system Path variable
Set the system Path environment variable to allow cpuminer-opt to run from a Windows terminal,
otherwise it can only run from an MSYS2 terminal.
https://stackoverflow.com/questions/6951938/libgmp-10-dll-is-missing
4. Download and decompress cpuminer-opt source code or clone the repository with git (if installed)
#### Download cpuminer-opt
Download and decompress cpuminer-opt source code or clone the repository with git (if installed)
to the directory of your choice. The MSYS2 home directory, usually C:\msys2\home\\[USER]\, or a subdirectory
is a good choice. If intending to use cpuminer.exe from a Windows terminal (step 3 was performed) the user's Windows Documents
folder is recommended. It can be accessed from an MSYS2 terminal using the path /c/users/[USER]/documents.
#### Compile
5. Open "MSYS2 MinGW-w64" from the Windows start menu, change directories to the downloaded
cpuminer-opt and compile. "--param=evrp-mode=legacy" is required to workaround a bug in the compiler's optimizer.
"-D_WIN32_WINNT=0x0601" is required to support Windows CPU groups.