Ethminer: Windows 10 Build Issue

Created on 23 Jun 2017  路  17Comments  路  Source: ethereum-mining/ethminer

Trying to build commit 4332082530235cfd8fb6a7ce1f1670fecc448b20 on a Win 10 machine:

  • Visual Studio Version 12.0.31101.0
  • cmake version 3.9.0-rc4

cmake .. runs fine but on cmake --build . I get follwoing errors: https://pastebin.com/akD4MSxa

Any pointer to what I'm doing wrong would be appreciated

Most helpful comment

Because CMAKE_BUILD_TYPE is not for toolsets like Visual Studio. You have to open Visual Studio and change it within a combo box, or build with cmake --build . --config Release.

All 17 comments

Ok, I'm one step further. I updated to VS 14 2015 as per #24 and the build passes the position where it initially errored out.
Now upon linking I get following errors: https://pastebin.com/YmyiPA3C

I had the same issue. I then tried doing cmake .. -G "Visual Studio 14 2015 Win64" as it says at the bottom of the build section. I opened the generated .sln file in visual studio 2015 and compiled it (as release). It gave me a access denied error at the end of compiling, but i found and ran ethminer.exe under build/ethminer/Release. I am still in the process of seeing if it actually compiled correctly, but that is my progress on the matter.

Edit: I am able to run the next commands without getting errors but it does not appear to do anything

@Sineos you have to build configuration other than "Debug". Try "Release" or "RelWithDebInfo".

@chfast
Many thanks for your help, but I cannot get it to build release. I started from scratch and tried to build it out of source with:
cmake -DCMAKE_BUILD_TYPE=Release ../ethminer

I even added set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") to CMakeLists.txt but I always end up on Debug with the Linker errors --> https://pastebin.com/ngucCWz0

Because CMAKE_BUILD_TYPE is not for toolsets like Visual Studio. You have to open Visual Studio and change it within a combo box, or build with cmake --build . --config Release.

Cool, it worked. Again something learned ;-)
Many thanks!

to fix this:
d:\21_git\ethminer\libdevcore\Exceptions.h(38): error C3646: 'noexcept' : unknown override specifier (D:\21_Git\ethminer\libdevcore\RLP.cpp)
replace with:
throw()
or define it yourself:
#define noexcept

throw() means the function does not throw any exceptions

to fix this:
d:\21_git\ethminer\libdevcore\Worker.h(104): error C2039: 'unique_ptr' : is not a member of 'std' (D:\21_Git\ethminer\libdevcore\Worker.cpp)
include:
#include <memory>

@YanBellavance What version of Visual Studio do you have?

@Sineos If you are after a particular release the Appveyor system automatically builds exe's for every commit. You can browse them all at https://ci.appveyor.com/project/ethereum-mining/ethminer/history

In this case commit 4332082 is https://ci.appveyor.com/project/ethereum-mining/ethminer/build/94

Then under 'Job name' select 'Configuration: release' and select 'Artifacts' then you can download the zipped exe.

If you want to build on Windows 10 to do some development what worked for me was:

mkdir build; cd build
cmake .. -DETHASHCL=OFF -DETHASHCUDA=ON
cmake --build . --config Release

The first time you compile it will take a while, especially setting up Boost, but it won't take so long the next time because Hunter caches the built libraries.

Hopefully one of these suggestions helps you out. If it does please close the issue :-)

@jimmykl, can you add this description about AppVeyor to README?

@jimmykl
Many thanks for the hints, I successfully managed to build it, once @chfast pointed me to the release build. I know about AppVeyor, it was just out of curiosity because I enjoy playing with such stuff ;-)

From my PoV it can be closed but there are additional questions, e.g. from @YanBellavance. I leave it to your descretion to close it.

Glad you got it working @Sineos

@YanBellavance are you ok with this being closed? If you still have further questions you can start a new issue.

I think it's time to close this Issue.

It`s been a long time I haven't touched mining so I can't say off the top of my head. But basically all of them. I have it running on all Visual Studios starting with 2012.

I'm good with closing the issue. I think this could be avoided. it had something to do with stdlib. somewhere along the way visual studio started using its own implementation that relieved the need to rely on linux libraries. It's all still a bit fuzzy to me I apologize for blurry details as I'm working on another kind of project right now.. You can find which version of visual studio by finding which VCtools aka msbuild introduced this feature... Actually this reminds me about vctools 120 ,140.....this is exactly why there were issues using certain VCTools version with certain versions of Visual Studios.

I think I was able build the miner with all of the VCtools versions

Any PR is welcome!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chfast picture chfast  路  3Comments

blgsyrmhnds picture blgsyrmhnds  路  4Comments

Penziplays picture Penziplays  路  5Comments

krrkrr picture krrkrr  路  5Comments

sur1v picture sur1v  路  4Comments