[smartmontools-support] Compiling smartctl on Windows

Eaton Zveare eatonzveare at gmail.com
Thu Apr 21 23:24:51 CEST 2022


Hi, after spending some time getting smartctl compilable on my Windows 11
machine, I have run into problems and must ask for some assistance in
getting a proper build environment set up.

I have read the "Guidelines for Windows" section in the INSTALL file. I
installed MSYS2, did their 2-step package update commands, and
installed mingw-w64-x86_64-toolchain. In other words, everything under the
Installation section here: https://www.msys2.org/

I then installed these additional packages via this command: *pacman -S
make autoconf autogen automake*

I then copied the latest smartmontools source (the SVN copy) to here:
*C:\msys64\home\Eaton*
Start the "MSYS2 MinGW x64" shell and run these commands:

   1. *./autogen.sh*
   2. *./configure*
   3. *make*

That gets me a smartctl.exe, but it's 6.4 MB, more than 6x larger than the
official build. I suspect it was compiled in debug mode, but it's not clear
how to specify release/production mode.
This leads to my questions:

   1. How do I compile in release/production mode?
   2. How do I compile the "smartctl-nc" version of the exe?
   3. I also tried getting this working in Visual Studio, but running the
   *config-vc14* (or vc16) command does not work. It says *No rule to make
   target*. Visual Studio is my preferred environment, so if you could
   provide updated instructions for getting a build environment set up in
   that, it would be appreciated.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://listi.jpberlin.de/pipermail/smartmontools-support/attachments/20220421/5ed5b595/attachment.htm>


More information about the Smartmontools-support mailing list