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

[Bug] Windows CI builds fail to compile r.flow #3700

Closed
echoix opened this issue May 11, 2024 · 6 comments · Fixed by #3708
Closed

[Bug] Windows CI builds fail to compile r.flow #3700

echoix opened this issue May 11, 2024 · 6 comments · Fixed by #3708
Labels
bug Something isn't working CI Continuous integration Windows Microsoft Windows specific
Milestone

Comments

@echoix
Copy link
Member

echoix commented May 11, 2024

Describe the bug

Since last commit 43be353 yesterday r.flow fail on windows CI builds. It also fails the same way for the new PR #3699

I reran the build on the commit and the PR, and still fail at the same place. I'm rerunning again the run on the commit on main.

@echoix echoix added bug Something isn't working CI Continuous integration labels May 11, 2024
@echoix
Copy link
Member Author

echoix commented May 11, 2024

Here, failing 3 times in a row in the last day https://github.com/OSGeo/grass/actions/runs/9032826748/job/24852093817

@echoix echoix added the Windows Microsoft Windows specific label May 11, 2024
@wenzeslaus
Copy link
Member

wenzeslaus commented May 11, 2024 via email

@echoix
Copy link
Member Author

echoix commented May 12, 2024

I see in the msys2 changelog that the toolchain has been upgraded from GCC 13.2 to GCC 14.1. I will continue to read on what that implies

@echoix
Copy link
Member Author

echoix commented May 13, 2024

I tried yesterday enabling extra errors in the Ubuntu builds to match the new errors that are enabled by default in GCC 14 (not gcc 14 only ones), but the jobs didn't fail...

Is there anyone else that runs a rolling release and already has GCC 14 (released a couple days ago) that can confirm if it only windows or on Linux too?

I know that at least a #include <string.h> is needed somewhere, but can't decide the best place for it.

@wenzeslaus
Copy link
Member

...but can't decide the best place for it.

I think it simply is: When you need something defined in header A, then include header A even if you are also including header B which include header A (i.e., do not rely on transitive includes).

In this case, it seems like something in r.flow uses memcpy from string.h without including it. Now, when I can better read the message (on desktop), I can see that the compiler provides a helpful message (at least it looks like that):

...note: include '<string.h>' or provide a declaration of 'memset'

On the other hand, the error seems to come from include/sys/stat.h (a system file) not GRASS code:

C:\msys64\mingw64\include/sys/stat.h:80:7: error: implicit declaration of function 'memset'

@nilason
Copy link
Contributor

nilason commented May 14, 2024

This is indeed a result of the update to GCC 14. Temporary workaround may be to set -Wno-error=implicit-function-declaration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CI Continuous integration Windows Microsoft Windows specific
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants