[gdal-dev] Building GDAL, file format not recognized

Even Rouault even.rouault at spatialys.com
Mon Mar 23 15:24:59 PDT 2026


The various xxx_LIBRARY CMake variables must point to the libXXXX.so 
file, not just the directory where it is.

Le 23/03/2026 à 23:16, Mazin Marwan via gdal-dev a écrit :
> Hello all,
>
> I'm trying to build GDAL with GEOS and Curl among other packages and 
> I'm running into an error when trying to run "cmake --build ."
>
> [ 96%] Built target gcore_mdreader
> [ 96%] Linking CXX shared library libgdal.so
> /usr/bin/ld: cannot find /home/mazianos/build/curl/lib: file format 
> not recognized
> /usr/bin/ld: cannot find /home/mazianos/build/geos-3.14.1/lib: file 
> format not recognized
> /usr/bin/ld: cannot find /home/mazianos/build/geos-3.14.1/lib: file 
> format not recognized
> /usr/bin/ld: cannot find /home/mazianos/build/geos-3.14.1/lib: file 
> format not recognized
> /usr/bin/ld: cannot find /home/mazianos/build/geos-3.14.1/lib: file 
> format not recognized
> collect2: error: ld returned 1 exit status
> gmake[2]: *** [CMakeFiles/GDAL.dir/build.make:2788: 
> libgdal.so.38.3.12.2] Error 1
> gmake[1]: *** [CMakeFiles/Makefile2:3352: CMakeFiles/GDAL.dir/all] Error 2
> gmake: *** [Makefile:146: all] Error 2
>
> I'm not sure what's causing this, but I had previously ran
> sudo cmake -DGEOS_INCLUDE_DIR=/home/mazianos/build/geos-3.14.1/include \
> -DGEOS_LIBRARY=/home/mazianos/build/geos-3.14.1/lib \
> -DGDAL_USE_HDF5=ON \
> -DEXPAT_INCLUDE_DIR=/home/mazianos/build/expat/include \
> -DEXPAT_LIBRARY=/home/mazianos/build/expat/lib \
> -DCURL_INCLUDE_DIR=/home/mazianos/build/curl/include \
> -DCURL_LIBRARY_RELEASE=/home/mazianos/build/curl/lib \
> -DCMAKE_BUILD_TYPE=Release ..
> successfully, so it's able to find geos and curl.
>
> Any ideas on what I may have done wrong on the way to this point would 
> be appreciated.
>
> _______________________________________________
> gdal-dev mailing list
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20260323/07b49cab/attachment.htm>


More information about the gdal-dev mailing list