How to compile gdal with ESRI FileGDB

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

How to compile gdal with ESRI FileGDB

Johan Nilsson-2

I have tried to find how I compile gdal 1.9.2 with ESRIs FileGDB_API, but I'm are very uncertain how it work. I have Ubuntu 10.04LTS 32-bit with PAE. I another step I downloaded source-code for gdal-1.9.2 and added needed packed with:

cd ~/Desktop/gdal-mod <--move cursor to the created folder.
apt-get source gdal-bin <--download source-cod from my respositories (same as my binary installed on my system, into the folder I stand in ~/Desktop/gdal-mod)
sudo apt-get build-dep gdal <--geting dependencies so my system can build the package gdal.


From https://github.com/usgin/ncgmp/wiki/Installation-Example I found this example

  1. cd ~/downloads <--change to the folder with the downloaded driver from ESRI

  2. tar xzf FileGDB_API_1_2-64.tar.gz <--unpacking

  3. cd ~/downloads/FileGDB_API/lib <--goes to a file in the unpacked FileGDB

  4. ln -s libfgdbunixrtl.so libfgdblinuxrtl.so <--made a symbolic link in the folder lib because ESRI change the name.

  5. cd ../.. <--up 2 levels

  6. tar xvf gdal-1.9.0.tar.gz <--unpacking, I have a newer file

  7. cd gdal-1.9.0

  8. ./configure --with-pg=/usr/bin/pg_config --with-fgdb=/home/ubuntu/downloads/FileGDB_API --with-geos=/usr/local/bin/geos-config --with-static-proj4=/usr/local/lib/libproj.a --with-python

  9. make

  10. sudo make install

First a question! If I make a 'make install', and if it don't work, how can i change back to my original gdal-bin?

Second. Does this install libFileGDBAPI.so (Read a tutorial, there they said that libFileGDBAPI.so should be install in it default directory, which I don't know where it is...


6. I have a newer version of gdal (1.9.2) and I have the 32-bit version on this machine. The swift '--with' in this example above are not so accurate for my system, I think? What does '--with' really do? Does it create links in gdal or does it more?

Does someone know which swift '--with ' I should have or are necessary or good to have? Do the FileGDB also get compiled at the same time?

I seach my system and change the path in the example: first where I have my FileGDB_API and then some other files have also a different path? Do I need all this --with, or does a default file add it?

My modified '--with', if it's needed?

./configure --with-pg=/usr/bin/pg_config --with-fgdb=/home/Joni/Desktop/gdal-mod/FileGDB_API --with-geos=/usr/bin/geos-config --with-static-proj4=/usr/lib/libproj.a --with-python

If I don't add anything more than, my FilGDB_API, there the source-code are, does there are any 'Default setting', so It work as now? I had a Postgis config-file as in the example. In this example they had compiled a geos package, but my system did have libgeos and a geos-config file in above blue directory. The '--with-static-proj4=/usr/local/lib/libproj.a' have I changed to another path, there I find a libproj.a file.

Hope someone can explain little..

/Cheers

Johan



_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: How to compile gdal with ESRI FileGDB

Eric Goddard

Below are the steps I use to add File Geodatabase support to gdal. This worked on Ubuntu 12.04 64-bit, but it doesn't use the deb source packages. Since you have a 32-bit ubuntu install, you need to download the 32-bit version of the FileGDB API. I tried to answer your questions as they come up in the steps I list below, so you may want to read through the whole thing before starting. Sorry for the length, but I hope it helps!

In terminal:

1. Change directory to wherever you downloaded the FileGDBAPI: cd path/to/FileGDBAPI_download

2. extract the archive: tar zxvf FileGDB_API_1_2-32.tar.gz NOTE: Since you are using 32-bit Ubuntu, you need to download the 32-bit FileGDB API.

3.You need to build the samples to make sure the API works. Change to the FileGDB_API samples folder: cd FileGDB_API/samples

4. type make

5. Run a sample to make sure it works. Change directory to the bin folder inside samples: cd bin , and then type ./Querying. You'll get a bunch of text in terminal, just make sure it doesn't spit out any errors.

6. If the sample runs successfully, you have a working FileGDB API and you are ready to compile GDAL. I like to move the FileGDB API to a better location than the downloads directory, but it is up to you. If you choose to move it, you can use the paths listed below. If you use your own location, change the path in the commands below to whatever you used. sudo mv <your location>/FileGDB_API /usr/local/

7. Create a LD configuration file so that gdal is able to find the FGDB libraries: sudo echo /usr/local/FileGDB_API/lib > etc/ld.so.conf.d/fgdb.conf 

An explanation of ld is below.

8. run ldconfig to update the linked libraries: sudo ldconfig

You're now ready to download and configure gdal.


1. Download gdal from http://download.osgeo.org/gdal/gdal-1.9.2.tar.gz
2. Extract the contents of the gdal archive: tar zxvf gdal-1.9.2.tar.gz

3. Change to the gdal directory: cd gdal-1.9.2

4. Now gdal needs to be configured. Your configure line may be different from the one below depending on the options you want included, but the important line to include is --with-fgdb=/usr/local/FileGDB_API. This is my configure line on my system:  ./configure --with-geos=yes --with-sqlite3 --with-python --with-spatialite --with-fgdb=/usr/local/FileGDB_API --with-postgres --with-odbc --with-libkml=yes --with-curl=yes --with-mrsid=/usr/local/MrSID_SDK/Raster_DSDK --with-mrsid_lidar=/usr/local/MrSID_SDK/Lidar_DSDK --with-openjpeg=/usr/include

The --with statements let the configuration script know what additional modules you want to be included in the compile. When you install packages, such as geos, from the repos the libraries are put in paths that ld (which is a utility that links libraries so that other applications are able to find them) knows about. When you compile by hand the general practice is to compile to /usr/local, which sometimes ld doesn't know about by default. You let ld know about additional paths by creating a configuration file in /etc/ld.so.conf.d/ that contains the path of your custom compiled libraries. 

To compile GDAL with the options you want, your line might look something like this:

./configure --with-geos=yes --with-sqlite3 --with-python --with-spatialite --with-fgdb=/usr/local/FileGDB_API --with-postgres --with-odbc

After configure runs, it will give you a summary that indicates what it was able to find. Check to make sure that there is a 'yes' beside the options you want. If there is a no beside something you want to include, you may need to scroll through the output and find the error to see what went wrong.


5. Now you can run make and make install. sudo make. When that finishes, run sudo make install.

6. One more step: you need to let ld know about the gdal libraries. Since we didn't specify a different path, the configure line above puts them in /usr/local/lib by default. I let ld know about the libraries by adding a local.conf file to /etc/ld.so.conf.d/. sudo echo /usr/local/lib > /etc/ld.so.conf.d/local.conf

7. Run ldconfig again: sudo ldconfig


You should be able to open geodatabases in QGIS or any other GIS application that uses GDAL now. I expanded on notes that I took while doing the install, but I didn't have my linux laptop with me while writing this. Let me know if anything doesn't work or if clarification is needed.

On Nov 13, 2012 9:27 AM, "Johan Nilsson" <[hidden email]> wrote:

I have tried to find how I compile gdal 1.9.2 with ESRIs FileGDB_API, but I'm are very uncertain how it work. I have Ubuntu 10.04LTS 32-bit with PAE. I another step I downloaded source-code for gdal-1.9.2 and added needed packed with:

cd ~/Desktop/gdal-mod <--move cursor to the created folder.
apt-get source gdal-bin <--download source-cod from my respositories (same as my binary installed on my system, into the folder I stand in ~/Desktop/gdal-mod)
sudo apt-get build-dep gdal <--geting dependencies so my system can build the package gdal.


From https://github.com/usgin/ncgmp/wiki/Installation-Example I found this example

  1. cd ~/downloads <--change to the folder with the downloaded driver from ESRI

  2. tar xzf FileGDB_API_1_2-64.tar.gz <--unpacking

  3. cd ~/downloads/FileGDB_API/lib <--goes to a file in the unpacked FileGDB

  4. ln -s libfgdbunixrtl.so libfgdblinuxrtl.so <--made a symbolic link in the folder lib because ESRI change the name.

  5. cd ../.. <--up 2 levels

  6. tar xvf gdal-1.9.0.tar.gz <--unpacking, I have a newer file

  7. cd gdal-1.9.0

  8. ./configure --with-pg=/usr/bin/pg_config --with-fgdb=/home/ubuntu/downloads/FileGDB_API --with-geos=/usr/local/bin/geos-config --with-static-proj4=/usr/local/lib/libproj.a --with-python

  9. make

  10. sudo make install

First a question! If I make a 'make install', and if it don't work, how can i change back to my original gdal-bin?

Second. Does this install libFileGDBAPI.so (Read a tutorial, there they said that libFileGDBAPI.so should be install in it default directory, which I don't know where it is...


6. I have a newer version of gdal (1.9.2) and I have the 32-bit version on this machine. The swift '--with' in this example above are not so accurate for my system, I think? What does '--with' really do? Does it create links in gdal or does it more?

Does someone know which swift '--with ' I should have or are necessary or good to have? Do the FileGDB also get compiled at the same time?

I seach my system and change the path in the example: first where I have my FileGDB_API and then some other files have also a different path? Do I need all this --with, or does a default file add it?

My modified '--with', if it's needed?

./configure --with-pg=/usr/bin/pg_config --with-fgdb=/home/Joni/Desktop/gdal-mod/FileGDB_API --with-geos=/usr/bin/geos-config --with-static-proj4=/usr/lib/libproj.a --with-python

If I don't add anything more than, my FilGDB_API, there the source-code are, does there are any 'Default setting', so It work as now? I had a Postgis config-file as in the example. In this example they had compiled a geos package, but my system did have libgeos and a geos-config file in above blue directory. The '--with-static-proj4=/usr/local/lib/libproj.a' have I changed to another path, there I find a libproj.a file.

Hope someone can explain little..

/Cheers

Johan



_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user


_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: How to compile gdal with ESRI FileGDB

Johan Nilsson-2
Thanks very much Eric :)
I have read the instuctions, and
tar zxvf FileGDB_API_1_2-32.tar.gz went well but I'm stuck on point 4 in the fist part of you instruction to make a sample to test the driver:
~/Desktop/gdal-mod/FileGDB_API/samples$ make
It spot out a lot of thing complaining about 'undefiened reference to'... and it ends like:
../../lib/libFileGDBAPI.so: undefined reference to `PathFileExistsW(wchar_t const*)'
../../lib/libFileGDBAPI.so: undefined reference to `PathFindExtensionW(wchar_t const*)'
collect2: ld returned 1 exit status

make[1]: *** [../bin/Domains] Error 1
make[1]: Leaving directory `/home/a/Desktop/gdal-mod/FileGDB_API/samples/Domains'
make: *** [Domains] Error 2

Joni@Intel:~/Desktop/gdal-mod/FileGDB_API/samples$


I tried to ignore the errors above, but when I move to bin it was empty and nothing happend:
~/Desktop/gdal-mod/FileGDB_API/samples/bin$ ./Querying
bash: ./Querying: No such file or directory

I checked with ls -all and bin was empty.

Cheers and thanks
/Johan



2012/11/14 Eric Goddard <[hidden email]>

Below are the steps I use to add File Geodatabase support to gdal. This worked on Ubuntu 12.04 64-bit, but it doesn't use the deb source packages. Since you have a 32-bit ubuntu install, you need to download the 32-bit version of the FileGDB API. I tried to answer your questions as they come up in the steps I list below, so you may want to read through the whole thing before starting. Sorry for the length, but I hope it helps!

In terminal:

1. Change directory to wherever you downloaded the FileGDBAPI: cd path/to/FileGDBAPI_download

2. extract the archive: tar zxvf FileGDB_API_1_2-32.tar.gz NOTE: Since you are using 32-bit Ubuntu, you need to download the 32-bit FileGDB API.

3.You need to build the samples to make sure the API works. Change to the FileGDB_API samples folder: cd FileGDB_API/samples

4. type make

5. Run a sample to make sure it works. Change directory to the bin folder inside samples: cd bin , and then type ./Querying. You'll get a bunch of text in terminal, just make sure it doesn't spit out any errors.

6. If the sample runs successfully, you have a working FileGDB API and you are ready to compile GDAL. I like to move the FileGDB API to a better location than the downloads directory, but it is up to you. If you choose to move it, you can use the paths listed below. If you use your own location, change the path in the commands below to whatever you used. sudo mv <your location>/FileGDB_API /usr/local/

7. Create a LD configuration file so that gdal is able to find the FGDB libraries: sudo echo /usr/local/FileGDB_API/lib > etc/ld.so.conf.d/fgdb.conf 

An explanation of ld is below.

8. run ldconfig to update the linked libraries: sudo ldconfig

You're now ready to download and configure gdal.


1. Download gdal from http://download.osgeo.org/gdal/gdal-1.9.2.tar.gz
2. Extract the contents of the gdal archive: tar zxvf gdal-1.9.2.tar.gz

3. Change to the gdal directory: cd gdal-1.9.2

4. Now gdal needs to be configured. Your configure line may be different from the one below depending on the options you want included, but the important line to include is --with-fgdb=/usr/local/FileGDB_API. This is my configure line on my system:  ./configure --with-geos=yes --with-sqlite3 --with-python --with-spatialite --with-fgdb=/usr/local/FileGDB_API --with-postgres --with-odbc --with-libkml=yes --with-curl=yes --with-mrsid=/usr/local/MrSID_SDK/Raster_DSDK --with-mrsid_lidar=/usr/local/MrSID_SDK/Lidar_DSDK --with-openjpeg=/usr/include

The --with statements let the configuration script know what additional modules you want to be included in the compile. When you install packages, such as geos, from the repos the libraries are put in paths that ld (which is a utility that links libraries so that other applications are able to find them) knows about. When you compile by hand the general practice is to compile to /usr/local, which sometimes ld doesn't know about by default. You let ld know about additional paths by creating a configuration file in /etc/ld.so.conf.d/ that contains the path of your custom compiled libraries. 

To compile GDAL with the options you want, your line might look something like this:

./configure --with-geos=yes --with-sqlite3 --with-python --with-spatialite --with-fgdb=/usr/local/FileGDB_API --with-postgres --with-odbc

After configure runs, it will give you a summary that indicates what it was able to find. Check to make sure that there is a 'yes' beside the options you want. If there is a no beside something you want to include, you may need to scroll through the output and find the error to see what went wrong.


5. Now you can run make and make install. sudo make. When that finishes, run sudo make install.

6. One more step: you need to let ld know about the gdal libraries. Since we didn't specify a different path, the configure line above puts them in /usr/local/lib by default. I let ld know about the libraries by adding a local.conf file to /etc/ld.so.conf.d/. sudo echo /usr/local/lib > /etc/ld.so.conf.d/local.conf

7. Run ldconfig again: sudo ldconfig


You should be able to open geodatabases in QGIS or any other GIS application that uses GDAL now. I expanded on notes that I took while doing the install, but I didn't have my linux laptop with me while writing this. Let me know if anything doesn't work or if clarification is needed.

On Nov 13, 2012 9:27 AM, "Johan Nilsson" <[hidden email]> wrote:

I have tried to find how I compile gdal 1.9.2 with ESRIs FileGDB_API, but I'm are very uncertain how it work. I have Ubuntu 10.04LTS 32-bit with PAE. I another step I downloaded source-code for gdal-1.9.2 and added needed packed with:

cd ~/Desktop/gdal-mod <--move cursor to the created folder.
apt-get source gdal-bin <--download source-cod from my respositories (same as my binary installed on my system, into the folder I stand in ~/Desktop/gdal-mod)
sudo apt-get build-dep gdal <--geting dependencies so my system can build the package gdal.


From https://github.com/usgin/ncgmp/wiki/Installation-Example I found this example

  1. cd ~/downloads <--change to the folder with the downloaded driver from ESRI

  2. tar xzf FileGDB_API_1_2-64.tar.gz <--unpacking

  3. cd ~/downloads/FileGDB_API/lib <--goes to a file in the unpacked FileGDB

  4. ln -s libfgdbunixrtl.so libfgdblinuxrtl.so <--made a symbolic link in the folder lib because ESRI change the name.

  5. cd ../.. <--up 2 levels

  6. tar xvf gdal-1.9.0.tar.gz <--unpacking, I have a newer file

  7. cd gdal-1.9.0

  8. ./configure --with-pg=/usr/bin/pg_config --with-fgdb=/home/ubuntu/downloads/FileGDB_API --with-geos=/usr/local/bin/geos-config --with-static-proj4=/usr/local/lib/libproj.a --with-python

  9. make

  10. sudo make install

First a question! If I make a 'make install', and if it don't work, how can i change back to my original gdal-bin?

Second. Does this install libFileGDBAPI.so (Read a tutorial, there they said that libFileGDBAPI.so should be install in it default directory, which I don't know where it is...


6. I have a newer version of gdal (1.9.2) and I have the 32-bit version on this machine. The swift '--with' in this example above are not so accurate for my system, I think? What does '--with' really do? Does it create links in gdal or does it more?

Does someone know which swift '--with ' I should have or are necessary or good to have? Do the FileGDB also get compiled at the same time?

I seach my system and change the path in the example: first where I have my FileGDB_API and then some other files have also a different path? Do I need all this --with, or does a default file add it?

My modified '--with', if it's needed?

./configure --with-pg=/usr/bin/pg_config --with-fgdb=/home/Joni/Desktop/gdal-mod/FileGDB_API --with-geos=/usr/bin/geos-config --with-static-proj4=/usr/lib/libproj.a --with-python

If I don't add anything more than, my FilGDB_API, there the source-code are, does there are any 'Default setting', so It work as now? I had a Postgis config-file as in the example. In this example they had compiled a geos package, but my system did have libgeos and a geos-config file in above blue directory. The '--with-static-proj4=/usr/local/lib/libproj.a' have I changed to another path, there I find a libproj.a file.

Hope someone can explain little..

/Cheers

Johan



_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user



_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: How to compile gdal with ESRI FileGDB

Eric Goddard
Hmmm, I didn't get any errors like that when I installed so I'm not sure what could be causing it. Do you have the build-essential package installed that provides the necessary compile tools? 


On Thu, Nov 15, 2012 at 3:14 AM, Johan Nilsson <[hidden email]> wrote:
Thanks very much Eric :)
I have read the instuctions, and
tar zxvf FileGDB_API_1_2-32.tar.gz went well but I'm stuck on point 4 in the fist part of you instruction to make a sample to test the driver:
~/Desktop/gdal-mod/FileGDB_API/samples$ make
It spot out a lot of thing complaining about 'undefiened reference to'... and it ends like:
../../lib/libFileGDBAPI.so: undefined reference to `PathFileExistsW(wchar_t const*)'
../../lib/libFileGDBAPI.so: undefined reference to `PathFindExtensionW(wchar_t const*)'
collect2: ld returned 1 exit status

make[1]: *** [../bin/Domains] Error 1
make[1]: Leaving directory `/home/a/Desktop/gdal-mod/FileGDB_API/samples/Domains'
make: *** [Domains] Error 2

Joni@Intel:~/Desktop/gdal-mod/FileGDB_API/samples$


I tried to ignore the errors above, but when I move to bin it was empty and nothing happend:
~/Desktop/gdal-mod/FileGDB_API/samples/bin$ ./Querying
bash: ./Querying: No such file or directory

I checked with ls -all and bin was empty.

Cheers and thanks
/Johan




2012/11/14 Eric Goddard <[hidden email]>

Below are the steps I use to add File Geodatabase support to gdal. This worked on Ubuntu 12.04 64-bit, but it doesn't use the deb source packages. Since you have a 32-bit ubuntu install, you need to download the 32-bit version of the FileGDB API. I tried to answer your questions as they come up in the steps I list below, so you may want to read through the whole thing before starting. Sorry for the length, but I hope it helps!

In terminal:

1. Change directory to wherever you downloaded the FileGDBAPI: cd path/to/FileGDBAPI_download

2. extract the archive: tar zxvf FileGDB_API_1_2-32.tar.gz NOTE: Since you are using 32-bit Ubuntu, you need to download the 32-bit FileGDB API.

3.You need to build the samples to make sure the API works. Change to the FileGDB_API samples folder: cd FileGDB_API/samples

4. type make

5. Run a sample to make sure it works. Change directory to the bin folder inside samples: cd bin , and then type ./Querying. You'll get a bunch of text in terminal, just make sure it doesn't spit out any errors.

6. If the sample runs successfully, you have a working FileGDB API and you are ready to compile GDAL. I like to move the FileGDB API to a better location than the downloads directory, but it is up to you. If you choose to move it, you can use the paths listed below. If you use your own location, change the path in the commands below to whatever you used. sudo mv <your location>/FileGDB_API /usr/local/

7. Create a LD configuration file so that gdal is able to find the FGDB libraries: sudo echo /usr/local/FileGDB_API/lib > etc/ld.so.conf.d/fgdb.conf 

An explanation of ld is below.

8. run ldconfig to update the linked libraries: sudo ldconfig

You're now ready to download and configure gdal.


1. Download gdal from http://download.osgeo.org/gdal/gdal-1.9.2.tar.gz
2. Extract the contents of the gdal archive: tar zxvf gdal-1.9.2.tar.gz

3. Change to the gdal directory: cd gdal-1.9.2

4. Now gdal needs to be configured. Your configure line may be different from the one below depending on the options you want included, but the important line to include is --with-fgdb=/usr/local/FileGDB_API. This is my configure line on my system:  ./configure --with-geos=yes --with-sqlite3 --with-python --with-spatialite --with-fgdb=/usr/local/FileGDB_API --with-postgres --with-odbc --with-libkml=yes --with-curl=yes --with-mrsid=/usr/local/MrSID_SDK/Raster_DSDK --with-mrsid_lidar=/usr/local/MrSID_SDK/Lidar_DSDK --with-openjpeg=/usr/include

The --with statements let the configuration script know what additional modules you want to be included in the compile. When you install packages, such as geos, from the repos the libraries are put in paths that ld (which is a utility that links libraries so that other applications are able to find them) knows about. When you compile by hand the general practice is to compile to /usr/local, which sometimes ld doesn't know about by default. You let ld know about additional paths by creating a configuration file in /etc/ld.so.conf.d/ that contains the path of your custom compiled libraries. 

To compile GDAL with the options you want, your line might look something like this:

./configure --with-geos=yes --with-sqlite3 --with-python --with-spatialite --with-fgdb=/usr/local/FileGDB_API --with-postgres --with-odbc

After configure runs, it will give you a summary that indicates what it was able to find. Check to make sure that there is a 'yes' beside the options you want. If there is a no beside something you want to include, you may need to scroll through the output and find the error to see what went wrong.


5. Now you can run make and make install. sudo make. When that finishes, run sudo make install.

6. One more step: you need to let ld know about the gdal libraries. Since we didn't specify a different path, the configure line above puts them in /usr/local/lib by default. I let ld know about the libraries by adding a local.conf file to /etc/ld.so.conf.d/. sudo echo /usr/local/lib > /etc/ld.so.conf.d/local.conf

7. Run ldconfig again: sudo ldconfig


You should be able to open geodatabases in QGIS or any other GIS application that uses GDAL now. I expanded on notes that I took while doing the install, but I didn't have my linux laptop with me while writing this. Let me know if anything doesn't work or if clarification is needed.

On Nov 13, 2012 9:27 AM, "Johan Nilsson" <[hidden email]> wrote:

I have tried to find how I compile gdal 1.9.2 with ESRIs FileGDB_API, but I'm are very uncertain how it work. I have Ubuntu 10.04LTS 32-bit with PAE. I another step I downloaded source-code for gdal-1.9.2 and added needed packed with:

cd ~/Desktop/gdal-mod <--move cursor to the created folder.
apt-get source gdal-bin <--download source-cod from my respositories (same as my binary installed on my system, into the folder I stand in ~/Desktop/gdal-mod)
sudo apt-get build-dep gdal <--geting dependencies so my system can build the package gdal.


From https://github.com/usgin/ncgmp/wiki/Installation-Example I found this example

  1. cd ~/downloads <--change to the folder with the downloaded driver from ESRI

  2. tar xzf FileGDB_API_1_2-64.tar.gz <--unpacking

  3. cd ~/downloads/FileGDB_API/lib <--goes to a file in the unpacked FileGDB

  4. ln -s libfgdbunixrtl.so libfgdblinuxrtl.so <--made a symbolic link in the folder lib because ESRI change the name.

  5. cd ../.. <--up 2 levels

  6. tar xvf gdal-1.9.0.tar.gz <--unpacking, I have a newer file

  7. cd gdal-1.9.0

  8. ./configure --with-pg=/usr/bin/pg_config --with-fgdb=/home/ubuntu/downloads/FileGDB_API --with-geos=/usr/local/bin/geos-config --with-static-proj4=/usr/local/lib/libproj.a --with-python

  9. make

  10. sudo make install

First a question! If I make a 'make install', and if it don't work, how can i change back to my original gdal-bin?

Second. Does this install libFileGDBAPI.so (Read a tutorial, there they said that libFileGDBAPI.so should be install in it default directory, which I don't know where it is...


6. I have a newer version of gdal (1.9.2) and I have the 32-bit version on this machine. The swift '--with' in this example above are not so accurate for my system, I think? What does '--with' really do? Does it create links in gdal or does it more?

Does someone know which swift '--with ' I should have or are necessary or good to have? Do the FileGDB also get compiled at the same time?

I seach my system and change the path in the example: first where I have my FileGDB_API and then some other files have also a different path? Do I need all this --with, or does a default file add it?

My modified '--with', if it's needed?

./configure --with-pg=/usr/bin/pg_config --with-fgdb=/home/Joni/Desktop/gdal-mod/FileGDB_API --with-geos=/usr/bin/geos-config --with-static-proj4=/usr/lib/libproj.a --with-python

If I don't add anything more than, my FilGDB_API, there the source-code are, does there are any 'Default setting', so It work as now? I had a Postgis config-file as in the example. In this example they had compiled a geos package, but my system did have libgeos and a geos-config file in above blue directory. The '--with-static-proj4=/usr/local/lib/libproj.a' have I changed to another path, there I find a libproj.a file.

Hope someone can explain little..

/Cheers

Johan



_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user




_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: How to compile gdal with ESRI FileGDB

Johan Nilsson-2
Hey. I have had a lot of things to do, but now I tried to make a sample again. I also made a ln -s libfgdblinuxrtl.so libfgdbunixrtl.so (ESRI changed the name of the driver)  I tried again and still stuck on make in samples, as in above and a very simulare error. I have build-essential with a lot of depends...

joni@Intel:~/Desktop/gdal-mod/FileGDB_API/samples$ make
make -C Domains
make[1]: Entering directory `/home/joni/Desktop/gdal-mod/FileGDB_API/samples/Domains'
g++ -fPIC -O3 -m32 -W -fexceptions -D_CONSOLE -DUNICODE -D_UNICODE -DUNIX -D_REENTRANT -DFILEGDB_API -D__USE_FILE_OFFSET64 -DUNIX_FILEGDB_API -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I../../include -I.  -c Domains.cpp
g++ -fPIC -O3 -m32 -W -fexceptions -D_CONSOLE -DUNICODE -D_UNICODE -DUNIX -D_REENTRANT -DFILEGDB_API -D__USE_FILE_OFFSET64 -DUNIX_FILEGDB_API -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I../../include -I. -m32 -L"../../lib" -o ../bin/Domains ./Domains.o -lFileGDBAPI
/usr/bin/ld: warning: libfgdbunixrtl.so, needed by ../../lib/libFileGDBAPI.so, not found (try using -rpath or -rpath-link)
../../lib/libFileGDBAPI.so: undefined reference to `SysAllocStringByteLen(char*, unsigned int)'
../../lib/libFileGDBAPI.so: undefined reference to `VarDateFromStr(wchar_t*, unsigned long, unsigned long, double*)'
../../lib/libFileGDBAPI.so: undefined reference to `IID_IGeometry'
.
..A lot of undefined references... <--my comments
.
../../lib/libFileGDBAPI.so: undefined reference to `PathFileExistsW(wchar_t const*)'
../../lib/libFileGDBAPI.so: undefined reference to `PathFindExtensionW(wchar_t const*)'
collect2: ld returned 1 exit status
make[1]: *** [../bin/Domains] Error 1
make[1]: Leaving directory `/home/joni/Desktop/gdal-mod/FileGDB_API/samples/Domains'
make: *** [Domains] Error 2

joni@Intel:~/Desktop/gdal-mod/FileGDB_API/samples$

I wonder if I need to change anything in linux dynamic linker (ld)?


2012/11/15 Eric Goddard <[hidden email]>
Hmmm, I didn't get any errors like that when I installed so I'm not sure what could be causing it. Do you have the build-essential package installed that provides the necessary compile tools? 


On Thu, Nov 15, 2012 at 3:14 AM, Johan Nilsson <[hidden email]> wrote:
Thanks very much Eric :)
I have read the instuctions, and
tar zxvf FileGDB_API_1_2-32.tar.gz went well but I'm stuck on point 4 in the fist part of you instruction to make a sample to test the driver:
~/Desktop/gdal-mod/FileGDB_API/samples$ make
It spot out a lot of thing complaining about 'undefiened reference to'... and it ends like:
../../lib/libFileGDBAPI.so: undefined reference to `PathFileExistsW(wchar_t const*)'
../../lib/libFileGDBAPI.so: undefined reference to `PathFindExtensionW(wchar_t const*)'
collect2: ld returned 1 exit status

make[1]: *** [../bin/Domains] Error 1
make[1]: Leaving directory `/home/a/Desktop/gdal-mod/FileGDB_API/samples/Domains'
make: *** [Domains] Error 2

Joni@Intel:~/Desktop/gdal-mod/FileGDB_API/samples$


I tried to ignore the errors above, but when I move to bin it was empty and nothing happend:
~/Desktop/gdal-mod/FileGDB_API/samples/bin$ ./Querying
bash: ./Querying: No such file or directory

I checked with ls -all and bin was empty.

Cheers and thanks
/Johan




2012/11/14 Eric Goddard <[hidden email]>

Below are the steps I use to add File Geodatabase support to gdal. This worked on Ubuntu 12.04 64-bit, but it doesn't use the deb source packages. Since you have a 32-bit ubuntu install, you need to download the 32-bit version of the FileGDB API. I tried to answer your questions as they come up in the steps I list below, so you may want to read through the whole thing before starting. Sorry for the length, but I hope it helps!

In terminal:

1. Change directory to wherever you downloaded the FileGDBAPI: cd path/to/FileGDBAPI_download

2. extract the archive: tar zxvf FileGDB_API_1_2-32.tar.gz NOTE: Since you are using 32-bit Ubuntu, you need to download the 32-bit FileGDB API.

3.You need to build the samples to make sure the API works. Change to the FileGDB_API samples folder: cd FileGDB_API/samples

4. type make

5. Run a sample to make sure it works. Change directory to the bin folder inside samples: cd bin , and then type ./Querying. You'll get a bunch of text in terminal, just make sure it doesn't spit out any errors.

6. If the sample runs successfully, you have a working FileGDB API and you are ready to compile GDAL. I like to move the FileGDB API to a better location than the downloads directory, but it is up to you. If you choose to move it, you can use the paths listed below. If you use your own location, change the path in the commands below to whatever you used. sudo mv <your location>/FileGDB_API /usr/local/

7. Create a LD configuration file so that gdal is able to find the FGDB libraries: sudo echo /usr/local/FileGDB_API/lib > etc/ld.so.conf.d/fgdb.conf 

An explanation of ld is below.

8. run ldconfig to update the linked libraries: sudo ldconfig

You're now ready to download and configure gdal.


1. Download gdal from http://download.osgeo.org/gdal/gdal-1.9.2.tar.gz
2. Extract the contents of the gdal archive: tar zxvf gdal-1.9.2.tar.gz

3. Change to the gdal directory: cd gdal-1.9.2

4. Now gdal needs to be configured. Your configure line may be different from the one below depending on the options you want included, but the important line to include is --with-fgdb=/usr/local/FileGDB_API. This is my configure line on my system:  ./configure --with-geos=yes --with-sqlite3 --with-python --with-spatialite --with-fgdb=/usr/local/FileGDB_API --with-postgres --with-odbc --with-libkml=yes --with-curl=yes --with-mrsid=/usr/local/MrSID_SDK/Raster_DSDK --with-mrsid_lidar=/usr/local/MrSID_SDK/Lidar_DSDK --with-openjpeg=/usr/include

The --with statements let the configuration script know what additional modules you want to be included in the compile. When you install packages, such as geos, from the repos the libraries are put in paths that ld (which is a utility that links libraries so that other applications are able to find them) knows about. When you compile by hand the general practice is to compile to /usr/local, which sometimes ld doesn't know about by default. You let ld know about additional paths by creating a configuration file in /etc/ld.so.conf.d/ that contains the path of your custom compiled libraries. 

To compile GDAL with the options you want, your line might look something like this:

./configure --with-geos=yes --with-sqlite3 --with-python --with-spatialite --with-fgdb=/usr/local/FileGDB_API --with-postgres --with-odbc

After configure runs, it will give you a summary that indicates what it was able to find. Check to make sure that there is a 'yes' beside the options you want. If there is a no beside something you want to include, you may need to scroll through the output and find the error to see what went wrong.


5. Now you can run make and make install. sudo make. When that finishes, run sudo make install.

6. One more step: you need to let ld know about the gdal libraries. Since we didn't specify a different path, the configure line above puts them in /usr/local/lib by default. I let ld know about the libraries by adding a local.conf file to /etc/ld.so.conf.d/. sudo echo /usr/local/lib > /etc/ld.so.conf.d/local.conf

7. Run ldconfig again: sudo ldconfig


You should be able to open geodatabases in QGIS or any other GIS application that uses GDAL now. I expanded on notes that I took while doing the install, but I didn't have my linux laptop with me while writing this. Let me know if anything doesn't work or if clarification is needed.

On Nov 13, 2012 9:27 AM, "Johan Nilsson" <[hidden email]> wrote:

I have tried to find how I compile gdal 1.9.2 with ESRIs FileGDB_API, but I'm are very uncertain how it work. I have Ubuntu 10.04LTS 32-bit with PAE. I another step I downloaded source-code for gdal-1.9.2 and added needed packed with:

cd ~/Desktop/gdal-mod <--move cursor to the created folder.
apt-get source gdal-bin <--download source-cod from my respositories (same as my binary installed on my system, into the folder I stand in ~/Desktop/gdal-mod)
sudo apt-get build-dep gdal <--geting dependencies so my system can build the package gdal.


From https://github.com/usgin/ncgmp/wiki/Installation-Example I found this example

  1. cd ~/downloads <--change to the folder with the downloaded driver from ESRI

  2. tar xzf FileGDB_API_1_2-64.tar.gz <--unpacking

  3. cd ~/downloads/FileGDB_API/lib <--goes to a file in the unpacked FileGDB

  4. ln -s libfgdbunixrtl.so libfgdblinuxrtl.so <--made a symbolic link in the folder lib because ESRI change the name.

  5. cd ../.. <--up 2 levels

  6. tar xvf gdal-1.9.0.tar.gz <--unpacking, I have a newer file

  7. cd gdal-1.9.0

  8. ./configure --with-pg=/usr/bin/pg_config --with-fgdb=/home/ubuntu/downloads/FileGDB_API --with-geos=/usr/local/bin/geos-config --with-static-proj4=/usr/local/lib/libproj.a --with-python

  9. make

  10. sudo make install

First a question! If I make a 'make install', and if it don't work, how can i change back to my original gdal-bin?

Second. Does this install libFileGDBAPI.so (Read a tutorial, there they said that libFileGDBAPI.so should be install in it default directory, which I don't know where it is...


6. I have a newer version of gdal (1.9.2) and I have the 32-bit version on this machine. The swift '--with' in this example above are not so accurate for my system, I think? What does '--with' really do? Does it create links in gdal or does it more?

Does someone know which swift '--with ' I should have or are necessary or good to have? Do the FileGDB also get compiled at the same time?

I seach my system and change the path in the example: first where I have my FileGDB_API and then some other files have also a different path? Do I need all this --with, or does a default file add it?

My modified '--with', if it's needed?

./configure --with-pg=/usr/bin/pg_config --with-fgdb=/home/Joni/Desktop/gdal-mod/FileGDB_API --with-geos=/usr/bin/geos-config --with-static-proj4=/usr/lib/libproj.a --with-python

If I don't add anything more than, my FilGDB_API, there the source-code are, does there are any 'Default setting', so It work as now? I had a Postgis config-file as in the example. In this example they had compiled a geos package, but my system did have libgeos and a geos-config file in above blue directory. The '--with-static-proj4=/usr/local/lib/libproj.a' have I changed to another path, there I find a libproj.a file.

Hope someone can explain little..

/Cheers

Johan



_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user





_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: How to compile gdal with ESRI FileGDB

Eric Goddard
I think you're right about ld. You need to run sudo ldconfig after creating the symlink so that make can find the correctly named library. 

Eric


On Sun, Nov 18, 2012 at 7:49 AM, Johan Nilsson <[hidden email]> wrote:
Hey. I have had a lot of things to do, but now I tried to make a sample again. I also made a ln -s libfgdblinuxrtl.so libfgdbunixrtl.so (ESRI changed the name of the driver)  I tried again and still stuck on make in samples, as in above and a very simulare error. I have build-essential with a lot of depends...

joni@Intel:~/Desktop/gdal-mod/FileGDB_API/samples$ make
make -C Domains
make[1]: Entering directory `/home/joni/Desktop/gdal-mod/FileGDB_API/samples/Domains'
g++ -fPIC -O3 -m32 -W -fexceptions -D_CONSOLE -DUNICODE -D_UNICODE -DUNIX -D_REENTRANT -DFILEGDB_API -D__USE_FILE_OFFSET64 -DUNIX_FILEGDB_API -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I../../include -I.  -c Domains.cpp
g++ -fPIC -O3 -m32 -W -fexceptions -D_CONSOLE -DUNICODE -D_UNICODE -DUNIX -D_REENTRANT -DFILEGDB_API -D__USE_FILE_OFFSET64 -DUNIX_FILEGDB_API -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I../../include -I. -m32 -L"../../lib" -o ../bin/Domains ./Domains.o -lFileGDBAPI
/usr/bin/ld: warning: libfgdbunixrtl.so, needed by ../../lib/libFileGDBAPI.so, not found (try using -rpath or -rpath-link)
../../lib/libFileGDBAPI.so: undefined reference to `SysAllocStringByteLen(char*, unsigned int)'
../../lib/libFileGDBAPI.so: undefined reference to `VarDateFromStr(wchar_t*, unsigned long, unsigned long, double*)'
../../lib/libFileGDBAPI.so: undefined reference to `IID_IGeometry'
.
..A lot of undefined references... <--my comments

.
../../lib/libFileGDBAPI.so: undefined reference to `PathFileExistsW(wchar_t const*)'
../../lib/libFileGDBAPI.so: undefined reference to `PathFindExtensionW(wchar_t const*)'
collect2: ld returned 1 exit status
make[1]: *** [../bin/Domains] Error 1
make[1]: Leaving directory `/home/joni/Desktop/gdal-mod/FileGDB_API/samples/Domains'

make: *** [Domains] Error 2

joni@Intel:~/Desktop/gdal-mod/FileGDB_API/samples$

I wonder if I need to change anything in linux dynamic linker (ld)?



2012/11/15 Eric Goddard <[hidden email]>
Hmmm, I didn't get any errors like that when I installed so I'm not sure what could be causing it. Do you have the build-essential package installed that provides the necessary compile tools? 


On Thu, Nov 15, 2012 at 3:14 AM, Johan Nilsson <[hidden email]> wrote:
Thanks very much Eric :)
I have read the instuctions, and
tar zxvf FileGDB_API_1_2-32.tar.gz went well but I'm stuck on point 4 in the fist part of you instruction to make a sample to test the driver:
~/Desktop/gdal-mod/FileGDB_API/samples$ make
It spot out a lot of thing complaining about 'undefiened reference to'... and it ends like:
../../lib/libFileGDBAPI.so: undefined reference to `PathFileExistsW(wchar_t const*)'
../../lib/libFileGDBAPI.so: undefined reference to `PathFindExtensionW(wchar_t const*)'
collect2: ld returned 1 exit status

make[1]: *** [../bin/Domains] Error 1
make[1]: Leaving directory `/home/a/Desktop/gdal-mod/FileGDB_API/samples/Domains'
make: *** [Domains] Error 2

Joni@Intel:~/Desktop/gdal-mod/FileGDB_API/samples$


I tried to ignore the errors above, but when I move to bin it was empty and nothing happend:
~/Desktop/gdal-mod/FileGDB_API/samples/bin$ ./Querying
bash: ./Querying: No such file or directory

I checked with ls -all and bin was empty.

Cheers and thanks
/Johan




2012/11/14 Eric Goddard <[hidden email]>

Below are the steps I use to add File Geodatabase support to gdal. This worked on Ubuntu 12.04 64-bit, but it doesn't use the deb source packages. Since you have a 32-bit ubuntu install, you need to download the 32-bit version of the FileGDB API. I tried to answer your questions as they come up in the steps I list below, so you may want to read through the whole thing before starting. Sorry for the length, but I hope it helps!

In terminal:

1. Change directory to wherever you downloaded the FileGDBAPI: cd path/to/FileGDBAPI_download

2. extract the archive: tar zxvf FileGDB_API_1_2-32.tar.gz NOTE: Since you are using 32-bit Ubuntu, you need to download the 32-bit FileGDB API.

3.You need to build the samples to make sure the API works. Change to the FileGDB_API samples folder: cd FileGDB_API/samples

4. type make

5. Run a sample to make sure it works. Change directory to the bin folder inside samples: cd bin , and then type ./Querying. You'll get a bunch of text in terminal, just make sure it doesn't spit out any errors.

6. If the sample runs successfully, you have a working FileGDB API and you are ready to compile GDAL. I like to move the FileGDB API to a better location than the downloads directory, but it is up to you. If you choose to move it, you can use the paths listed below. If you use your own location, change the path in the commands below to whatever you used. sudo mv <your location>/FileGDB_API /usr/local/

7. Create a LD configuration file so that gdal is able to find the FGDB libraries: sudo echo /usr/local/FileGDB_API/lib > etc/ld.so.conf.d/fgdb.conf 

An explanation of ld is below.

8. run ldconfig to update the linked libraries: sudo ldconfig

You're now ready to download and configure gdal.


1. Download gdal from http://download.osgeo.org/gdal/gdal-1.9.2.tar.gz
2. Extract the contents of the gdal archive: tar zxvf gdal-1.9.2.tar.gz

3. Change to the gdal directory: cd gdal-1.9.2

4. Now gdal needs to be configured. Your configure line may be different from the one below depending on the options you want included, but the important line to include is --with-fgdb=/usr/local/FileGDB_API. This is my configure line on my system:  ./configure --with-geos=yes --with-sqlite3 --with-python --with-spatialite --with-fgdb=/usr/local/FileGDB_API --with-postgres --with-odbc --with-libkml=yes --with-curl=yes --with-mrsid=/usr/local/MrSID_SDK/Raster_DSDK --with-mrsid_lidar=/usr/local/MrSID_SDK/Lidar_DSDK --with-openjpeg=/usr/include

The --with statements let the configuration script know what additional modules you want to be included in the compile. When you install packages, such as geos, from the repos the libraries are put in paths that ld (which is a utility that links libraries so that other applications are able to find them) knows about. When you compile by hand the general practice is to compile to /usr/local, which sometimes ld doesn't know about by default. You let ld know about additional paths by creating a configuration file in /etc/ld.so.conf.d/ that contains the path of your custom compiled libraries. 

To compile GDAL with the options you want, your line might look something like this:

./configure --with-geos=yes --with-sqlite3 --with-python --with-spatialite --with-fgdb=/usr/local/FileGDB_API --with-postgres --with-odbc

After configure runs, it will give you a summary that indicates what it was able to find. Check to make sure that there is a 'yes' beside the options you want. If there is a no beside something you want to include, you may need to scroll through the output and find the error to see what went wrong.


5. Now you can run make and make install. sudo make. When that finishes, run sudo make install.

6. One more step: you need to let ld know about the gdal libraries. Since we didn't specify a different path, the configure line above puts them in /usr/local/lib by default. I let ld know about the libraries by adding a local.conf file to /etc/ld.so.conf.d/. sudo echo /usr/local/lib > /etc/ld.so.conf.d/local.conf

7. Run ldconfig again: sudo ldconfig


You should be able to open geodatabases in QGIS or any other GIS application that uses GDAL now. I expanded on notes that I took while doing the install, but I didn't have my linux laptop with me while writing this. Let me know if anything doesn't work or if clarification is needed.

On Nov 13, 2012 9:27 AM, "Johan Nilsson" <[hidden email]> wrote:

I have tried to find how I compile gdal 1.9.2 with ESRIs FileGDB_API, but I'm are very uncertain how it work. I have Ubuntu 10.04LTS 32-bit with PAE. I another step I downloaded source-code for gdal-1.9.2 and added needed packed with:

cd ~/Desktop/gdal-mod <--move cursor to the created folder.
apt-get source gdal-bin <--download source-cod from my respositories (same as my binary installed on my system, into the folder I stand in ~/Desktop/gdal-mod)
sudo apt-get build-dep gdal <--geting dependencies so my system can build the package gdal.


From https://github.com/usgin/ncgmp/wiki/Installation-Example I found this example

  1. cd ~/downloads <--change to the folder with the downloaded driver from ESRI

  2. tar xzf FileGDB_API_1_2-64.tar.gz <--unpacking

  3. cd ~/downloads/FileGDB_API/lib <--goes to a file in the unpacked FileGDB

  4. ln -s libfgdbunixrtl.so libfgdblinuxrtl.so <--made a symbolic link in the folder lib because ESRI change the name.

  5. cd ../.. <--up 2 levels

  6. tar xvf gdal-1.9.0.tar.gz <--unpacking, I have a newer file

  7. cd gdal-1.9.0

  8. ./configure --with-pg=/usr/bin/pg_config --with-fgdb=/home/ubuntu/downloads/FileGDB_API --with-geos=/usr/local/bin/geos-config --with-static-proj4=/usr/local/lib/libproj.a --with-python

  9. make

  10. sudo make install

First a question! If I make a 'make install', and if it don't work, how can i change back to my original gdal-bin?

Second. Does this install libFileGDBAPI.so (Read a tutorial, there they said that libFileGDBAPI.so should be install in it default directory, which I don't know where it is...


6. I have a newer version of gdal (1.9.2) and I have the 32-bit version on this machine. The swift '--with' in this example above are not so accurate for my system, I think? What does '--with' really do? Does it create links in gdal or does it more?

Does someone know which swift '--with ' I should have or are necessary or good to have? Do the FileGDB also get compiled at the same time?

I seach my system and change the path in the example: first where I have my FileGDB_API and then some other files have also a different path? Do I need all this --with, or does a default file add it?

My modified '--with', if it's needed?

./configure --with-pg=/usr/bin/pg_config --with-fgdb=/home/Joni/Desktop/gdal-mod/FileGDB_API --with-geos=/usr/bin/geos-config --with-static-proj4=/usr/lib/libproj.a --with-python

If I don't add anything more than, my FilGDB_API, there the source-code are, does there are any 'Default setting', so It work as now? I had a Postgis config-file as in the example. In this example they had compiled a geos package, but my system did have libgeos and a geos-config file in above blue directory. The '--with-static-proj4=/usr/local/lib/libproj.a' have I changed to another path, there I find a libproj.a file.

Hope someone can explain little..

/Cheers

Johan



_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user






_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: How to compile gdal with ESRI FileGDB

Noli Sicad
I think you have to look at this link as well.

Building GDAL 1.9.x with ESRI FileGDB support on OS X Lion

https://gist.github.com/4108883

Most of the things that works in OS X works as well as in LInux and vice versa.

OS X use gcc, configure, make and make install.

Noli
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: How to compile gdal with ESRI FileGDB

josef k
In reply to this post by Johan Nilsson-2
Hi Johan 

I succeded installing gdal 1.9.1 with FileGDB support on ubuntu 12.04, 32-bit, by the following procedure:
tar xzf FileGDB_API_1_2-32.tar.gz 
cd FileGDB_API/lib
ln -sf libfgdbunixrtl.so libfgdblinuxrtl.so
sudo ldconfig
sudo sh -c 'echo "~/FileGDB_API/lib" >> /etc/ld.so.conf'
sudo ldconfig
cd ..
tar xvf gdal-1.9.1.tar.gz
cd gdal-1.9.1
./configure --with-python --with-fgdb=~/FileGDB_API
make
sudo make install
sudo ldconfig

installation verified by: 
gdal-config --version 

and I have succeded in converting a spatialite database to an ESRI file gdb by:
ogr2ogr -f "FileGDB" ~/test.gdb ~/test.sqlite

Now I would like to have a qgis-master installation using gdal 1.9.1 but this remains unsolved. 

Hope this helps!
/Josef

_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: How to compile gdal with ESRI FileGDB

Johan Nilsson-2
Thanks Josef :)

I followed your guide, with little different path and I also use gdal_1.9.2. Your sudo ldconfig make sense :)  .But under ./confige . I get an error:

joni@Intel:~/Desktop/gdal-mod/gdal-1.9.2$ ./configure --with-python --with-fgdb=~/Desktop/gdal-mod/FileGDB_API
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
...
..and a lot of output...
...
checking openjpeg.h presence... yes
checking for openjpeg.h... yes
checking for libFileGDBAPI.so in in ~/Desktop/gdal-mod/FileGDB_API/lib... configure: error: not found.
joni@Intel:~/Desktop/gdal-mod/gdal-1.9.2$ make
GNUmakefile:2: GDALmake.opt: No such file or directory
make: *** No rule to make target `config.status', needed by `GDALmake.opt'.  Stop.


joni@Intel:~/Desktop/gdal-mod/FileGDB_API/lib$ ls
libfgdblinuxrtl.so  libfgdbunixrtl.so  libFileGDBAPI.so
joni@Intel:~/Desktop/gdal-mod/FileGDB_API/lib$

The first error under ./config seems really weird, because I have libFileGDBAPI.so in the folder it search in..

The second error do I not understand...but it is maybe dependent of the first..

I may be a little slow in responding because this is not a really urgent matter, but It should bee nice to read and create ESRIs FileDB in the future...

/Cheers and thanx again


2012/11/21 Josef K <[hidden email]>
Hi Johan 

I succeded installing gdal 1.9.1 with FileGDB support on ubuntu 12.04, 32-bit, by the following procedure:
tar xzf FileGDB_API_1_2-32.tar.gz 
cd FileGDB_API/lib
ln -sf libfgdbunixrtl.so libfgdblinuxrtl.so
sudo ldconfig
sudo sh -c 'echo "~/FileGDB_API/lib" >> /etc/ld.so.conf'
sudo ldconfig
cd ..
tar xvf gdal-1.9.1.tar.gz
cd gdal-1.9.1
./configure --with-python --with-fgdb=~/FileGDB_API
make
sudo make install
sudo ldconfig

installation verified by: 
gdal-config --version 

and I have succeded in converting a spatialite database to an ESRI file gdb by:
ogr2ogr -f "FileGDB" ~/test.gdb ~/test.sqlite

Now I would like to have a qgis-master installation using gdal 1.9.1 but this remains unsolved. 

Hope this helps!
/Josef


_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user