mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
Updated Compiling from source (markdown)
@@ -27,6 +27,7 @@ cpuminer-opt can now be compiled on Linux, see compiling section below.
|
||||
|
||||
cpuminer-top is compiled on Windows using MSys2 and MinGW64. This installs a Linux-like environment where cpuminer-opt can be compiled and run on a Windows computer. MS Visual Studio is not supported.
|
||||
CPUs based on the x86_64 architecture (Intel & AMD) require Windows-7 64 bit and newer. ARM64 CPUs require Windows-11 or newer.
|
||||
The MSys2 file system is slow affecting build time, however, this does affect hashrate of cpuminer-opt.
|
||||
|
||||
Windows on ARM64 is unstable when compiled with Clang. GCC is not yet available for MinGW on ARM64.
|
||||
|
||||
@@ -84,12 +85,13 @@ Install Homebrew from https://brew.sh/. Use Homebrew to install missing packages
|
||||
|
||||
`% brew install aarch64-elf-binutils aarch64-elf-gcc gcc autoconf automake ca-certificates gettext gmp isl jansson libmpc libunistring lz4 m4 mpfr pcre2 zstd`
|
||||
|
||||
Homebrew compiles packages from source which can take a long time.
|
||||
Homebrew may compile some packages from source which can take a long time.
|
||||
|
||||
cpuminer-opt can now be compiled on MacOS ARM64 with the default Clang compiler.
|
||||
x86_64 requires using GCC.
|
||||
|
||||
There are many tutorials available on how to set a specific compiler, some are temporary and others are more persistent. The following will work for the existing terminal session.
|
||||
x86_64 CPUs must use GCC. Continue to change the compiler to GCC. Do not use GCC on ARM64, it won't work.
|
||||
|
||||
There are many tutorials available on how to switch compilers, some methods are temporary and others are more persistent. The following will work for the existing terminal session.
|
||||
|
||||
`$ export CC=gcc`
|
||||
|
||||
@@ -107,8 +109,7 @@ cpuminer-opt can now be compiled on MacOS.
|
||||
At this point it's assumed the appropriate development environment has been setup for the target operating system and a terminal is open and ready to compile.
|
||||
|
||||
Download cpuminer-opt only from the official JayDDee github repository: https://github.com/JayDDee/cpuminer-opt/
|
||||
Download the source code for latest release or clone the repository. Download the source tarball (.tar.gz) instead of zip to maintain file attributes.
|
||||
Download from a browser or use wget (if installed) from the command line terminal.
|
||||
Download the source code for latest release or clone the repository. Do not download zip source files because file attribute are not maintained by zip. Dowload with a browser or use wget (if installed) from the command line terminal.
|
||||
|
||||
`$ wget https://github.com/JayDDee/cpuminer-opt/archive/refs/tags/vX.Y.tar.gz`
|
||||
|
||||
@@ -118,7 +119,7 @@ Extract the source code.
|
||||
|
||||
`$ tar xvzf cpuminer-opt-X.Y.tar.gz`
|
||||
|
||||
Alternatively the latest version can be cloned from git if git is installed.
|
||||
Alternatively the latest version can be cloned from git if installed.
|
||||
|
||||
`$ git clone https://github.com/JayDDee/cpuminer-opt.git`
|
||||
|
||||
@@ -138,9 +139,9 @@ N is the number of threads for the compiler to use. Use `-j $(nproc)` to use all
|
||||
|
||||
Some newer CPU architectures may not be defined for `-march=native` in older versions of the compiler and may not recognize new features using the default build script. It is often possible to add the missing features to create an optimum build by manually specifying options.
|
||||
|
||||
Many examples can be found in file build-allarch.sh for x86_64 CPUs, and for in armbuild-all.sh for ARM64 CPUs..
|
||||
Many examples can be found in file build-allarch.sh for x86_64 CPUs, and in armbuild-all.sh for ARM64 CPUs.
|
||||
|
||||
Windows on ARM64 may crash with a segfault. See Windows notes above. YMMV
|
||||
Windows on ARM64 may crash with a segfault. See Windows section above. YMMV
|
||||
|
||||
#### Start mining.
|
||||
|
||||
@@ -148,10 +149,10 @@ Windows on ARM64 may crash with a segfault. See Windows notes above. YMMV
|
||||
|
||||
On Windows the executable file has a .exe extension.
|
||||
|
||||
# Building the Windows binary package.
|
||||
# Building the Windows x86_64 binary package.
|
||||
|
||||
This procedure is only used to build the Windows binary release package for x86_64 and is done from a Linux environment.
|
||||
It is not intended for users.
|
||||
It is not intended for users and is not supported. It is documented primarily for purposes of transparency. All binary files included in the package created from cpuminer-opt source code, copied from the host operating system, or created from source code as described below.
|
||||
|
||||
These instructions were written specifically for Ubuntu-20.04.
|
||||
|
||||
|
Reference in New Issue
Block a user