[gdal-dev] About installing EXPAT

Abel Pau a.pau at creaf.uab.cat
Mon Sep 25 08:25:11 PDT 2023


Hi again,
well after using CONDA_PREFIX some errors appear about packages that are not included (I suppose).

archive.dll
libcrypto-3-x64.dll
libssl-3-x64.dll
liblz4.dll

Are they familiar to you?


De: Even Rouault <even.rouault at spatialys.com>
Enviado el: dilluns, 25 de setembre de 2023 16:32
Para: Abel Pau <a.pau at creaf.uab.cat>; gdal dev <gdal-dev at lists.osgeo.org>
Asunto: Re: [gdal-dev] About installing EXPAT


Add -DCMAKE_PREFIX_PATH="$CONDA_PREFIX" to your CMake invokation (assuming your have activate your Conda environment, so CONDA_PREFIX is set)

My suggestion is inspired from our CI Conda based Windows build: https://github.com/OSGeo/gdal/blob/7fc7bb59d2b2de1dca03dd18c14005f2b64adb49/.github/workflows/cmake_builds.yml#L463

You should also probably clear your existing CMakeCache.txt before doing the abve, to avoid mixing with variables set from your previous experiments
Le 25/09/2023 à 16:21, Abel Pau a écrit :
Hi Even,
I really appreciate your help.

I prefer going by the easy way so once installed miniconda and applied all the described in download.htm.

To have the EXPAT installed I do that: conda install expat

And the, when I try the cmake .. some issues appear

D:\GitHub-repository\GDAL\build>cmake ..
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19045.
-- GDAL_VERSION          = 3.8.0dev
-- GDAL_ABI_FULL_VERSION = 38
-- GDAL_SOVERSION        =
-- Could NOT find MSSQL_NCLI (missing: MSSQL_NCLI_LIBRARY MSSQL_NCLI_INCLUDE_DIR MSSQL_NCLI_VERSION)
-- Could NOT find MSSQL_ODBC (missing: MSSQL_ODBC_LIBRARY MSSQL_ODBC_INCLUDE_DIR MSSQL_ODBC_VERSION)
-- Could NOT find MySQL (missing: MYSQL_LIBRARY MYSQL_INCLUDE_DIR)
-- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
-- Could NOT find Iconv (missing: Iconv_LIBRARY Iconv_CHARSET_LIBRARY Iconv_INCLUDE_DIR)
-- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
-- Could NOT find EXPAT (missing: EXPAT_DIR)
-- Could NOT find EXPAT (missing: EXPAT_LIBRARY EXPAT_INCLUDE_DIR)
CMake Error at cmake/helpers/CheckDependentLibraries.cmake:202 (message):
  Configured to use EXPAT, but not found
Call Stack (most recent call first):
  cmake/helpers/CheckDependentLibraries.cmake:348 (gdal_check_package)
  gdal.cmake:265 (include)
  CMakeLists.txt:280 (include)


-- Configuring incomplete, errors occurred!

D:\GitHub-repository\GDAL\build>

There is something I don’t understand because I don’t know what to do now.
Why after doing an gdal_master_env and installing everything and expat it doesn’t work?

Once again, I appreciate your help :)


De: Even Rouault <even.rouault at spatialys.com><mailto:even.rouault at spatialys.com>
Enviado el: dilluns, 25 de setembre de 2023 14:30
Para: Abel Pau <a.pau at creaf.uab.cat><mailto:a.pau at creaf.uab.cat>; gdal dev <gdal-dev at lists.osgeo.org><mailto:gdal-dev at lists.osgeo.org>
Asunto: Re: [gdal-dev] About installing EXPAT


Abel,

In Cmakefile.txt of the project I’ve configured this (below # Developer may want to specify some variable to find proper version.):
set(EXPAT_INCLUDE_DIR "D:/GitHub-repository/libexpat/expat/lib")
set(EXPAT_LIBRARY "D:/GitHub-repository/libexpat/expat/build/Debug/libexpatd.lib")
Is this .lib a static library, or an import library of the .dll ? My assumption (I may be wrong) is that it is an import lib of the .dll. In which case you must not set EXPAT_USE_STATIC_LIBS


set(EXPAT_LIBRARY "D:/GitHub-repository/libexpat/expat/build/Debug/libexpatd.dll")

That won't work. This needs to be a .lib

You'd better run cmake again on expat with a -DCMAKE_INSTALL_PREFIX=d:/install-prefix   and run "cmake --build . --target install", and then when building GDAL, use "cmake .. -DCMAKE_PREFIX_PATH=d:/install-prefix", so it automatically configures things from what is found in d:/install-prefix

You could also potentially use vcpkg or conda to install GDAL dependencies instead of building them from scratch: https://gdal.org/download.html

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/20230925/e3b43364/attachment-0001.htm>


More information about the gdal-dev mailing list