Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
$ . ~/virtualenvs/python27/bin/activate
(python27_paul)$ cd /usr/local/src/gdal-1.8.1/
(python27_paul)$ ./configure --prefix=/home/dev/virtualenvs/python27_paul
(python27_paul)$ make && make install
(python27_paul)$ pip install --no-install GDAL==1.8.1
(python27_paul)$ vim ~/virtualenvs/python27_paul/build/GDAL/setup.py
# replace
#   extra_link_args = []
# with 
#   extra_link_args = ['-Wl,-R/home/dev/virtualenvs/python27_paul/lib']

(python27_paul)$ cd virtualenvs/python27_paul/build/GDAL

(python27_paul)$ python setup.py build_ext --gdal-config=gdal-config --library-dirs=/home/dev/virtualenvs/python27_paul/lib --include-dirs=/home/dev/virtualenvs/python27_paul/include install

# confirm linked library is correct
$ ldd /home/dev/virtualenvs/python27/lib/python2.7/site-packages/GDAL-1.8.1-py2.7-linux-x86_64.egg/osgeo/_gdal.so
...
# should be pointing to the correct version of the libs
...
(python27_paul)$ python 
Python 2.7.3 (default, May  9 2012, 14:28:18) [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] ...
>>> import gdal
>>> 
>>> exit()
(python27_paul)$
(python27_paul)$ deactivate
$

email from Jeff Frost

...