[gdal-dev] Mysterious master build break on Win11

Joaquim Manuel Freire Luís jluis at ualg.pt
Sat Apr 15 08:07:47 PDT 2023


Hi,

I'm hitting a weird building error on Win11.

The error is

[1322/1350] Linking CXX shared library gdal_w64.dll
FAILED: gdal_w64.dll gdal_w64.lib
cmd.exe /C "cd . && C:\programs\CMake\bin\cmake.exe -E vs_link_dll --intdir=CMakeFiles\GDAL.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1435~1.322\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\GDAL.rsp  /out:gdal_w64.dll /implib:gdal_w64.lib /pdb:gdal_w64.pdb /dll /version:37.0 /machine:x64 /INCREMENTAL:NO  && cd ."
LINK: command "C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1435~1.322\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\GDAL.rsp /out:gdal_w64.dll /implib:gdal_w64.lib /pdb:gdal_w64.pdb /dll /version:37.0 /machine:x64 /INCREMENTAL:NO /MANIFEST /MANIFESTFILE:gdal_w64.dll.manifest" failed (exit code 1181) with the following output:
LINK : fatal error LNK1181: cannot open input file 'm.lib'
ninja: build stopped: subcommand failed.

And indeed, there is one file "C:\programs\compa_libs\gdal_GIT\build\CMakeFiles\GDAL.rsp" that has this line

       C:\programs\PostgreSQL\15\lib\libpq.lib  C:\programs\compa_libs\hdf5-1.12.2\compileds\VC14_64\lib\hdf5_cpp.lib  psapi.lib  m.lib


Now, the weirdest part is that this happens in a new computer with Win11 but the GDAL repo dir was copied from another computer (that has Win10) and there this error does not show up. Both are built with same version of VS.

If I cheat it and add a valid lib called as m.lib then all runs apparently fine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230415/0c3e0b46/attachment.htm>


More information about the gdal-dev mailing list