Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not compile transcribe with CURL support with Visual Studio 2022 #2855

Open
rventuri76 opened this issue Feb 13, 2024 · 3 comments
Open
Assignees
Labels
bug This issue is a bug. build-problem problems with building this sdk closing-soon This issue will automatically close in 4 days unless further comments are made. p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 2 days.

Comments

@rventuri76
Copy link

rventuri76 commented Feb 13, 2024

Describe the bug

Hi I’m trying to compile cpp SDK on widows with CURL to get transcribe api to work with http2.
I’m following this documentation:
https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/setup-windows.html

I have Visual studio 2022 community edition and I tried using cmake 3.21 as well as cmake included and i got errors in the step 6 when i have to run “cmake --build . --config=Debug”

The error is the following:

C:\DATA\DEV\aws-sdk-build\aws-sdk-cpp\src\aws-cpp-sdk-core\source\http\curl\CurlHttpClient.cpp(97,5): error C3861: 'memset_s': identifier not found [
C:\DATA\DEV\aws-sdk-build\build\src\aws-cpp-sdk-core\aws-cpp-sdk-core.vcxproj]

I tried to change the source code of CurlHttpClient and force it to use memset
then i got this other error:

C:\DATA\DEV\aws-sdk-build\aws-sdk-cpp\src\aws-cpp-sdk-core\source\http\curl\CurlHttpClient.cpp(378,51): error C2220: the following warning is treated
 as an error [C:\DATA\DEV\aws-sdk-build\build\src\aws-cpp-sdk-core\aws-cpp-sdk-core.vcxproj]
C:\DATA\DEV\aws-sdk-build\aws-sdk-cpp\src\aws-cpp-sdk-core\source\http\curl\CurlHttpClient.cpp(378,51): warning C4459: declaration of 'offset' hides 
global declaration [C:\DATA\DEV\aws-sdk-build\build\src\aws-cpp-sdk-core\aws-cpp-sdk-core.vcxproj]
C:\DATA\DEV\aws-sdk-build\aws-sdk-cpp\src\aws-cpp-sdk-core\source\http\curl\CurlHttpClient.cpp(32,15): message : see declaration of 'offset' [C:\DATA
\DEV\aws-sdk-build\build\src\aws-cpp-sdk-core\aws-cpp-sdk-core.vcxproj]

fix that as well and finally got into this:

 Building Custom Rule C:/DATA/DEV/aws-sdk-build/aws-sdk-cpp/generated/src/aws-cpp-sdk-textract/CMakeLists.txt
  ub_TEXTRACT.cpp
     Creating library C:/DATA/DEV/aws-sdk-build/build/generated/src/aws-cpp-sdk-textract/Debug/aws-cpp-sdk-textract.lib and object C:/DATA/DEV/aws-sd
  k-build/build/generated/src/aws-cpp-sdk-textract/Debug/aws-cpp-sdk-textract.exp
  aws-cpp-sdk-textract.vcxproj -> C:\DATA\DEV\aws-sdk-build\build\bin\Debug\aws-cpp-sdk-textract.dll
  Building Custom Rule C:/DATA/DEV/aws-sdk-build/aws-sdk-cpp/generated/tests/textract-gen-tests/CMakeLists.txt
  RunTests.cpp
  TextractEndpointProviderTests.cpp
  textract-gen-tests.vcxproj -> C:\DATA\DEV\aws-sdk-build\build\bin\Debug\textract-gen-tests.exe
  Exit code 0xc0000135
  
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: The command "set 
local [C:\DATA\DEV\aws-sdk-build\build\generated\tests\textract-gen-tests\textract-gen-tests.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: "C:\Program File 
s\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E env LD_LIBRARY_PATH=: C:/DATA/DEV/aws-s
dk-build/build/bin/Debug/textract-gen-tests.exe --gtest_brief=1 [C:\DATA\DEV\aws-sdk-build\build\generated\tests\textract-gen-tests\textract-gen-test 
s.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel%  
neq 0 goto :cmEnd [C:\DATA\DEV\aws-sdk-build\build\generated\tests\textract-gen-tests\textract-gen-tests.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmEnd [C:\DATA\ 
DEV\aws-sdk-build\build\generated\tests\textract-gen-tests\textract-gen-tests.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: endlocal & call  
:cmErrorLevel %errorlevel% & goto :cmDone [C:\DATA\DEV\aws-sdk-build\build\generated\tests\textract-gen-tests\textract-gen-tests.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmErrorLevel [C 
:\DATA\DEV\aws-sdk-build\build\generated\tests\textract-gen-tests\textract-gen-tests.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: exit /b %1 [C:\D 
ATA\DEV\aws-sdk-build\build\generated\tests\textract-gen-tests\textract-gen-tests.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmDone [C:\DATA 
\DEV\aws-sdk-build\build\generated\tests\textract-gen-tests\textract-gen-tests.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel%  
neq 0 goto :VCEnd [C:\DATA\DEV\aws-sdk-build\build\generated\tests\textract-gen-tests\textract-gen-tests.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :VCEnd" exited w 
ith code 1. [C:\DATA\DEV\aws-sdk-build\build\generated\tests\textract-gen-tests\textract-gen-tests.vcxproj]

Expected Behavior

have the sdk compiled successfully with CURL support

Current Behavior

Some compilation errors and a general failure

Reproduction Steps

cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_ONLY=transcribe;transcribestreaming -DCUSTOM_MEMORY_MANAGEMENT=ON -DFORCE_CURL=ON -DCURL_INCLUDE_DIR="C:/DATA/TOOLS/curl/include" -DCURL_LIBRARY="C:/DATA/TOOLS/curl/lib/libcurl.dll.a"s -DCMAKE_INSTALL_PREFIX="%SDK_INSTALL_DIR%"

cmake --build . --config=Debug

Possible Solution

maybe:

  • using memset instead of memset_s in src\aws-cpp-sdk-core\source\http\curl\CurlHttpClient.cpp(97,5)
  • rename params offset at src\aws-cpp-sdk-core\source\http\curl\CurlHttpClient.cpp(387) as it conflicts with what defined at line 32
  • disable testing

Additional Information/Context

No response

AWS CPP SDK version used

1.11.263

Compiler and Version used

Visual Studio 2022 Community

Operating System and version

Windows server 2022

@rventuri76 rventuri76 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 13, 2024
@rventuri76 rventuri76 changed the title Can not compile textract with CURL support with Visual Studio 2022 Can not compile transcribe with CURL support with Visual Studio 2022 Feb 13, 2024
@jmklix
Copy link
Member

jmklix commented Apr 5, 2024

Thanks for the detailed issue and repro steps. I can reproduce almost exactly what you are seeing on each step. Looking into what might be causing the final error.

@jmklix jmklix added investigating This issue is being investigated and/or work is in progress to resolve the issue. p2 This is a standard priority issue build-problem problems with building this sdk and removed needs-triage This issue or PR still needs to be triaged. labels Apr 5, 2024
@jmklix jmklix self-assigned this Apr 5, 2024
@jmklix
Copy link
Member

jmklix commented May 24, 2024

I'm working on making a guide for how to build this sdk in visual studio. Can you change the CMake parameters to match what you have above and see if you can get it working?

@jmklix jmklix added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 2 days. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels May 24, 2024
Copy link

github-actions bot commented Jun 4, 2024

Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. build-problem problems with building this sdk closing-soon This issue will automatically close in 4 days unless further comments are made. p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 2 days.
Projects
None yet
Development

No branches or pull requests

2 participants