Skip to content
This repository has been archived by the owner on Feb 7, 2018. It is now read-only.

Windows - runtime libraries "vcruntime140.dll" etc.. (Documentation) #601

Closed
geregtigheid opened this issue Jun 28, 2016 · 7 comments
Closed
Assignees

Comments

@geregtigheid
Copy link

geregtigheid commented Jun 28, 2016

I see that ethereum release "1.2.9" contain ethminer, that successfully start without "vcruntime140.dll" and other libraries from Visual C++ Redistributable Packages for Visual Studio 2013.

I need to make the same, but I can't to force ethminer launch without installing VC++ Redistributable.
Compiling ethminer with this instruction:
http://www.ethdocs.org/en/latest/ethereum-clients/cpp-ethereum/building-from-source/windows.html#pre-requisites

I tried to change linker options on "/nodefaultlib:vcruntime.lib", compiler options from "/MD" to "/MT", but then build fails..

The only requirement is to compile standalone executable - which works without any installation.
I tried to put "vcruntime140.dll" in work directory, but after it ask for "api-ms-win-crt-runtime-l1-1-0.dll" which doesn't work, if copied from another PC..

@bobsummerwill
Copy link
Contributor

You do need to run those VC++ redistributables, yes.

Looks like we had that documented for the binaries - http://ethdocs.org/en/latest/ethereum-clients/cpp-ethereum/installing-binaries/windows-installer.html - but not the source docs.

I will update those. Thanks for the heads-up.

@geregtigheid
Copy link
Author

Thanks for answer.
But your binaries already running without VC++ redistributables, I need to do the same, only question - how? Maybe you use another compiler etc..?

@bobsummerwill
Copy link
Contributor

The way it works is that the executables have a runtime dependency on VC++ runtime DLLs.

If you have Visual Studio installed on your machine (which you must have to build from source) then you will have those DLLs already.

If you are using those executables on a fresh machine then those DLLs will be missing (which is what the redist installer fixes).

The best way of solving this is for the Windows installer to include copies of those DLLs in the same directory as the EXE, and those will be used rather than relying on a global install. I tried to do exactly that many hours, but couldn't work out quite how through the rats-nest of CMake, NSIS, Jenkins and more in that chain.

So yeah - just run the VC redist and you'll be fine.

The ZIP has those copies. It's just the installer which is missing them. It does include that redist installer, though, I believe.

@geregtigheid
Copy link
Author

geregtigheid commented Jun 30, 2016

include copies of those DLLs in the same directory as the EXE

I tried, but without success. First DLL it ask was "VCRUNTIME140.dll", then "api-ms-win-crt-runtime-l1-1-0.dll", but after copying this files from Visual Studio PC to fresh machine, ethminer start with error
"entry point ucrtbase.terminate didn't found in api-ms-win-crt-runtime-l1-1-0.dll".

Only way to make workable api-ms-win-crt-runtime-l1-1-0.dll is to install it from VC redist, not copy from another machine.. but I'm seaching how to start myself compiled ethminer on fresh machine without running VC redist install. Only way - to use your binaries from release, but I need modified ethminer :/

@bobsummerwill
Copy link
Contributor

Sounds like your machine is screwed up. Maybe this?

https://support.tidal.com/hc/en-us/articles/206881749-The-program-can-t-start-because-api-ms-win-crt-runtime-l1-1-0-dll-is-missing

So perhaps it is unavoidable, and you need to run that re-dist. I think you should be able to do a silent command-line install of it, though, like so ...

http://asawicki.info/news_1597_installing_visual_c_redistributable_package_from_command_line.html

@geregtigheid
Copy link
Author

yeah, silent VC redist install should work for me.. Will perform another EXE for initiating VC redis setup and running ethminer. This is suitable command:

\vcredist_x64.exe /q /norestart

Thank you a lot for your time and answers.
Best regards.

@bobsummerwill
Copy link
Contributor

No problem, @geregtigheid!

Good for me to know that the VC++ redist install is not avoidable :-)

I'll just reopen this issue to track the documentation TODO.

@bobsummerwill bobsummerwill reopened this Jul 1, 2016
@bobsummerwill bobsummerwill changed the title runtime libraries "vcruntime140.dll" etc.. Windows - runtime libraries "vcruntime140.dll" etc.. (Documentation) Jul 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants