I would probably refer to:
https://github.com/OSGeo/grass/blob/main/.github/workflows/osgeo4w.yml
checking for BZ2_bzBuffToBuffCompress in -lbz2... no
=> configure: error: *** Unable to locate bzlib library. <=
looking into config.log:
configure:7706: checking whether to use bzlib
configure:7708: result: "yes"
configure:7723: checking for location of bzlib includes
configure:7730: result:
configure:7749: checking bzlib.h usability
configure:7749: x86_64-w64-mingw32-gcc -c -g -O2 -I/c/OSGeo4W/include conftest.c >&5
configure:7749: $? = 0
configure:7749: result: yes
configure:7749: checking bzlib.h presence
configure:7749: x86_64-w64-mingw32-gcc -E -I/c/OSGeo4W/include conftest.c
configure:7749: $? = 0
configure:7749: result: yes
configure:7749: checking for bzlib.h
configure:7749: result: yes
configure:7769: checking for location of bzlib library
configure:7776: result:
configure:7795: checking for BZ2_bzBuffToBuffCompress in -lbz2
configure:7818: x86_64-w64-mingw32-gcc -o conftest.exe -g -O2 -I/c/OSGeo4W/include -Wl,--export-dynamic,--enable-runtime-pseudo-reloc >-L/c/OSGeo4W/lib -L/c/OSGeo4W/bin conftest.c -lbz2 >&5
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: warning: --export-dynamic is >not supported for PE+ targets, did you mean --export-all-symbols?
=> >Warning: corrupt .drectve at end of def file <=
anyone any idea?
issue seems to be linking against incompatible MSVC libs.
not sure yet which lib may infer here.
best
helli