From 65732c737c378a9d0ece0c8e865d7067f60577af Mon Sep 17 00:00:00 2001 From: JayDDee Date: Sat, 11 Jan 2025 22:03:54 -0500 Subject: [PATCH] Updated Compiling from source (markdown) --- Compiling-from-source.md | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/Compiling-from-source.md b/Compiling-from-source.md index 373a180..9166de3 100644 --- a/Compiling-from-source.md +++ b/Compiling-from-source.md @@ -1,25 +1,27 @@ Compiling cpuminer-opt from source code requires a different environment depending on the operating system used. Once the environment has been created the actual compile procedure is the same for all supported CPU architectures and operating systems. -Linux & MacOS are supported for both x86_64 & ARM64 CPUs. Windows is supported for x86_64 but ARM64 is a work in progress. +Linux, MacOS & FreeBSD are supported for both x86_64 & ARM64 CPUs. Windows is supported for x86_64 but ARM64 is a work in progress. +Other BSDs have not ben tested. All configurations use GCC compiler unless otherwise noted. -A package is available for Windows on x86_64 with precompiled binaries which can be used instead of compiling from source for those who feel uncomfortable with compiling. There are no such binaries available for ARM64 or MacOS. +Precompiled binaries are available for Windows on x86_64 which can be used instead of compiling from source for those who feel uncomfortable with compiling. There are no binaries available for Windows ARM64 or other operating systems. + +There is no seperate section describing BSD setup. Linux can be used as a guide for what packages are required. All packages needed by FreeBSD are avaiable using pkg. Other BDSs have not been tested. + +The short version for most cases is to install the GNU/Make development environment including GCC and the additional libraries needed to build cpuminer-opt. # Linux build environment -The following is based on Ubuntu and also applies to other Debian based Linux distributions. Fedora and other distributions have different package managers and may have slightly different package naming. Some packages may have separate runtime and development versions of the same package. Ensure the development or source code versions are installed. +The following is based on Ubuntu and also applies to other Debian based Linux distributions. Fedora and other distributions have different package managers and may have slightly different package naming. Some packages may have separate runtime and development versions of the same package. Ensure the development or headers versions are installed. Make sure you have the basic development packages installed. Here is a good start: http://askubuntu.com/questions/457526/how-to-install-cpuminer-in-ubuntu -Install any additional dependencies needed by cpuminer-opt. The list below -are some of the ones that may not be in the default install and need to -be installed manually. There may be others, read the compiler error messages, -they will give a clue as to the missing package. +Install any additional dependencies needed by cpuminer-opt. The list below are some of the ones that may not be in the default install and need to be installed manually. There may be others, read the compiler error messages, they will give a clue as to the missing package. The following command should install everything you need on Debian based distributions. -`$ sudo apt-get install build-essential automake libcurl4-openssl-dev libjansson-dev libgmp-dev zlib1g-dev git` +`$ sudo apt-get install build-essential gcc automake libcurl4-openssl-dev libjansson-dev libgmp-dev zlib1g-dev git` cpuminer-opt can now be compiled on Linux, see Compiling cpuminer-opt below. @@ -41,7 +43,7 @@ Install additional packages required for compiling cpuminer-opt. #### x86_64 packages -`$ pacman -S autotools libcurl-devel mingw-w64-x86_64-curl gmp-devel jansson-devel zlib-devel` +`$ pacman -S gcc autotools libcurl-devel mingw-w64-x86_64-curl gmp-devel jansson-devel zlib-devel` #### ARM64 packages @@ -52,12 +54,12 @@ Open the apropriate MSys2 terminal for your architecture from the start menu. On Ensure the correct one is used. GCC is recommended but is only avalable for x86_64 at this time. On ARM64 the only choice is Clang which has problems described in errata below. 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`. -The MSYS2 home directory can be accessed from Windows with `C:\msys2\home\[USER]`. +Similarely the MSYS2 home directory can be accessed from Windows with `C:\msys2\home\[USER]`. Notepad++ and 7zip are useful Windows programs with good support for Linux file formats. #### Windows integration, optional -cpuminer-opt must normally br run from the MSys command terminal. It is possible to run from a Windows command prompt or Powershell using DOS syntax by adding MSYS2 to the system Path environment variable. FYI: https://stackoverflow.com/questions/6951938/libgmp-10-dll-is-missing +cpuminer-opt must normally be run from the MSys command terminal. If desired it can be run from a Windows command prompt or Powershell using DOS syntax by adding MSYS2 to the system Path environment variable. FYI: https://stackoverflow.com/questions/6951938/libgmp-10-dll-is-missing cpuminer-opt can now be compiled on Windows, see Compiling cpuminer-opt below.