-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
InitAPI crash in ubuntu 22.04 in latest code #2913
Comments
I've haven't been able to reproduce the same crash that you are seeing in ubuntu 22.04. Are you calling InitApi multiple times? Can you provide more detailed reproduction steps? I used the following samples and I was able to run without any problems: main.cpp #include <iostream>
#include <aws/core/Aws.h>
using namespace std;
using namespace Aws;
int main() {
Aws::SDKOptions options;
options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace;
Aws::InitAPI(options);
{
std::cout << "Test" <<std::endl;
}
Aws::ShutdownAPI(options);
return 0;
} CMakeLists.txt cmake_minimum_required(VERSION 3.22)
project(issue_2913)
set(CMAKE_CXX_STANDARD 20)
find_package(AWSSDK REQUIRED COMPONENTS kms s3 s3-encryption ec2)
add_executable(${PROJECT_NAME} "main.cpp")
target_link_libraries(${PROJECT_NAME} ${AWSSDK_LINK_LIBRARIES}) building the sample
|
I created a new docker and built with below command, still I see the same error can you check if steps are correct? git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp |
It looks like what you're doing is mostly correct, but I had to add a few things to get the container working. Here is the entire dockerfile that I used to test this. Please let me know if this doesn't work for you: FROM ubuntu:22.04
#install deps
RUN apt-get update
RUN apt-get install -y git cmake zlib1g-dev libssl-dev libcurl4-openssl-dev build-essential
#clone and build sdk
RUN git clone --depth 1 --recurse-submodules https://github.com/aws/aws-sdk-cpp && \
cd aws-sdk-cpp && \
mkdir build && \
cd build && \
cmake -DAUTORUN_UNIT_TESTS=OFF -DBUILD_ONLY="kms;s3;s3-encryption;ec2" .. && \
cmake --build . && \
cmake --install .
#copy code and build sample application
RUN mkdir sdk-example
COPY CMakeLists.txt sdk-example/CMakeLists.txt
COPY main.cpp sdk-example/main.cpp
RUN cd sdk-example && \
mkdir build && \
cd build && \
cmake .. && \
cmake --build .
ENTRYPOINT [ "./sdk-example/build/issue_2913" ] |
Was ablt to build and init aws SDK with above commands Thanks, now it it initing |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
I built the aws cpp sdk and on initAPI it is crashing
below is the dump
Expected Behavior
should not crash
Current Behavior
crash
Reproduction Steps
call InitAPI()
Possible Solution
No response
Additional Information/Context
No response
AWS CPP SDK version used
1.11.293
Compiler and Version used
gcc version 11.4.0
Operating System and version
ubuntu 22.04
The text was updated successfully, but these errors were encountered: