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

Mazin Marwan mazin.marwan0 at gmail.com
Mon Mar 23 15:16:32 PDT 2026


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20260323/7153aa1a/attachment.htm>


More information about the gdal-dev mailing list