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

Build failure on Alpine with fortify-headers #3299

Closed
1 task done
fossdd opened this issue Feb 13, 2025 · 6 comments
Closed
1 task done

Build failure on Alpine with fortify-headers #3299

fossdd opened this issue Feb 13, 2025 · 6 comments
Labels
bug This issue is a bug. p2 This is a standard priority issue pending-release This issue will be fixed by an approved PR that hasn't been released yet.

Comments

@fossdd
Copy link

fossdd commented Feb 13, 2025

Describe the bug

Hi, I'm a Alpine Linux contributor. I was packaging the upgrade from 1.11.400 to the latest release, but noticed the following build failure:

I would appreciate if you could give me hints what might me wrong here. We build our package using fortify-headers.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

It builds.

Current Behavior

ninja: job failed: : && /usr/bin/g++ -Os -fstack-clash-protection -Wformat -Werror=format-security -D_GLIBCXX_ASSERTIONS=1 -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS=1 -D_LIBCPP_ENABLE_HARDENED_MODE=1 -fno-plt -flto=auto -U_GLIBCXX_ASSERTIONS -Wl,--as-needed,-O1,--sort-common -Wl,-z,pack-relative-relocs tests/aws-cpp-sdk-kinesis-integration-tests/CMakeFiles/aws-cpp-sdk-kinesis-integration-tests.dir/KinesisTests.cpp.o tests/aws-cpp-sdk-kinesis-integration-tests/CMakeFiles/aws-cpp-sdk-kinesis-integration-tests.dir/RunTests.cpp.o -o tests/aws-cpp-sdk-kinesis-integration-tests/aws-cpp-sdk-kinesis-integration-tests  -Wl,-rpath,/builds/fossdd/aports/community/aws-sdk-cpp/src/aws-sdk-cpp-1.11.505/build/generated/src/aws-cpp-sdk-kinesis:/builds/fossdd/aports/community/aws-sdk-cpp/src/aws-sdk-cpp-1.11.505/build/tests/testing-resources:/builds/fossdd/aports/community/aws-sdk-cpp/src/aws-sdk-cpp-1.11.505/build/src/aws-cpp-sdk-core  generated/src/aws-cpp-sdk-kinesis/libaws-cpp-sdk-kinesis.so.1.11.505  tests/testing-resources/libtesting-resources.so  src/aws-cpp-sdk-core/libaws-cpp-sdk-core.so.1.11.505  /usr/lib/libaws-crt-cpp.so  /usr/lib/libaws-c-mqtt.so.1.0.0  /usr/lib/libaws-c-event-stream.so.1.0.0  /usr/lib/libaws-c-s3.so.1.0.0  /usr/lib/libaws-c-auth.so.1.0.0  /usr/lib/libaws-c-http.so.1.0.0  /usr/lib/libaws-c-io.so.1.0.0  /usr/lib/libs2n.so.1.0.0  /usr/lib/libaws-c-cal.so.1.0.0  /usr/lib/libcrypto.so  /usr/lib/libaws-checksums.so.1.0.0  /usr/lib/libaws-c-compression.so.1.0.0  /usr/lib/libaws-c-sdkutils.so.1.0.0  /usr/lib/libaws-c-common.so.1.0.0  -ldl  -lm  -lrt  -lpthread && :
/usr/include/fortify/stdio.h: In function '__to_xstring.constprop':
/usr/include/fortify/stdio.h:73:28: error: inlining failed in call to 'always_inline' 'vsnprintf': function body can be overwritten at link time
   73 | _FORTIFY_FN(vsnprintf) int vsnprintf(char * _FORTIFY_POS0 __s, size_t __n,
      |                            ^
/usr/include/c++/14.2.0/ext/string_conversions.h:113:32: note: called from here
  113 |       const int __len = __convf(__s, __n, __fmt, __args);
      |                                ^

Reproduction Steps

The exact build recipe is here: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/79324

There are no functional changes between the two versions

Possible Solution

No response

Additional Information/Context

No response

AWS CPP SDK version used

latest (1.11.505), but also failed with 1.11.497

Compiler and Version used

gcc (Alpine 14.2.0) 14.2.0

Operating System and version

Alpine Linux edge

@fossdd fossdd added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 13, 2025
@sbiscigl
Copy link
Contributor

sbiscigl commented Feb 14, 2025

since its building kinesis i would guess it has somethign to do with #3245 as that was in version 1.11.488, let me replicate it and start looking for a fix

@sbiscigl sbiscigl added the needs-reproduction This issue needs reproduction. label Feb 14, 2025
@sbiscigl
Copy link
Contributor

sbiscigl commented Feb 14, 2025

was able to replicate with the following dockerfile looking into it

FROM alpine:3.14

RUN apk add --update alpine-sdk cmake zlib-dev curl-dev

RUN git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp && \
    cd aws-sdk-cpp && \
    mkdir build && \
    cd build && \
    cmake -DCMAKE_CXX_FLAGS="-flto=auto" \
      -DCMAKE_CXX_FLAGS="-flto=auto -U_GLIBCXX_ASSERTIONS" \
      -DBUILD_ONLY="kinesis"  && \
      -DAUTORUN_UNIT_TESTS=OFF .. && \
    cmake --build .

@sbiscigl sbiscigl added p2 This is a standard priority issue and removed needs-reproduction This issue needs reproduction. needs-triage This issue or PR still needs to be triaged. labels Feb 14, 2025
@sbiscigl sbiscigl mentioned this issue Feb 14, 2025
11 tasks
@sbiscigl
Copy link
Contributor

alright I have a PR up for a fix, should be resovled as we merge it, will also take this time to add this to our CI pipeline so that we dont break you as much

@sbiscigl sbiscigl added pending-release This issue will be fixed by an approved PR that hasn't been released yet. p2 This is a standard priority issue and removed p2 This is a standard priority issue labels Feb 14, 2025
@fossdd
Copy link
Author

fossdd commented Feb 14, 2025

Thank you very much! I can verify that the patch does fix the test.

@sbiscigl
Copy link
Contributor

nice! just merged it to main, should get a tag this afternoon in the daily release so that you can pull in, will add alpine to our CI, should have already been there. resolving this for now though, give a shout if you have anymore questions!

Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

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. p2 This is a standard priority issue pending-release This issue will be fixed by an approved PR that hasn't been released yet.
Projects
None yet
Development

No branches or pull requests

2 participants