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
Comments
Here, failing 3 times in a row in the last day https://github.com/OSGeo/grass/actions/runs/9032826748/job/24852093817 |
Just a wild guess, but maybe the system includes changed and we are not
including memory include explicitly.
```
In file included from
D:/a/grass/grass/dist.x86_64-w64-mingw32/include/grass/defs/gis.h:69,
2024-05-11T13:21:16.6173838Z from
D:/a/grass/grass/dist.x86_64-w64-mingw32/include/grass/gis.h:725,
2024-05-11T13:21:16.6186814Z from aspect.c:27: 2024-05-11T13:21:16.6195740Z
C:\msys64\mingw64\include/sys/stat.h: In function '_fstat64i32':
2024-05-11T13:21:16.6198157Z C:\msys64\mingw64\include/sys/stat.h:80:7:
error: implicit declaration of function 'memset'
[-Wimplicit-function-declaration] 2024-05-11T13:21:16.6201217Z 80 |
memset(_Stat,0,sizeof(struct _stat64i32)); 2024-05-11T13:21:16.6213250Z |
^~~~~~ 2024-05-11T13:21:16.6214461Z
C:\msys64\mingw64\include/sys/stat.h:59:1: note: include '<string.h>' or
provide a declaration of 'memset' 2024-05-11T13:21:16.6215765Z 58 |
#include <_mingw_stat64.h> 2024-05-11T13:21:16.6216473Z +++ |+#include
<string.h> 2024-05-11T13:21:16.6217314Z 59 | 2024-05-11T13:21:16.6231741Z
In file included from
D:/a/grass/grass/dist.x86_64-w64-mingw32/include/grass/segment.h:7,
2024-05-11T13:21:16.6232927Z from r.flow.h:35, 2024-05-11T13:21:16.6233691Z
from aspect.c:28: 2024-05-11T13:21:16.6234581Z
C:\msys64\mingw64\include/unistd.h: In function 'ftruncate':
2024-05-11T13:21:16.6236423Z C:\msys64\mingw64\include/unistd.h:67:10:
error: implicit declaration of function '_chsize'; did you mean '_msize'?
[-Wimplicit-function-declaration] 2024-05-11T13:21:16.6238086Z 67 | return
_chsize (__fd, __length); 2024-05-11T13:21:16.6238847Z | ^~~~~~~
2024-05-11T13:21:16.6239445Z | _msize 2024-05-11T13:21:16.6525853Z sed -e
***@***.***@/r.fill.dir/' \ 2024-05-11T13:21:16.6533554Z -e ***@***.***_MAJOR@/8/'
\ 2024-05-11T13:21:16.6545704Z -e ***@***.***_MINOR@/4/' \
2024-05-11T13:21:16.6546812Z -e ***@***.***_RELEASE@/0dev/' \
2024-05-11T13:21:16.6597583Z ../../mswindows/generic.manifest.rc.in >
OBJ.x86_64-w64-mingw32/r.fill.dir.manifest.rc 2024-05-11T13:21:16.6718991Z
make[4]: *** [../../include/Make/Compile.make:32:
OBJ.x86_64-w64-mingw32/aspect.o] Error 1 2024-05-11T13:21:16.6720135Z
make[4]: Leaving directory '/d/a/grass/grass/raster/r.flow'
2024-05-11T13:21:16.6768033Z make -C r.geomorphon || echo
/d/a/grass/grass/raster/r.geomorphon >> /d/a/grass/grass/error.log
2024-05-11T13:21:16.7146242Z sed ***@***.***@/r.fill.dir/'
../../mswindows/generic.manifest >
OBJ.x86_64-w64-mingw32/r.fill.dir.exe.manifest 2024-05-11T13:21:16.7288490Z
make[4]: Entering directory '/d/a/grass/grass/raster/r.geomorphon'
2024-05-11T13:21:16.7706907Z windres
--input=OBJ.x86_64-w64-mingw32/r.fill.dir.manifest.rc --input-format=rc
--output=OBJ.x86_64-w64-mingw32/r.fill.dir.manifest.res
--output-format=coff -I../../mswindows 2024-05-11T13:21:16.7945457Z test -d
OBJ.x86_64-w64-mingw32 || mkdir -p OBJ.x86_64-w64-mingw32
```
|
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 |
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 |
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):
On the other hand, the error seems to come from
|
This is indeed a result of the update to GCC 14. Temporary workaround may be to set |
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.
The text was updated successfully, but these errors were encountered: