mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
Updated Compiling from source (markdown)
@@ -98,12 +98,17 @@ 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.
|
||||
|
||||
cpuminer-opt-24.7 adds support for ARM CPUs with Windows 11 with some changes in build procedure noted below.
|
||||
|
||||
#### 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.
|
||||
|
||||
The Mingw toolchain for ARM does not yet support GCC so use CLANG Instead on ARM CPUs.
|
||||
The Msys installer for x86 can also be used to install MSys correctly on ARM CPUs.
|
||||
|
||||
#### Install additional packages
|
||||
|
||||
Install the following additional packages required for compiling cpuminer-opt
|
||||
@@ -122,11 +127,11 @@ https://stackoverflow.com/questions/6951938/libgmp-10-dll-is-missing
|
||||
|
||||
#### Download cpuminer-opt
|
||||
|
||||
Download and decompress cpuminer-opt source code. Download the tar.gz file as it preserves file permissions, specifically executability. It can be dowloaded from the Windows web browser or from MSYS2 MinGW-w64 terminal. This is different from the terminal used for package installation.
|
||||
Download and decompress cpuminer-opt source code. Download the tar.gz file as it preserves file permissions, specifically executability. It can be dowloaded from the Windows web browser or from MSYS2 MinGW-w64 terminal. This is different from the terminal used for package installation. On ARM CPUs open the CLANGARM64 terminal instead.
|
||||
|
||||
If Windows tools are preferred cpuminer-opt can be downloaded to the Windows Documents folder and accessed from MSYS2 MinGW-w64 terminal using the path /c/users/[USER]/documents. Notepad++ and 7zip are useful Windows programs with good support for Linux file formats. The MSYS2 home directory can be accessed from Windows with C:\msys2\home\[USER].
|
||||
|
||||
Cpuminer-opt can be downloaded from the MSYS2 terminal using git or wget. Git will download the most recent source code, it matches the latest release.
|
||||
Cpuminer-opt can be downloaded from the MSYS2 terminal using git or wget or any browser. Git will download the most recent source code, it matches the latest release.
|
||||
|
||||
`$ git clone https://github.com/JayDDee/cpuminer-opt.git`
|
||||
|
||||
@@ -142,18 +147,29 @@ Wget will download specific release X.Y.Z.
|
||||
|
||||
#### 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, use only if required.
|
||||
"-D_WIN32_WINNT=0x0601" is required to support Windows CPU groups. CPU groups requires Windows 7.
|
||||
|
||||
Running build-msys2.sh script will compile with the above options and should be used in most cases:
|
||||
There is no build script for building on ARM, enter commands manually. Add the following to the default CFLAGS
|
||||
On ARM CPUS add:
|
||||
"-flax-vector-conversions"
|
||||
|
||||
There is a segfault issue (#440) with Windows on ARM. If the miner crashes with a segfault recompile with the following additional CFLAG:
|
||||
"-DARM_WIN_HACK"
|
||||
|
||||
Running build-msys2.sh (x86_64 only) script will compile with the above options and should be used in most cases:
|
||||
|
||||
`$ ./build-msys2.sh`
|
||||
|
||||
Otherwise run the following commands adjusting the options as desired:
|
||||
There is no build script for ARM CPUs, use these commands adjusting the options appropriately:
|
||||
|
||||
`$ ./autogen.sh`
|
||||
|
||||
`$ CFLAGS="-O3 --param=evrp-mode=legacy -march=native -Wall -D_WIN32_WINNT=0x0601" ./configure --with-curl`
|
||||
x86_64 CPU (Intel & AMD):
|
||||
`$ CFLAGS="-O3 -march=native -Wall -D_WIN32_WINNT=0x0601" ./configure --with-curl`
|
||||
|
||||
aarch64, add "-DARM_WIN_HACK" if necessary:
|
||||
`$ CFLAGS="-O3 -march=native -Wall -D_WIN32_WINNT=0x0601 -flax_vector_conversions" ./configure --with-curl`
|
||||
|
||||
`$ make -j [N]`
|
||||
|
||||
@@ -343,3 +359,5 @@ Linux is currently supported. MacOS & Windows can use a Linux VM, host must be a
|
||||
|
||||
Add `-flax-vector-conversions` to CFLAGS, or use `./arm-build.sh`.
|
||||
AES and SHA2 will automatically be compiled if the CPU supports them or they can be selected manually. See armbuild-all.sh for examples.
|
||||
|
||||
cpuminer-opt-24.7 adds support for ARM CPUs running Windows 11. Use the "Building for Windows, the easy way" procedure with noted changes.
|
Reference in New Issue
Block a user