Build nsfminer for Windows 10

bitcoins on the table
Share

Build nsfminer (no fee ethereum mining) executable file for Windows 10

This process will start with the Hardware specifications and Applications used to create this process. Then, it is followed by a list of links and, finally, a step-by-step process for the installation of each application. Feel free to use the below Table of Contents to go directly to a specific section.


HARDWARE SPECIFICATIONS

This process was completed with the following hardware specifications:

Processor: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
System Type: 64-bit
RAM: 16 GB
GPU: GTX 1050

NOTE: The steps outlined in this process are not limited to the above hardware specifications.


APPLICATIONS

The below applications are needed therefore, we will be installing them during our process:

Windows 10
Visual Studio 2017 (with VC++ 2015.3 v140 toolset (x86,x64))
Git (latest)
Perl (latest) (needed to build OpenSSL)
CMake (require 3.5 or higher version)
CUDA Toolkit (require 9.0 or higher version) (optional, this is for CUDA support)


LINKS

The below links were valid during the creation of this process. In the event they are no longer valid then please do a search in your favorite search engine for the application.

Visual Studio Community 2017: https://visualstudio.com/Downloads
CMake: https://cmake.org/
Git: https://git-scm.com/downloads
Perl: https://www.perl.org/get.html
CUDA Toolkit: https://developer.nvidia.com/cuda-downloads
NSFMiner: https://github.com/no-fee-ethereum-mining/nsfminer


DEFINITIONS

Downloads folder: It is normally found here: C:\Users\YOURUSERNAME\Downloads; otherwise, find the location where your browser downloads files from the web.


DOWNLOAD AND INSTALL Visual Studio Community 2017 (Visual Studio Community 2017 is free)

NOTE: This part can be skipped if it is already installed. You might need an account to download the installer. Make sure the latest version is installed.

  1. Download “Visual Studio Community 2017” from https:\visualstudio.com/Downloads (in case the link does not work, then do a search for “Visual Studio Community 2017” in your favorite search engine)
  2. Look for the installation file, normally in your Downloads folder
  3. Double-click on the downloaded file
  4. Click the “Continue” button
  5. In the Visual Studio Installer window, click the Install button for Visual Studio Community 2017
  6. In the Installing window, click on Desktop development with C++
  7. To the far right of the window, you will see various checkboxes. Check VC++ 2015.3 v140 toolset (x86,x64)
  8. Click on the Install button
  9. Once installation is complete, close the Visual Studio Installer

CHECK UPDATES for Visual Studio Community 2017 (DO NOT SKIP THIS STEP, you need to have all the updates)

  1. Open your Visual Studio Community 2017 installation
  2. Click on Help, found in the menu bar
  3. Click on Check for Updates
  4. Follow the steps indicated by the Updates windows.
  5. Once the update is done, then open your Visual Studio Community 2017 installation
  6. Once again, do the above steps 2 and 3. You should see a window indicating that Visual Studio is up to date
  7. If it is up to date then you are done and you can go to the next process, if not then update again.

DOWNLOAD AND INSTALL Git

NOTE: This part can be skipped if it is already installed. Make sure the latest version is installed.

  1. Download the application from https://git-scm.com/downloads (in case the link does not work then do a search for “Download GIT” in your favorite search engine)
  2. Click on the Windows version
  3. Look for the installation file, normally in your Downloads folder
  4. Double-click on the downloaded file
  5. Click the Install button
  6. Click Finish

DOWNLOAD AND INSTALL Perl

NOTE: This part can be skipped if it is already installed. Make sure the latest version is installed.

  1. Download the application from https://www.perl.org/ (in case the link does not work, then search for “Download perl” in your favorite search engine)
  2. Click on DOWNLOAD
  3. Click on Windows
  4. Click on DOWNLOAD ACTIVEPERL
  5. Click on ActiveVersion x.xx (x.xx means the latest version you see as an option)
  6. Look for the installation file, normally in your Downloads folder
  7. Double click on the downloaded file
  8. Click Next
  9. Click Next, again
  10. Check the box I accept the terms in the License Agreement
  11. Click Next
  12. Click Next, again
  13. Click Install, accept the windows UAC
  14. Click Finish

DOWNLOAD AND INSTALL CMake

NOTE: This part can be skipped if it is already installed. Need version 3.5 or higher.

  1. Download application from https://cmake.org/ (in case the link does not work then do a search for “Download cmake” in your favorite search engine)
  2. Click on Download
  3. Click on the Windows x64 Installer (cmake-x.xx.x-windows-x86_64.msi where x.xx.x means the latest version you see as option)
  4. Look for the installation file, normally in your Downloads folder
  5. Double click on the downloaded file
  6. Click Next
  7. Check the box I accept the terms in the License Agreement
  8. Click Next
  9. Click on Add CMake to the system PATH for all users
  10. Click Next
  11. Click Next, again
  12. Click Install, accept the windows UAC
  13. Click Finish

DOWNLOAD AND INSTALL CUDA Toolkit

NOTE: This part can be skipped if it is already installed. Need version 9.0 or higher.

  1. Download application from https://developer.nvidia.com/ (in case the link does not work then do a search for “Download NVIDIA CUDA” in your favorite search engine)
  2. Click on Download
  3. Click on CUDA toolkit
  4. Click on Download Now
  5. Click on Windows
  6. Click Version 10
  7. Click exe (local)
  8. Click on Download (x.xx GB) (where x.xx means the latest version you see as option)
  9. Look for the installation file, normally in your Downloads folder
  10. Double click on the downloaded file, accept the windows UAC
  11. Click Ok
  12. Click AGREE AND CONTINUE
  13. Select Express and click NEXT
  14. Click NEXT
  15. Click CLOSE

CHECK YOUR INSTALLATIONS (applications)

Now that we have installed all the needed applications, we need to make sure we can call them from the prompt window.

  1. Open up windows Command Prompt
  2. Type: git –version
  3. You should see the version
  4. Type: perl -version
  5. You should see the version, compared it to the required version
  6. Type: cmake –version
  7. You should see the version, compared it to the required version

If any of the above commands do not work then search for the latest command (syntax) to find the application version. If the command has the correct syntax then the installation might not be in the Environment Variables and/or the installation was not successful. Try the process again in case the installation was not correct.


DOWNLOAD SOURCE CODE AND CREATE EXECUTABLE FILE nsfminer (latest)

Downloading the source files from git and creating the nsfminer executable file can all be done using a bat file.

  1. Go to any folder in your computer which you have permission to create, modify and delete folders and files.
  2. We need to create a .bat file. Right click inside the folder and left click on New, then choose Text Document
  3. Rename the newly created file to anything you would like and ensure that txt is replaced by bat. For example, you can replace this name “New Text Document.txt” for create_nsfminer.bat
  4. Right click the bat file and click on Edit. This will open the bat file in notepad.
  5. Select and Copy all the text found below.
@echo on
setlocal

git clone git://github.com/no-fee-ethereum-mining/nsfminer

echo *** Add MSVC in PATH
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat"
 
echo *** add Perl in PATH; it's needed for OpenSSL build
echo *** Make sure to change PERL_PATH, CUDA_TOOLKIT_ROOT_DIR and CUDA_BIN_PATH to the folders you have installed/saved each one.
set "PERL_PATH=C:\Perl64\bin"
set "CUDA_TOOLKIT_ROOT_DIR=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2"
set "CUDA_BIN_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2"
set "PATH=%PERL_PATH%;%CUDA_TOOLKIT_ROOT_DIR%;%CUDA_BIN_PATH%;%PATH%"
echo %CD%
cd "%~dp0\nsfminer\"
echo **** Is in NSFMINER folder:
echo %CD%
echo Make sure git submodules are up to date:
git submodule update --init --recursive
echo *** Check if build folder exists, if not then create one.
if not exist "build\" (
  echo build folder does not exist, will start creating
  mkdir "build\"
)
echo *** Created or checked if the build folder exists. In what folder are we in?
echo %CD%
echo *** For CUDA 9.x pass also -T v140

echo *** Before starting this line of code make sure that you have updated your MSVC installation.
echo *** Othwerwise you might get this message: Error Element  has an invalid value of "stdcpp17"
pause

cmake -G"Visual Studio 15 2017 Win64" -H. -Bbuild -DETHASHCL=OFF -DETHASHCUDA=ON -DAPICORE=ON -DCOMPUTE=86 -DETHSTRATUM=ON ..

echo *** Start build
pause
cmake --build build --config Release --target PACKAGE
echo *** COMPLETED: The bat file has finished. You can find the .exe file here:
echo %CD%\build\nsfminer\Release\nsfminer.exe
endlocal
pause
  1. Paste all the copied text into your bat. IMPORTANT: In the bat file, make sure to change PERL_PATH, CUDA_TOOLKIT_ROOT_DIR and CUDA_BIN_PATH to the folders you have installed/saved each one.
  2. Once the paths in the bat file have been updated with your folder locations, then save and close the bat file.
  3. Open up windows Command Prompt
  4. Go to the folder you have saved your newly created bat file by using the cd command.

For example, let us say that I have created a folder here: C:\nsfminer Inside this folder I created the bat file called create_nsfminer.bat thus I need to change directory by typing in the windows Command Prompt: cd c:\nsfminer

Now the prompt (folder full path before cd command) should have changed to: c:\nsfminer>

  1. Continue in the windows Command Prompt and type the name of your bat file. In our example, the name of our bat file is create_nsfminer.bat thus we would type create_nsfminer.bat
  2. Then press the Enter key on your keyboard
  3. The bat file will start to run and might take a while so be patient.
  4. During the process you will be asked to “Press any key to continue” but before you do that make sure you read the lines that follow 3 starts such as ***
  5. If you ok, then press on the Enter key on your keyboard. There are 3 pauses located in various steps of the bat file, thus you will have to press on the Enter key 3 times.
  6. On the third and final pause you should see a line that reads: *** COMPLETED: The bat file has finished. You can find the .exe file here:
  7. CONGRATULATIONS!!! You have successfully created the execution file needed to run nsfminer on Windows 10.

Now that you have created the nsfminer execution file you can head over to the nsfminer github website (https://github.com/no-fee-ethereum-mining/nsfminer) for more information related to nsfminer.

Click here to learn about cryptocurrencies and more.

All the information found in Bochica is free. If the information has been useful, please consider sending us a small gift here because this would help fund the continuation of this website. Thank you for taking the time to read this message.


Share

Sign up for our Newsletter

STAY INFORMED. Subscribe today!