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

Scary compile errors/warnings on alpine linux #3769

Open
AlexanderSchuetz97 opened this issue Jul 22, 2024 · 2 comments
Open

Scary compile errors/warnings on alpine linux #3769

AlexanderSchuetz97 opened this issue Jul 22, 2024 · 2 comments

Comments

@AlexanderSchuetz97
Copy link

This is the error:

[185/190] Linking target codec/console/dec/h264dec
In file included from ../subprojects/googletest-release-1.8.0/googletest/include/gtest/internal/gtest-port.h:263,
                 from ../subprojects/googletest-release-1.8.0/googletest/include/gtest/internal/gtest-internal.h:40,
                 from ../subprojects/googletest-release-1.8.0/googletest/include/gtest/gtest.h:58,
                 from ../test/api/encode_decode_api_test.cpp:1:
In function 'void* memset(void*, int, size_t)',
    inlined from 'int SimulateNALLoss(const unsigned char*, int&, std::vector<SLost_Sim>*, const char*, bool, int&, bool&)' at ../test/api/encode_decode_api_test.cpp:387:10:
/usr/include/fortify/string.h:75:32: warning: 'void* __builtin_memset(void*, int, long unsigned int)' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
   75 |         return __builtin_memset(__d, __c, __n);
      |                ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
[186/190] Linking target test/encoder/test_encoder

This is some buffer overflow error?

The error is present in the current "head/master" of the git repo and the last release tarball and can be reproduced with an alpine linux docker container.
This is the Dockerfile I am using for the container that gets this error:

FROM alpine:latest
RUN apk add nasm git alpine-sdk bash cmake ninja meson perl autoconf automake libtool gperf xz libogg yasm diffutils gawk linux-headers asciidoc doxygen xmlto

To compile I run:

mkdir -p openh264/build
cd openh264/build
meson setup --default-library=static .. --prefix "/project/target" --libdir="/project/target/lib"
ninja

Using the git repositorys head, the ninja build fails because the warning is treated as error.
Using the last source tarball I get a warning with the same content but the build continues.

@aljam3h
Copy link

aljam3h commented Sep 16, 2024

هذا هو الخطأ:

[185/190] Linking target codec/console/dec/h264dec In file include…

@AlexanderSchuetz97
Copy link
Author

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants