Updated Compiling from source (markdown)

JayDDee
2022-01-20 02:40:20 -05:00
parent 6a595ea77e
commit 9517fa534e

@@ -120,21 +120,34 @@ https://stackoverflow.com/questions/6951938/libgmp-10-dll-is-missing
#### 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 the user's Windows Documents
folder is recommended. It can be accessed from an MSYS2 terminal using the path /c/users/[USER]/documents.
Download and decompress cpuminer-opt source code. Download the tar.gz file as it preserves file permissions,
speifically executability. It can be dowloaded from the Windows browser or from MSYS2 MinGW-w64 terminal.
This is different from the terminal used for package instalation.
Here are a couple of convenient ways to download from the msys2 terminal:
If Windows tools are preferred cpuminer-opt can be downloaded to the Windows Documents folder and accessed from
MSYS2 terminal using the path /c/users/[USER]/documents. Notepad++ and 7zip are useful Windows programs with good support for
Linux file formats.
Cpuminer-opt can be downloaded from the MSY2 terminal using git or wget. The MSYS2 home directory can be accessed
from Windows with C:\msys2\home\[USER].
Git will download the most recent source code, usually it should always match the latest release.
`$ git clone https://github.com/JayDDee/cpuminer-opt.git`
`$ cd cpuminter-opt`
Wget will download specific release X.Y.Z.
'$ wget https://github.com/JayDDee/cpuminer-opt/releases/tag/vX.Y.Z`
'$ tar xvf cpuminer-opt-X.Y.Z.tar.gz`
'$ cd cpuminer-opt-X.Y.Z`
#### 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.
"--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.
`$ ./autogen.sh`
@@ -145,8 +158,9 @@ cpuminer-opt and compile. "--param=evrp-mode=legacy" is required to workaround a
N is the number of compiler threads.
6. Run cpuminer.exe directly from an MSYS2 terminal or, if step 3 was performed above,
it can run in a Windows terminal on the same system.
Run cpuminer.exe directly in an MSYS2 terminal or, if step 3 was performed above,
it can run in a Windows terminal on the same system. It can also be copied or moved to a more convenient
location. It can't be run on another system.
## Building for Windows, the hard way