outoftheboxplugins/aws-sdk-unreal

vcpkg build error + workaround

C0D3-BL00D3D opened this issue · 2 comments

vcpkg recently updated their port for aws-sdk-cpp, which started causing a build error for me.

As a workaround, I modified the build-vcpkg.ps1 script to check out the most recent commit that builds successfully. This should be added at line 44, before the line where the new copy of vcpkg is bootstrapped:

# WORKAROUND: Checkout last known working commit for aws-sdk-cpp port
Push-Location "$vcpkgDir"
git checkout "0d894bc57163fa75daebcb0ee98bf8b05bef3a66"
Pop-Location

I've opened an issue in vcpkg to hopefully get this fixed: microsoft/vcpkg#39441.

While I had cleared my project's cache (deleted .vs, Binaries, Intermediate, Saved folders, and the .sln file, then regenerated the project), the plugin had its own Binaries and Intermediate folders, which seemed to have retained an older version of the SDK. This might have caused the conflict when updating. Deleting these plugin-specific folders and reinstalling the latest version fixed the original issue.

However, the build still fails due to multiple errors related to the custom memory allocator class FUnrealMemoryManager. It seems like the custom allocator isn't correctly defining or inheriting the required member types and functions expected by std::allocator_traits:

  • error C2039: 'pointer': is not a member of 'std::allocator<T>' appears repeatedly for various template instantiations.
  • error C3646: 'allocate': unknown override specifier
  • syntax error: identifier 'pointer'
  • unexpected token(s) preceding '{'; skipping apparent function body

These issues started occurring after updating to vcpkg's latest version of aws-sdk-cpp (v1.11.352 as of June 21). The errors are not present when using older versions of the SDK (e.g., 1.11.285).

I will continue to use the workaround until this issue is resolved or an alternative solution is found.

While I had cleared my project's cache (deleted .vs, Binaries, Intermediate, Saved folders, and the .sln file, then regenerated the project), the plugin had its own Binaries and Intermediate folders, which seemed to have retained an older version of the SDK. This might have caused the conflict when updating. Deleting these plugin-specific folders and reinstalling the latest version fixed the original issue.

However, the build still fails due to multiple errors related to the custom memory allocator class FUnrealMemoryManager. It seems like the custom allocator isn't correctly defining or inheriting the required member types and functions expected by std::allocator_traits:

* `error C2039: 'pointer': is not a member of 'std::allocator<T>'` appears repeatedly for various template instantiations.

* `error C3646: 'allocate': unknown override specifier`

* `syntax error: identifier 'pointer'`

* `unexpected token(s) preceding '{'; skipping apparent function body`

These issues started occurring after updating to vcpkg's latest version of aws-sdk-cpp (v1.11.352 as of June 21). The errors are not present when using older versions of the SDK (e.g., 1.11.285).

I will continue to use the workaround until this issue is resolved or an alternative solution is found.

I believe this is related to a difference between c++17 and 20. not 100% sure though.