[gdal-dev] cmake status update - 99% good news!

Joaquim Manuel Freire Luís jluis at ualg.pt
Wed Jan 26 10:43:35 PST 2022


Don’t know which commit did it. Updated this afternoon and started to erroring right away with missing 'ws2_32.lib`

From: Even Rouault <even.rouault at spatialys.com>
Sent: Wednesday, January 26, 2022 6:36 PM
To: Joaquim Manuel Freire Luís <jluis at ualg.pt>; gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] cmake status update - 99% good news!



Le 26/01/2022 à 19:31, Joaquim Manuel Freire Luís a écrit :

I do have HDF4 but before I was able to build till the end. I've here a gdal_w64.dll smiling to me. That's why I said it got worst.
Sorry you lost me. Is https://github.com/OSGeo/gdal/pull/5179 helping or not ?  If not helping, which commit in it is causing an issue ?




[cid:image001.png at 01D812E4.9E542DF0]



Le 26/01/2022 à 17:26, Joaquim Manuel Freire Luís a écrit :

>

> Joaquim,

>> But I found two other new issues when adding more dependencies

>>

>> 1.

>> C:\programs\compa_libs\gdal_GIT\frmts\mbtiles\mbtilesdataset.cpp(45):

>> fatal error C1083: Cannot open include file: 'zlib.h': No such file

>> or directory

>>

>> To work around this, I temporarily added zlib.h and zconf.h to

>> frmts\mbtiles

> Should be fixed by the first commit of

> https://github.com/OSGeo/gdal/pull/5179

>

> I'm afraid it got worst



-- Configuring done

-- Generating done

-- Build files have been written to: C:/programs/compa_libs/gdal_GIT/build

ninja: error: 'ws2_32.lib', needed by 'gdal_w64.dll', missing and no known rule to make it



I'd say on the contrary that it helped the build to go further, didn't it ? My fixes are totally unrelated to a ws2_32.lib missing



I see in configure.ac that we had the following logic



dnl

---------------------------------------------------------------------------

dnl Check if we need -lws2_32 (mingw)

dnl

---------------------------------------------------------------------------



echo "#include <winsock2.h>" > test_ws2_32.c echo "#include <ws2tcpip.h>" >> test_ws2_32.c echo "void foo() {}" >> test_ws2_32.c



if test -z "`${CC} -c test_ws2_32.c 2>&1`" ; then

  LIBS="$LIBS -lws2_32"

fi

rm -f test_ws2_32*



dnl

---------------------------------------------------------------------------

dnl Check if we need -lpsapi (mingw)

dnl

---------------------------------------------------------------------------



echo "#include <windows.h>" > test_psapi.c echo "#include <psapi.h>" >> test_psapi.c echo "void foo() {}" >> test_psapi.c



if test -z "`${CC} -c test_psapi.c 2>&1`" ; then

  LIBS="$LIBS -lpsapi"

fi

rm -f test_psapi*



This hasn't been ported yet to cmake builds.



I've ticketed that in https://github.com/OSGeo/gdal/issues/5180.



Hum, upon reflection, the error message would seem to indicate that we try to link to ws2_32.lib but it is not found in your environemnt



Looking for ws2_32 in cmake build scripts, I see it is referenced in



cmake/modules/packages/FindODBC.cmake: set(_odbc_required_libs_names

odbccp32;ws2_32)

cmake/modules/packages/FindHDF4.cmake:        list(APPEND HDF4_LIBRARIES

ws2_32.lib)



Do you use any of ODBC or HDF4 in your build ? Could you try to disable them and see if it makes a difference ?



Or maybe if you've HDF4, try to change the ws2_32.lib to ws2_32 in cmake/modules/packages/FindHDF4.cmake ?



Even



--

http://www.spatialys.com

My software is free, but my time generally not.



--

http://www.spatialys.com

My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220126/d8a2db0c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 57869 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220126/d8a2db0c/attachment-0001.png>


More information about the gdal-dev mailing list