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

win: patch from OSGeo4W applied #4121

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Conversation

landam
Copy link
Member

@landam landam commented Jul 31, 2024

@landam landam self-assigned this Jul 31, 2024
@landam landam marked this pull request as draft July 31, 2024 17:01
@landam landam added this to the 8.4.1 milestone Jul 31, 2024
@landam landam added the windows Microsoft Windows specific label Jul 31, 2024
@github-actions github-actions bot added the CI Continuous integration label Jul 31, 2024
@neteler
Copy link
Member

neteler commented Jul 31, 2024

A dependency yet missing?

From the CI log:

...
configure: error: *** couldn't find libpng-config
Error: Process completed with exit code 1.

@nilason
Copy link
Contributor

nilason commented Jul 31, 2024

A dependency yet missing?

From the CI log:

...
configure: error: *** couldn't find libpng-config
Error: Process completed with exit code 1.

Not a dependency, but https://github.com/OSGeo/grass/blob/main/mswindows/osgeo4w/libpng-config (see #2679).

ldesousa and others added 4 commits July 31, 2024 21:46
Add basic tests for GeoPackage and Shapefile export which use import to test the result (so they test round trip but focus on the export).
@jef-n
Copy link
Contributor

jef-n commented Aug 1, 2024

Note that build_osgeo4w.sh and osgeo4w.yml are GRASS things, that are not used in osgeo4w - they were just aligned with package.sh, which actually is.

@landam landam changed the title Patch from OSGeo4W applied win: patch from OSGeo4W applied Aug 4, 2024
@landam
Copy link
Member Author

landam commented Aug 4, 2024

After reintroducing mingw-w64-x86_64-libpng the CI pass successfully.

@jef-n Please could you elaborate why you are removing this dependency in the workflow (https://github.com/jef-n/OSGeo4W/blob/master/src/grass/osgeo4w/patch#L9)? On the other side it's installed in package.sh (https://github.com/jef-n/OSGeo4W/blob/master/src/grass/osgeo4w/package.sh#L101)

@jef-n
Copy link
Contributor

jef-n commented Aug 5, 2024

After reintroducing mingw-w64-x86_64-libpng the CI pass successfully.

@jef-n Please could you elaborate why you are removing this dependency in the workflow (https://github.com/jef-n/OSGeo4W/blob/master/src/grass/osgeo4w/patch#L9)? On the other side it's installed in package.sh (https://github.com/jef-n/OSGeo4W/blob/master/src/grass/osgeo4w/package.sh#L101)

um, osgeo4w has libpng. not sure why it was only removed from build_osgeo4w.sh. As said I don't use that. Maybe I wanted to replace msys libpng with's OSGeo4W's png, replaced it in both and failed to re-add it in build_osgeo4w.sh, when I found that it was not working. But I don't recall… In OSGeo4W it's just a patch to an unused file ;)

jef-n added a commit to jef-n/OSGeo4W that referenced this pull request Aug 5, 2024
@jef-n
Copy link
Contributor

jef-n commented Aug 5, 2024

There was a change in libpng that broke our copy of libpng-config - adapted.

@landam
Copy link
Member Author

landam commented Aug 22, 2024

Any idea why osgeo4w CI is failing on tests while compilation is successful? It seems to be unrelated to this PR...

@echoix
Copy link
Member

echoix commented Aug 22, 2024

There were a lot more failed files, like 58% of files passed, instead of 81%

@github-actions github-actions bot added GUI wxGUI related docker Docker related vector Related to vector data processing raster Related to raster data processing temporal Related to temporal data processing Python Related code is in Python labels Aug 22, 2024
@landam landam removed raster Related to raster data processing temporal Related to temporal data processing Python Related code is in Python C Related code is in C C++ Related code is in C++ HTML Related code is in HTML database Related to database management libraries module docs general display imagery tests Related to Test Suite raster3d notebook labels Aug 22, 2024
@landam
Copy link
Member Author

landam commented Aug 22, 2024

Any idea why osgeo4w CI is failing on tests while compilation is successful? It seems to be unrelated to this PR...

Solved by b435503

@landam landam marked this pull request as ready for review August 22, 2024 20:52
@echoix
Copy link
Member

echoix commented Aug 22, 2024

There seems to be a bad rebase somewhere, there are some unrelated commits in the PR. (It doesn't really matter if we adjust the squashed commit message)

Was there a logic in the new order of the OSGeo4W dependencies, was it in the patch that it was in that order? It's not alphabetical neither, I don't find the logic. I'll try to compare manually which ones are changed, as word-based diff highlighting doesn't show the changes clearly.

Copy link
Contributor

@nilason nilason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me in general. I have some thoughts on one change, which I'd like to look into though.

@@ -234,7 +234,7 @@ USE_PTHREAD = @USE_PTHREAD@
#OpenMP
OPENMP_INCPATH = @OPENMP_INCPATH@
OPENMP_LIBPATH = @OPENMP_LIBPATH@
OPENMP_LIB = @OPENMP_LIB@
OPENMP_LIB = @OPENMP_CFLAGS@ @OPENMP_LIB@
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@OPENMP_CFLAGS@ shouldn't be needed to be added to OPENMP_LIB (?!), OPENMP_CFLAGS should be added to Makefiles that need it (via EXTRA_CFLAGS).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested successfully locally without this change. There should be no need to add OPENMP_CFLAGS to OPENMP_LIB.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the contrary, I tried using the package.sh build on CI, more closer to OSGeo4W build, and I had some gomp errors: https://github.com/echoix/grass/actions/runs/10641753457/job/29503311365?pr=207#step:9:1864

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we document somewhere why and which DLL is needed to include in the winGRASS package? IIRC I was involved in a trial/error-way to check which of the DLLs we added finally back then.

@@ -248,7 +241,9 @@ if [ -n "$PACKAGE_PATCH" ]; then

# copy dependencies (TODO: to be reduced)
cp -uv $DLLS apps/grass/grass$POSTFIX/bin
cp -uv /mingw64/etc/fonts/fonts.conf apps/grass/grass$POSTFIX/etc

# copy R batch files
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be checked whether we include these files already in another way, e.g. in the NSIS installer-

@@ -8,6 +8,8 @@ REM Uncomment if you want to use Bash instead of Cmd
REM Note that msys package must be also installed
REM set GRASS_SH=%OSGEO4W_ROOT%\apps\msys\bin\sh.exe

set PYTHONPATH=%OSGEO4W_ROOT%\apps\grass\grass@POSTFIX@\etc\python;%PYTHONPATH%
set GRASS_COMPATIBILITY_TEST=0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this mean?

Copy link
Member

@hellik hellik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see my inline comments for a final check

@nilason
Copy link
Contributor

nilason commented Aug 26, 2024

Was there a logic in the new order of the OSGeo4W dependencies, was it in the patch that it was in that order? It's not alphabetical neither, I don't find the logic. I'll try to compare manually which ones are changed, as word-based diff highlighting doesn't show the changes clearly.

The current changes are:

 cairo-devel
-fftw
 freetype-devel
 gdal-devel
-gdal-ecw
-gdal-mrsid
 geos-devel
+libjpeg-turbo-devel
 liblas-devel
 libpng-devel
 libpq-devel
 libtiff-devel
-libxdr
 netcdf-devel
-pdal-devel
-pdcurses
 proj-devel
-python3-matplotlib
+python3-core
 python3-numpy
 python3-ply
 python3-pywin32
+python3-six
 python3-wxpython
-regex-devel
+sqlite3-devel
 zstd-devel

@echoix
Copy link
Member

echoix commented Aug 26, 2024

Thanks @nilason! I don't have a strong opinion on the changed dependencies, apart from matplotlib that I thought it was included as a dependency in other builds, but I don't know if it is really used in our modules or just in addons...

@echoix
Copy link
Member

echoix commented Sep 21, 2024

I fixed the conflicts, and took the new deps and sorted them into the action (it would have worked without the multiline list too, but now the diff is clear)

There was one conflict in the configure flags that was recently changed to just have --with-lapack, whilst here it had an include path. Please make sure you agree with my choice

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

Successfully merging this pull request may close these issues.

7 participants