[GRASS-dev] GRASS 84/85 failing on wingrass.fsv.cvut.cz

Dear all,

recently I discovered, that compilation of GRASS 8.4.1dev and 8.5.0dev versions are failing on wingrass build server:

x86_64-w64-mingw32-gcc -shared -o /usr/src/grass84/dist.x86_64-w64-mingw32/lib/libgrass_interpfl.8.4.dll -L/usr/src/grass84/dist.x86_64-w64-mingw32/lib -L/usr/src/grass84/dist.x86_64-w64-mingw32/lib -Wl,–export-dynamic,–enable-runtime-pseudo-reloc -L/c/osgeo4w/lib OBJ.x86_64-w64-mingw32/distance.o OBJ.x86_64-w64-mingw32/func2d.o OBJ.x86_64-w64-mingw32/init2d.o OBJ.x86_64-w64-mingw32/input2d.o OBJ.x86_64-w64-mingw32/interp2d.o OBJ.x86_64-w64-mingw32/matrix.o OBJ.x86_64-w64-mingw32/minmax.o OBJ.x86_64-w64-mingw32/output2d.o OBJ.x86_64-w64-mingw32/point2d.o OBJ.x86_64-w64-mingw32/resout2d.o OBJ.x86_64-w64-mingw32/ressegm2d.o OBJ.x86_64-w64-mingw32/secpar2d.o OBJ.x86_64-w64-mingw32/segmen2d.o OBJ.x86_64-w64-mingw32/segmen2d_parallel.o OBJ.x86_64-w64-mingw32/vinput2d.o OBJ.x86_64-w64-mingw32/write2d.o -lgrass_gis.8.4 -lintl -lgrass_raster.8.4 -lgrass_vector.8.4 -lgrass_gmath.8.4 -lgrass_dbmiclient.8.4 -lgrass_dbmibase.8.4 -lgrass_bitmap.8.4 -lgrass_qtree.8.4 -lgrass_interpdata.8.4 -lomp
C:/msys64/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/13.2.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: warning: --export-dynamic is not supported for PE+ targets, did you mean --export-all-symbols?
C:/msys64/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/13.2.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: OBJ.x86_64-w64-mingw32/segmen2d_parallel.o: in function IL_interp_segments_2d_parallel._omp_fn.0': C:/msys64/usr/src/grass84/lib/rst/interp_float/segmen2d_parallel.c:108:(.text+0x1bd): undefined reference to GOMP_loop_nonmonotonic_dynamic_start’
C:/msys64/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/13.2.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: C:/msys64/usr/src/grass84/lib/rst/interp_float/segmen2d_parallel.c:143:(.text+0x595): undefined reference to GOMP_loop_nonmonotonic_dynamic_next' C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/usr/src/grass84/lib/rst/interp_float/segmen2d_parallel.c:143:(.text+0x5a2): undefined reference to GOMP_loop_end’
C:/msys64/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/13.2.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: C:/msys64/usr/src/grass84/lib/rst/interp_float/segmen2d_parallel.c:384:(.text+0x96d): undefined reference to GOMP_critical_start' C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/usr/src/grass84/lib/rst/interp_float/segmen2d_parallel.c:384:(.text+0xa68): undefined reference to GOMP_critical_end’
C:/msys64/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/13.2.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: OBJ.x86_64-w64-mingw32/segmen2d_parallel.o: in function IL_interp_segments_2d_parallel': C:/msys64/usr/src/grass84/lib/rst/interp_float/segmen2d_parallel.c:108:(.text+0x12c4): undefined reference to GOMP_parallel’
collect2.exe: error: ld returned 1 exit status
make[5]: *** […/…/…/include/Make/Shlib.make:16: /usr/src/grass84/dist.x86_64-w64-mingw32/lib/libgrass_interpfl.8.4.dll] Error 1

In contrast, GRASS 8.4.0 is built with success.

Do you have any ideas about relevant source code change causing this problem on the build server?

Thanks a lot in advance, best regards, Martin Landa

Dear Martin.
Thanks for the information.
This mailing list is being moved

[1] https://discourse.osgeo.org/c/grass/developer/61

Please read [2] about the migration.
[2] https://discourse.osgeo.org/t/re-grass-dev-migration-to-discourse-info-and-test/85568

Regards
Vicky Vergara
SAC

It also seems that there were no new OSGeo4w grass-dev nightlies since
lib/gmath: use C interface to BLAS and LAPACK libraries (#4247) · OSGeo/grass@d5bb442 · GitHub.

After that PR, a couple other follow-ups were needed, in grass and grass-addons, the last one being: docker: Add liblapacke-dev package to Ubuntu builds (#4371) · OSGeo/grass@c593eb0 · GitHub

The BLAS/LAPACK change is not back ported to 8.4.1, so this is something else.

Dear Vicky, thanks for the information! Martin

Martin, where is the build script and list of dependencies located?

On 1 Oct 2024, at 12:09, Martin Landa via OSGeo Discourse noreply@discourse.osgeo.org wrote:

martinl
October 1

Dear Vicky, thanks for the information! Martin


Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

Hi,

út 1. 10. 2024 v 12:20 odesílatel Nicklas Larsson via OSGeo Discourse <noreply@discourse.osgeo.org> napsal:

| nila
October 1 |

  • | - |

Martin, where is the build script and list of dependencies located?

https://github.com/OSGeo/grass/blob/main/mswindows/osgeo4w/package.sh

Martin

Hi,

út 1. 10. 2024 v 12:48 odesílatel Martin Landa <landa.martin@gmail.com> napsal:

Hi,

út 1. 10. 2024 v 12:20 odesílatel Nicklas Larsson via OSGeo Discourse <noreply@discourse.osgeo.org> napsal:

| nila
October 1 |

  • | - |

Martin, where is the build script and list of dependencies located?

https://github.com/OSGeo/grass/blob/main/mswindows/osgeo4w/package.sh

I was checking difference in .github/workflows/osgeo4w.yml (grass85 vs grass841):

  • mingw-w64-x86_64-fftw mingw-w64-x86_64-openblas mingw-w64-x86_64-pkgconf
  • mingw-w64-x86_64-fftw mingw-w64-x86_64-lapack mingw-w64-x86_64-pkgconf

Anyway, this problem seems to be not related to this change.

Martin

It is somehow OpenMP related. Configure succeeds however:

checking whether to use OpenMP... "yes"
checking for location of OpenMP includes... 
checking for location of OpenMP library... 
checking for omp.h... yes
checking for omp_get_num_threads in -lomp... yes
checking for x86_64-w64-mingw32-gcc option to support OpenMP... -fopenmp

I think I already saw some similar GOMP linking errors when I was trying to use the package.sh script to reproduce a OSGeo4W build instead of our build in CI that is a bit different (too different I would say, and does replacements on the fly that are hard to follow). I had to apply some patches that are applied by OSGeo4W, that are also in win: patch from OSGeo4W applied by landam · Pull Request #4121 · OSGeo/grass · GitHub

Hi, all builds on wingrass.fsv.cvut.cz are still failing with this error. Even grass85 [1] which has #4121 already applied. Due to this problem I am not able to build Windows binaries for standalone 8.4.1 installer.

x86_64-w64-mingw32-gcc -shared -o /usr/src/grass841/dist.x86_64-w64-mingw32/lib/libgrass_interpfl.8.4.dll -L/usr/src/grass841/dist.x86_64-w64-mingw32/lib -L/usr/src/grass841/dist.x86_64-w64-mingw32/lib -Wl,--export-dynamic,--enable-runtime-pseudo-reloc  -L/c/osgeo4w/lib   OBJ.x86_64-w64-mingw32/distance.o OBJ.x86_64-w64-mingw32/func2d.o OBJ.x86_64-w64-mingw32/init2d.o OBJ.x86_64-w64-mingw32/input2d.o OBJ.x86_64-w64-mingw32/interp2d.o OBJ.x86_64-w64-mingw32/matrix.o OBJ.x86_64-w64-mingw32/minmax.o OBJ.x86_64-w64-mingw32/output2d.o OBJ.x86_64-w64-mingw32/point2d.o OBJ.x86_64-w64-mingw32/resout2d.o OBJ.x86_64-w64-mingw32/ressegm2d.o OBJ.x86_64-w64-mingw32/secpar2d.o OBJ.x86_64-w64-mingw32/segmen2d.o OBJ.x86_64-w64-mingw32/segmen2d_parallel.o OBJ.x86_64-w64-mingw32/vinput2d.o OBJ.x86_64-w64-mingw32/write2d.o -lgrass_gis.8.4 -lintl -lgrass_raster.8.4 -lgrass_vector.8.4 -lgrass_gmath.8.4 -lgrass_dbmiclient.8.4 -lgrass_dbmibase.8.4  -lgrass_bitmap.8.4 -lgrass_qtree.8.4 -lgrass_interpdata.8.4   -lomp  
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: warning: --export-dynamic is not supported for PE+ targets, did you mean --export-all-symbols?
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: OBJ.x86_64-w64-mingw32/segmen2d_parallel.o: in function `IL_interp_segments_2d_parallel._omp_fn.0':
C:/msys64/usr/src/grass841/lib/rst/interp_float/segmen2d_parallel.c:108:(.text+0x1b0): undefined reference to `GOMP_loop_nonmonotonic_dynamic_start'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/usr/src/grass841/lib/rst/interp_float/segmen2d_parallel.c:143:(.text+0x585): undefined reference to `GOMP_loop_nonmonotonic_dynamic_next'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/usr/src/grass841/lib/rst/interp_float/segmen2d_parallel.c:143:(.text+0x592): undefined reference to `GOMP_loop_end'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/usr/src/grass841/lib/rst/interp_float/segmen2d_parallel.c:384:(.text+0x965): undefined reference to `GOMP_critical_start'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/usr/src/grass841/lib/rst/interp_float/segmen2d_parallel.c:384:(.text+0xa60): undefined reference to `GOMP_critical_end'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: OBJ.x86_64-w64-mingw32/segmen2d_parallel.o: in function `IL_interp_segments_2d_parallel':
C:/msys64/usr/src/grass841/lib/rst/interp_float/segmen2d_parallel.c:108:(.text+0x1354): undefined reference to `GOMP_parallel'
collect2.exe: error: ld returned 1 exit status
make[5]: *** [../../../include/Make/Shlib.make:16: /usr/src/grass841/dist.x86_64-w64-mingw32/lib/libgrass_interpfl.8.4.dll] Error 1

Any idea how to solve this issue? Martin

[1] https://wingrass.fsv.cvut.cz/grass85/logs/log-r927e825640-1/error.log

Wasn’t something similar solved in
packaging: build Windows with libopenblas by nilason · Pull Request #4716 · OSGeo/grass · GitHub, for win: patch from OSGeo4W applied by landam · Pull Request #4121 · OSGeo/grass · GitHub?

The installation scripts installed both gcc and llvm libraries for OpenMP. You need to take the one for your compiler

Martin, I suppose you install libomp (without a ‘g’), which is llvm/clang’s lib. Remove that and try again.

Nicklas

On 1 Mar 2025, at 18:30, Martin Landa via OSGeo Discourse noreply@discourse.osgeo.org wrote:

martinl
March 1

Hi, all builds on wingrass.fsv.cvut.cz are still failing with this error. Even grass85 [1] which has #4121 already applied. Due to this problem I am not able to build Windows binaries for standalone 8.4.1 installer.

x86_64-w64-mingw32-gcc -shared -o /usr/src/grass841/dist.x86_64-w64-mingw32/lib/libgrass_interpfl.8.4.dll -L/usr/src/grass841/dist.x86_64-w64-mingw32/lib -L/usr/src/grass841/dist.x86_64-w64-mingw32/lib -Wl,--export-dynamic,--enable-runtime-pseudo-reloc  -L/c/osgeo4w/lib   OBJ.x86_64-w64-mingw32/distance.o OBJ.x86_64-w64-mingw32/func2d.o OBJ.x86_64-w64-mingw32/init2d.o OBJ.x86_64-w64-mingw32/input2d.o OBJ.x86_64-w64-mingw32/interp2d.o OBJ.x86_64-w64-mingw32/matrix.o OBJ.x86_64-w64-mingw32/minmax.o OBJ.x86_64-w64-mingw32/output2d.o OBJ.x86_64-w64-mingw32/point2d.o OBJ.x86_64-w64-mingw32/resout2d.o OBJ.x86_64-w64-mingw32/ressegm2d.o OBJ.x86_64-w64-mingw32/secpar2d.o OBJ.x86_64-w64-mingw32/segmen2d.o OBJ.x86_64-w64-mingw32/segmen2d_parallel.o OBJ.x86_64-w64-mingw32/vinput2d.o OBJ.x86_64-w64-mingw32/write2d.o -lgrass_gis.8.4 -lintl -lgrass_raster.8.4 -lgrass_vector.8.4 -lgrass_gmath.8.4 -lgrass_dbmiclient.8.4 -lgrass_dbmibase.8.4  -lgrass_bitmap.8.4 -lgrass_qtree.8.4 -lgrass_interpdata.8.4   -lomp  
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: warning: --export-dynamic is not supported for PE+ targets, did you mean --export-all-symbols?
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: OBJ.x86_64-w64-mingw32/segmen2d_parallel.o: in function `IL_interp_segments_2d_parallel._omp_fn.0':
C:/msys64/usr/src/grass841/lib/rst/interp_float/segmen2d_parallel.c:108:(.text+0x1b0): undefined reference to `GOMP_loop_nonmonotonic_dynamic_start'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/usr/src/grass841/lib/rst/interp_float/segmen2d_parallel.c:143:(.text+0x585): undefined reference to `GOMP_loop_nonmonotonic_dynamic_next'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/usr/src/grass841/lib/rst/interp_float/segmen2d_parallel.c:143:(.text+0x592): undefined reference to `GOMP_loop_end'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/usr/src/grass841/lib/rst/interp_float/segmen2d_parallel.c:384:(.text+0x965): undefined reference to `GOMP_critical_start'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/usr/src/grass841/lib/rst/interp_float/segmen2d_parallel.c:384:(.text+0xa60): undefined reference to `GOMP_critical_end'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: OBJ.x86_64-w64-mingw32/segmen2d_parallel.o: in function `IL_interp_segments_2d_parallel':
C:/msys64/usr/src/grass841/lib/rst/interp_float/segmen2d_parallel.c:108:(.text+0x1354): undefined reference to `GOMP_parallel'
collect2.exe: error: ld returned 1 exit status
make[5]: *** [../../../include/Make/Shlib.make:16: /usr/src/grass841/dist.x86_64-w64-mingw32/lib/libgrass_interpfl.8.4.dll] Error 1

Any idea how to solve this issue? Martin

[1] https://wingrass.fsv.cvut.cz/grass85/logs/log-r927e825640-1/error.log


Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

Hi, very good point. I removed mingw-w64-x86_64-llvm-openmp and GRASS compiles. Thanks a lot for the feedback! Martin