[gdal-dev] compiling gdal from source for Windows ARM64 failed

Reiner Schlitzer Reiner.Schlitzer at awi.de
Tue Nov 5 09:48:38 PST 2024


Hi Even,
thanks for your help. I have solved my problem and have successfully built the GDAL library for Windows ARM64. The cause was a second CMAKE installation as part of StrawberryPerl, which currently is only available as x64 package. Uninstalling StrawberryPerl and using the CMAKE within Visual Studio solved the problem. Thanks again for your prompt responses.
Best regards,
Reiner

Von: Even Rouault <even.rouault at spatialys.com>
Gesendet: Montag, 4. November 2024 16:49
An: Reiner Schlitzer <Reiner.Schlitzer at awi.de>; gdal-dev at lists.osgeo.org
Betreff: Re: [gdal-dev] compiling gdal from source for Windows ARM64 failed


Reiner,

the error "cpl_cpu_features.cpp(69): error C3861: "CPL_CPUID":"  indicates that the compiler goes into a code path that is protected by a #if defined(HAVE_SSE_AT_COMPILE_TIME).

This HAVE_SSE_AT_COMPILE_TIME macro is set in gdal.cmake when "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(x86|AMD64)" .

So I believe there's a misconfiguration of your CMake cross compilation. Try adding -DCMAKE_SYSTEM_PROCESSOR=ARM64 perhaps. Although https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_PROCESSOR.html suggest you should likely rather use a proper CMAKE_TOOLCHAIN_FILE to set all variables correctly.

Even

Le 04/11/2024 à 16:38, Reiner Schlitzer via gdal-dev a écrit :
Hi,
I am trying to compile the GDAL library for the Windows ARM64 architecture but fail during the build step because of undefined CPL_CPUID in the port\cpl_cpu_features.cpp file. The Windows ARM64 case seems not to be covered in the definition block at the top.
Can you please give advice on how to fix this issue, or can you please get me into contact with people working on creating GDAL binaries for Windows ARM64. If GDAL binaries for Windows ARM64 already exist, please point me to the download location. Thank you very much in advance.
Here are details on what I have done:

  1.  The GDAL source was downloaded from the master branch at https://github.com/OSGeo/GDAL.
  2.  CMAKE configuration command: cmake -DCMAKE_PREFIX_PATH=c:/develop -DBUILD_APPS=OFF -DGDAL_BUILD_OPTIONAL_DRIVERS=OFF -DOGR_BUILD_OPTIONAL_DRIVERS=OFF -DCMAKE_BUILD_TYPE=Release ..
  3.  CMAKE build command: cmake --build .
The output from the config and build steps are attached. Dependencies, such as proj, hdf5, netcdf, sqlite3, expat, openssl, zlib and others had been compiled successfully previously and are accessible at compile time at C:\develop. I am working on a Windows on Arm system with Snapdragon(R) X Elite processor and 32GB of RAM.
Any advice on how to make progress is greatly appreciated. Thanks in advance.

Best regards,
Reiner Schlitzer

------------------------------------------------
Prof. Dr. Reiner Schlitzer
Alfred-Wegener-Institut
Helmholtz-Zentrum für Polar- und Meeresforschung
Am Alten Hafen 26
27568 Bremerhaven
GERMANY

e-mail: Reiner.Schlitzer at awi.de<mailto:Reiner.Schlitzer at awi.de>
https://www.awi.de/en/about-us/organisation/staff/single-view/reiner-schlitzer.html




_______________________________________________

gdal-dev mailing list

gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>

https://lists.osgeo.org/mailman/listinfo/gdal-dev

--

http://www.spatialys.com

My software is free, but my time generally not.

Butcher of all kinds of standards, open or closed formats. At the end, this is just about bytes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20241105/05a90c50/attachment-0001.htm>


More information about the gdal-dev mailing list