1

I've been trying to install gdal with the FileGDB driver. I installed it fine on a linux mint machine. I am having problems installing on a CentOS machine though.
It builds fine, I can run the apps in the build directory but when I run make install, it runs without error.
The machine did have gdal 1.9 installed. After we had tried several times installing I used rpm to uninstall the gdal packages shown as installed. Reran the make install, reran ldconfig just in case. No difference. For now I'm hard coding the path to the build directory, but obviously I'd rather have it run properly.

./configure LDFLAGS=-L/lib64 --with-fgdb=/data/HOMEDIRS/SAI/dev/src/FileGDB_API 
--without-python --with-perl --with-pg=/usr/bin/pg_config --prefix=/usr
/data/HOMEDIRS/SAI/dev/gdal-1.11.0/apps/ogrinfo --formats|grep File
 -> "MapInfo File" (read/write)
 -> "OpenFileGDB" (readonly)
 -> "FileGDB" (read/write)
/usr/bin/ogrinfo --formats|grep File
 -> "MapInfo File" (read/write)
 -> "OpenFileGDB" (readonly)

Interestingly, if I delete the file in /usr/bin then reinstall, the install does something to the binary (link in libraries?):

 ls -l /data/HOMEDIRS/SAI/dev/gdal-1.11.0/apps/ogrinfo /usr/bin/ogrinfo
 -rwxr-xr-x 1 nrgadmin root  7671 Sep  4 20:00 /data/HOMEDIRS/SAI/dev/gdal-1.11.0/apps/ogrinfo
 -rwxr-xr-x 1 root     root 78727 Sep  4 20:17 /usr/bin/ogrinfo
  • Normally you should use --prefix=/usr/local (default), as per the conventional directory layout. This way your custom build is kept separate from the system RPM. – Mike T Sep 5 '14 at 1:36
  • Yeah, it was that by default. But then it was picking up the version installed in /usr/bin - before I was able to uninstall the package with rpm. Incidentally, the version in /usr/local/bin behaves the same way, ie it doesn't have the FileGDB format. – Bryan Sep 5 '14 at 10:21
  • What does /usr/bin/gdal-info --version say? Can you check that you don't have another version in /usr/local/bin/ – dmci Sep 5 '14 at 11:49
  • Thanks, but both the version in the build directory and the /usr/bin both give GDAL 1.11.0, released 2014/04/16. There was also a version in /usr/local/bin but that is removed and still the same issue. I tried ldd on both versions. Unfortunately for the build directory it says not a dynamic executable. The one in /usr/bin does show libFileGDBAPI.so which exists and is accessible. I suspect it is something to do with libraries but haven't cracked it yet. – Bryan Sep 5 '14 at 18:38
1

Bit of a cr@ppy answer - but it works. Unfortunately, it doesn't really solve the route cause.
I resolved my issue by changing the build to use static libraries instead.

./configure --with-fgdb=/data/HOMEDIRS/SAI/dev/src/FileGDB_API --with-pg=/usr/bin/pg_config --prefix=/usr --without-ld-shared --disable-shared --enable-static  

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.