[smartmontools-support] Compiling smartctl on Windows

Eaton Zveare eatonzveare at gmail.com
Wed Apr 27 03:27:37 CEST 2022


Thanks - very helpful info!
Let me know about the VS 2022 build when you have a chance to check it.

On Fri, Apr 22, 2022 at 1:15 PM Christian Franke <
Christian.Franke at t-online.de> wrote:

> Hi Eaton,
>
> Eaton Zveare wrote:
> > ...
> > >> /If you plan to use Linux-like tools more often, I would recommend
> > to use Cygwin./
> >
> > I think that adds a dependency on a cygwin dll though? If so, that is
> > not appealing.
>
> Yes and no.
> "./configure" without arguments results in Cygwin binaries which
> requires some cyg*.dll.
> "./configure --build=$(./config.guess) --host=x86_64-w64-mingw32"
> results in non-Cygwin binaries.
>
>
> > >> /The make commands for VC16 (VS2019) are now:/
> > >> /make config-vc/
> > >> ...
> >
> > That command works, but Visual Studio still won't compile:
> > https://i.imgur.com/nmIAy9h.png
> > I should note I am using Visual Studio 2022. Is there a firm
> > dependency on 2019, or is there something I can change in the project
> > settings to make it work in 2022?
>
> I don't know and will try with VS 2022 soon and commit the related
> project files.
>
>
> >
> > >> /Note that VC is never used for release and CI
> > (https://builds.smartmontools.org/) binaries for Windows. These are
> > always cross-compiled using a Docker image with Linux and Mingw-w64./
> > /
> > /
> > Is there any difference between VC, MSYS2/MINGW64 on Windows, and
> > cross-compiled builds on Linux or is it just a matter of environment
> > preference?
>
> Any binaries produced by (the same version of) the Mingw-w64 toolchain
> should be similar, regardless of build platform. One reason we do
> cross-compiling is that it eases discussions if another malware scanner
> reports another false positive. Another is that VS is closed source and
> even the community edition requires registration. Disadvantages of
> Mingw-w64 are the lack of support of Control Flow Guard and the
> inability to statically link without the need of msvcrt.dll during runtime.
>
> Regards,
> Christian
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://listi.jpberlin.de/pipermail/smartmontools-support/attachments/20220426/08796f78/attachment.htm>


More information about the Smartmontools-support mailing list