awyl / Build-PowerMonkey

Scripts to build PowerMonkey for undervolting
35 stars 9 forks source link

Compile errors #12

Open ShakesB33r opened 2 years ago

ShakesB33r commented 2 years ago

I followed the steps here with an up to date VS22 installation, using the command line tools. As soon as edksetup.bat Rebuild is run, I get about a page of errors as follows:

BasePeCoff.c(129): error C2220: the following warning is treated as an error BasePeCoff.c(129): warning C4311: 'type cast': pointer truncation from 'void ' to 'UINTN' BasePeCoff.c(129): warning C4312: 'type cast': conversion from 'UINTN' to 'EFI_IMAGE_OPTIONAL_HEADER_UNION ' of greater size BasePeCoff.c(561): warning C4312: 'type cast': conversion from 'UINTN' to 'UINT8 ' of greater size BasePeCoff.c(629): warning C4312: 'type cast': conversion from 'UINTN' to 'EFI_IMAGE_OPTIONAL_HEADER_UNION ' of greater size BasePeCoff.c(703): warning C4312: 'type cast': conversion from 'UINTN' to 'EFI_TE_IMAGE_HEADER ' of greater size BasePeCoff.c(717): warning C4312: 'type cast': conversion from 'UINTN' to 'EFI_IMAGE_BASE_RELOCATION ' of greater size BasePeCoff.c(718): warning C4311: 'type cast': pointer truncation from 'EFI_IMAGE_BASE_RELOCATION *' to 'UINTN' ...

I also tried checking out the February 22 stable branch of edk2 but still got the same errors. Any advice?

For reference, the file is in edk2\BaseTools\Source\C\Common\BasePeCoff.c

Something about this seems to me like the build is seriously misconfigured or broken, but I can't really see what or how to fix it.

ShakesB33r commented 2 years ago

I now see that as mentioned in this issue https://github.com/awyl/Build-PowerMonkey/issues/7, using x86 (and not x64) native tools command prompt fixed the issue. I would suggest to edit the readme to point this out.