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

Unable to compile with gcc 13 on AMD64 #2794

Closed
sptrakesh opened this issue Dec 16, 2023 · 2 comments
Closed

Unable to compile with gcc 13 on AMD64 #2794

sptrakesh opened this issue Dec 16, 2023 · 2 comments
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@sptrakesh
Copy link

Describe the bug

Building docker image with base Alpine 3.19 fails on linux/amd64 platform (gcc 13). The linux/arm64 build succeeds. Same Dockerfile had worked in the past with Alpine 3.18 (gcc 12). Tried with old version 1.11.159 (which is the previous version I had with Alpine 3.18), and the latest release 1.11.226.

Expected Behavior

Building for platform linux/amd64 completes without error.

Current Behavior

Build fails with segmentation fault.

#14 180.5 cc: internal compiler error: Segmentation fault signal terminated program cc1
#14 180.5 Please submit a full bug report, with preprocessed source (by using -freport-bug).
#14 180.5 See <https://gitlab.alpinelinux.org/alpine/aports/-/issues> for instructions.
#14 180.5 make[2]: *** [crt/aws-crt-cpp/crt/aws-c-compression/CMakeFiles/aws-c-compression.dir/build.make:104: crt/aws-crt-cpp/crt/aws-c-compression/CMakeFiles/aws-c-compression.dir/source/huffman_testing.c.o] Error 4
#14 180.5 make[1]: *** [CMakeFiles/Makefile2:545: crt/aws-crt-cpp/crt/aws-c-compression/CMakeFiles/aws-c-compression.dir/all] Error 2

Reproduction Steps

Dockerfile is as follows:

FROM sptrakesh/cppbase
RUN apk add --no-cache curl curl-dev perl python3 snappy-dev

ENV API_VERSION=1.11.159

WORKDIR /opt
RUN git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp.git --branch ${API_VERSION} --depth 1 \
  && cd aws-sdk-cpp \
  && mkdir build && cd build \
  && cmake \
    -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=mold" -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=mold" \
    -DCMAKE_CXX_STANDARD=20 \
    -DCMAKE_CXX_STANDARD_REQUIRED=ON \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_PREFIX_PATH=/opt/local \
    -DCMAKE_INSTALL_PREFIX=/opt/local \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DFORCE_SHARED_CRT=OFF \
    -DBUILD_SHARED_LIBS=OFF \
    -DENABLE_TESTING=OFF \
    -DCPP_STANDARD=20 \
    -DENABLE_UNITY_BUILD=ON \
    -DBUILD_ONLY="s3" \
    -DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" \
    .. \
  && make -j8 \
  && make install

FROM sptrakesh/cppbase
MAINTAINER Rakesh Vidyadharan <rakesh@sptci.com>

ENV API_VERSION=1.11.159

RUN apk --update --no-cache del perl python3 \
  && apk add --no-cache curl-dev

WORKDIR /opt
COPY --from=0 /opt/local local

Possible Solution

No response

Additional Information/Context

No response

AWS CPP SDK version used

1.11.159

Compiler and Version used

gcc 13.2.1

Operating System and version

Alpine 3.19

@sptrakesh sptrakesh added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 16, 2023
@sptrakesh
Copy link
Author

Never mind, this is a Docker on ARM issue. I ran into these issues building on M2 Mac, and also am able to replicate this on an EC2 Gravitron instance. I was able to get my builds done on an x86 EC2 instance, so not a SDK code issue.

Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

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. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant