-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Update ftl-build container to Alpine v3.21 #100
Conversation
Signed-off-by: DL6ER <[email protected]>
… include the standard headers as well as unistd.h for the write function Signed-off-by: DL6ER <[email protected]>
…s will fail with tput: No value for $TERM and no -T specified Signed-off-by: DL6ER <[email protected]>
RUN curl -sSL https://ftl.pi-hole.net/libraries/termcap-${termcapversion}.tar.gz | tar -xz \ | ||
&& cd termcap-${termcapversion} \ | ||
&& ./configure --enable-static --disable-shared --disable-doc --without-examples \ | ||
&& sed -i '1i #define STDC_HEADERS 1\n#include <unistd.h>' termcap.c tparam.c \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Patching is necessary due to a breaking change in GCC 14:
Implicit function declarations (
-Werror=implicit-function-declaration
)
It is no longer possible to call a function that has not been declared. In general, the solution is to include a header file with an appropriate function prototype. Note that GCC will perform further type checks based on the function prototype, which can reveal further type errors that require additional changes.For well-known functions declared in standard headers, GCC provides fix-it hints with the appropriate
#include
directives:error: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration] 5 | return strlen (s); | ^~~~~~ note: include ‘<string.h>’ or provide a declaration of ‘strlen’ +++ |+#include <string.h> 1 |
On GNU systems, headers described in standards (such as the C standard, or POSIX) may require the definition of certain macros at the start of the compilation before all required function declarations are made available. See Feature Test Macros in the GNU C Library manual for details.
Maybe we should also port the monkey patch from |
@yubiuser As Anything needed in addition? I don't think it needs to be "too pretty" as this isn't something we're looking often at. |
I thought about this part |
@@ -1,4 +1,4 @@ | |||
ARG CONTAINER="alpine:latest" | |||
ARG CONTAINER="alpine:3.21" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
Signed-off-by: DL6ER <[email protected]>
What does this implement/fix?
Update
ftl-build
container to Alpine v3.21HIGHLIGHTS:
As always, the major upgrade to GCC 14.2.0 is the most important reason for us to upgrade our build environment.
As it turned out that quite a few changes were necessary to support Alpine 3.12, I decided it's better to pin the container to a certain version instead of the more generic
latest
. It can always be updated and we can use it to tag a new container when new Alpine versions are released. The PR with the necessary changes for FTL will be opened once this PR is merged and new containers are tagged to update the used build container at the same time in the FTL PR.Related issue or feature (if applicable): N/A
Pull request in docs with documentation (if applicable): N/A
By submitting this pull request, I confirm the following:
git rebase
)Checklist:
developmental
branch.