[smartmontools-support] Compiling smartctl on Windows
Eaton Zveare
eatonzveare at gmail.com
Wed Apr 27 19:25:55 CEST 2022
Yes, you are right, config.h inside os_win32\vc16 has those defines
commented out.
Despite that, the build fails. It appears VS 2022 is referencing the
config.h from the root folder instead of the one inside vc16.
In the Solution Explorer, the config.h file there is the vc16 version, so
I'm not sure why it's using the other one in the root.
When I replace the root config.h with the vc16 copy, it fixes the problem
right away.
On Wed, Apr 27, 2022 at 12:49 PM Christian Franke <
Christian.Franke at t-online.de> wrote:
> Eaton Zveare wrote:
> > Hi Christian, the line endings/format are correct in the files I have.
> > I did not need to make changes.
> > I made the int128 change and it actually made no difference. Digging
> > deeper, I found that I also had to remove these defines:
> >
> > * HAVE_UNISTD_H
> > * HAVE_ATTR_PACKED
> >
> > Only then did VS 2022 finally compile. You didn't have to remove those
> > defines to get it to work?
>
> Correct. The sed script in the Makefile should remove these during copy
> from
> .../smartmontools/vctmp/config.h
> to
> .../smartmontools/os_win32/vc16/config.h
>
> Try to diff both files.
>
> Because newer 'sed' versions no longer implicitly convert input files to
> LF, this currently only works if the original config.h has already LF
> line endings.
>
> I only tested with Cygwin, so this might also be a MSYS specific problem.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://listi.jpberlin.de/pipermail/smartmontools-support/attachments/20220427/d7128a7a/attachment.htm>
More information about the Smartmontools-support
mailing list