aws-samples / amazon-polly-metahumans

This Unreal Engine sample project demonstrates how to bring Epic Games' MetaHuman digital characters to life using the Amazon Polly text-to-speech service from AWS. Use this project as a starting point for creating your own Unreal Engine applications that leverage Amazon Polly to give voice to your MetaHumans.
MIT No Attribution
178 stars 67 forks source link

Error when compiling the Polly C++ SDK #22

Open abuelgasimsaadeldin opened 1 year ago

abuelgasimsaadeldin commented 1 year ago

Hi everyone,

I'm trying to get this working on my UnrealEngine 4.27 on a Windows OS and have followed all the steps in the readme appropriately up to step 3. I'm now trying to download and compile the appropriate binaries for windows using the BuildAwsSdkWin64.bat script, however, I am faced with the following error messages upon build.

Any assistance in trying to resolve this would be highly appreciated. Thanks.

image

Krxtopher commented 1 year ago

I ran into a similar error recently. The root cause for me (and likely for you) is that you are running into Windows filepath length limitations, so some files aren't being written successfully. You have the project nested under C:\Users\abu\UnrealProjects\amazon-polly-metahumans-steve-main which results in some really long file paths. Try the following:

  1. Move the repo files to a much more shallow directory such as C:\UnrealProjects\polly-metahumans.
  2. If it exists, delete the "aws-sdk-cpp" folder found under /Source/AmazonPollyMetahuman/ThirdParty/AwsSdk/.
  3. Re-run the .bat script.

Please confirm if this fixes your issue or not.

abuelgasimsaadeldin commented 1 year ago

Hi @Krxtopher,

Thanks for the reply, I went back to the project and ran it one more time following your instructions and the BuildAwsSdkWin64.bat script was able to compile successfully this time, however, I do receive the following error message when trying to run the AmazonPollyMetaHuman.uproject:

image

Here are the logs:

ERROR: Unhandled exception: Source file 'C:\UnrealProjects\amazon-polly-metahumans\Source\AmazonPollyMetaHuman\ThirdParty\AwsSdk\Win64\bin\aws-c-auth.dll' does not exist
       while creating runtime dependencies for module 'AmazonPollyMetaHuman'
LogInit: Warning: Still incompatible or missing module: AmazonPollyMetaHuman
LogCore: Engine exit requested (reason: EngineExit() was called)
LogExit: Preparing to exit.
LogModuleManager: Shutting down and abandoning module DesktopPlatform (48)
yoav-libal commented 1 year ago

Krxtopher solution worked for me.

Many thanks

stevedipaola commented 1 year ago

Hi @abuelgasimsaadeldin

simply move the Win64 folder (which is created by the *.bat file) which for me was sitting on main directory - down into this folder where it is expecting it itSource\AmazonPollyMetaHuman\ThirdParty\AwsSdk\Win64\

ffli commented 1 year ago

Hi, if i run the c++ sdk bash to dowload the sdk source and library, should i rebuild the sdk by cmake? In my local sdk file, there is not win64 file and when i rebuild the project, the error info will be occured. upload

Krxtopher commented 1 year ago

The bash script should take care of both downloading and compiling the SDK. Try running the bash script via command line (instead of double-clicking it). This will allow you to see the output of the script which may provide a clue on where it is failing.

Did you follow my advice above to make sure you aren't running into Windows file path length issues?

ffli commented 1 year ago

The bash script should take care of both downloading and compiling the SDK. Try running the bash script via command line (instead of double-clicking it). This will allow you to see the output of the script which may provide a clue on where it is failing.

Did you follow my advice above to make sure you aren't running into Windows file path length issues?

Yes, the file path is the E:/polly/polly-metahuman, is very short. The problem is when i run the bash script, the sdk downloading and build has some errors. build1 cmake1

Krxtopher commented 1 year ago

Are you able to provide an english translation for the text in the second image?

VegaBai commented 1 year ago

I got the same error, and I checked it seems the "ሴ" character is causing the break. how to deal with this? G:\bb\aws-sdk-cpp\aws-cpp-sdk-core-tests\http\URITest.cpp(1,1): error C2220: the following warning is treated as an err or [G:\bb\aws-sdk-cpp\_build\aws-cpp-sdk-core-tests\aws-cpp-sdk-core-tests.vcxproj] G:\bb\aws-sdk-cpp\aws-cpp-sdk-core-tests\http\URITest.cpp(1,1): warning C4819: The file contains a character that canno t be represented in the current code page (936). Save the file in Unicode format to prevent data loss [G:\bb\aws-sdk-cp p\_build\aws-cpp-sdk-core-tests\aws-cpp-sdk-core-tests.vcxproj] G:\bb\aws-sdk-cpp\aws-cpp-sdk-core-tests\http\URITest.cpp(228,12): error C2001: newline in constant [G:\bb\aws-sdk-cpp\ _build\aws-cpp-sdk-core-tests\aws-cpp-sdk-core-tests.vcxproj] G:\bb\aws-sdk-cpp\aws-cpp-sdk-core-tests\http\URITest.cpp(229,5): error C2143: syntax error: missing ';' before 'switch ' [G:\bb\aws-sdk-cpp\_build\aws-cpp-sdk-core-tests\aws-cpp-sdk-core-tests.vcxproj] G:\bb\aws-sdk-cpp\aws-cpp-sdk-core-tests\http\URITest.cpp(249,11): error C2001: newline in constant [G:\bb\aws-sdk-cpp\ _build\aws-cpp-sdk-core-tests\aws-cpp-sdk-core-tests.vcxproj] G:\bb\aws-sdk-cpp\aws-cpp-sdk-core-tests\http\URITest.cpp(250,5): error C2143: syntax error: missing ';' before 'switch ' [G:\bb\aws-sdk-cpp\_build\aws-cpp-sdk-core-tests\aws-cpp-sdk-core-tests.vcxproj]

-------------EDIT----------- above error seems a git pull issue from the .bat file, after I did a manual git pull, the .bat file ran successfully and generated a Win64 folder. I left the folder in Source\AmazonPollyMetaHuman\ThirdParty\AwsSdk\. But then I still not able to open the project, the log shows that Failed to preload '(projectPath)/Binaries/Win64/aws-c-auth.dll' (GetLastError=126), Missing import: aws-c-sdkutils.dll. Then the polly module won't be loaded correctly, and not able to open the project. Then I copied the aws-c-sdkutils.dll from previous built Win64\bin folder to the (projectPath)/Binaries/Win64/. Then it will crash on 95% loading.....

Any ideas? Thanks!

CemCanbolat commented 1 year ago

I'm having the same exact problem I moved the amazon-polly-metahumans to C:\UnrealProjects and the deleted the aws-sdk-cpp. It says the file doesn't contain CMakelists.txt. How should've I configured the CMake? I'm on windows

InfiniteWes commented 1 year ago

Hello, I have followed all of the steps to compiling the Polly C++ SDK, but when I run the .bat file in a shorter file path, it does not generate the Win64 folder anywhere.

-Update, I still cannot get the .bat script to run correctly, and I keep getting fatal errors throughout downloading the script?

Screenshot 2023-05-10 152826
itaeyeon commented 10 months ago

Like my case, especially in non-English language windows system, the batch file seems not to get the git repository properly.

I did use GitHub Desktop application and get the repositories manually. (1) git clone https://github.com/aws-samples/amazon-polly-metahumans.git set local path as short like: C:\polly-metahumans (thanks to [Krxtopher]) (2) git clone https://github.com/aws/aws-sdk-cpp.git set local path to C:\polly-metahumans\Source\AmazonPollyMetaHuman\ThirdParty\AwsSdk\aws-sdk-cpp After cloning all repositories, try to compile using the batch file. C:\polly-metahumans\Source\AmazonPollyMetaHuman\ThirdParty\AwsSdk\BuildAwsSdkWin64.bat I could compile the SDK clearly.

But when trying open the project in UE, the project crashed. So, copied C:\polly-metahumans\Source\AmazonPollyMetaHuman\ThirdParty\AwsSdk\Win64 folder to C:\polly-metahumans\Binaries\Win64 manually. (thanks to [VegaBai])

After all this, I could open the UE project under UE 4.26.2 successfully. (As I did receive a lot of help from here, I would like to leave my case for others to benefit from.)

BlockchainPunks commented 10 months ago

anyone one have this working with unreal engine 5 - please share steps to upgrade project for unreal engine 5

BlockchainPunks commented 10 months ago

Hi @Krxtopher,

Thanks for the reply, I went back to the project and ran it one more time following your instructions and the BuildAwsSdkWin64.bat script was able to compile successfully this time, however, I do receive the following error message when trying to run the AmazonPollyMetaHuman.uproject:

image

Here are the logs:

ERROR: Unhandled exception: Source file 'C:\UnrealProjects\amazon-polly-metahumans\Source\AmazonPollyMetaHuman\ThirdParty\AwsSdk\Win64\bin\aws-c-auth.dll' does not exist
       while creating runtime dependencies for module 'AmazonPollyMetaHuman'
LogInit: Warning: Still incompatible or missing module: AmazonPollyMetaHuman
LogCore: Engine exit requested (reason: EngineExit() was called)
LogExit: Preparing to exit.
LogModuleManager: Shutting down and abandoning module DesktopPlatform (48)

Did you manage to resolve this. Having same issue with unreal engine 5.2

darkmapper commented 7 months ago

Hi @abuelgasimsaadeldin

simply move the Win64 folder (which is created by the *.bat file) which for me was sitting on main directory - down into this folder where it is expecting it it Source\AmazonPollyMetaHuman\ThirdParty\AwsSdk\Win64\

After this when I start Ue file it displays an error that " Module Not complied correctly or plugin not activated "