[gdal-dev] Build GDAL from scratch on CentOS 6.5 (Jake Brinkmann)

Jake Brinkmann jakebrinkmann at gmail.com
Mon Aug 18 10:54:44 PDT 2014


Hey Jose!

That looks like is is exactly what I need! I really appreciate you doing
this.
I installed it on a fresh version of Anaconda, but could not import gdal:

jbrinkmann> python -c "from osgeo import gdal"
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File
> "/workspace/jbrinkmann/.gdalpy/lib/python2.7/site-packages/osgeo/__init__.py",
> line 21, in <module>
>     _gdal = swig_import_helper()
>   File
> "/workspace/jbrinkmann/.gdalpy/lib/python2.7/site-packages/osgeo/__init__.py",
> line 17, in swig_import_helper
>     _mod = imp.load_module('_gdal', fp, pathname, description)
> ImportError:
> /workspace/jbrinkmann/.gdalpy/lib/python2.7/site-packages/osgeo/_gdal.so:
> undefined symbol: GDALRasterBandGetVirtualMem
>

Do you know what the issue could be?

Thanks again!


On Mon, Aug 18, 2014 at 12:59 PM, Jose Gomez-Dans <jgomezdans at gmail.com>
wrote:

> Hello,
>
> I have produced a GDAL (1.11.0) binary for Anaconda with HDF4, HDF5 and
> NetCDF for X86_64. It should just work by installing standard anaconda and
> issuing the following command:
>
> conda install -c https://conda.binstar.org/jgomezdans gdal=1.11.0
>
> The list of supported raster formats is available here:
> https://gist.github.com/jgomezdans/11c1bb9ce266495e6544, but in reality,
> I need it for working with MODIS data, so only tested MODIS, HDF5 and
> netcdf.
>
> Hope it's of use to other people!
> Jose
>
>
> On 18 August 2014 14:54, Jake Brinkmann <jakebrinkmann at gmail.com> wrote:
>
>> Hey Daniel,
>>
>> Much appreciated! I think building my own on a VM might be the next thing
>> I try.
>> I attempted to use jevans version, with a fresh install of Anaconda, but
>> to no avail.
>> The code here:
>> https://gist.github.com/jake-brinkmann/fb4bd3f4625b209978d0 still didn't
>> work.
>>
>> I'll look through the examples to attempt again after building my own
>> package.
>>
>> Thank you!
>> Jake
>>
>>
>> On Sat, Aug 16, 2014 at 4:34 AM, Daniel Clewley <daniel.clewley at gmail.com
>> > wrote:
>>
>>> Hi Jake,
>>>
>>> As you mentioned Anaconda Python, one options is to install a different
>>> GDAL build from binstar someone has built with HDF4 support or build
>>> yourself using the conda build system on a virtual machine you have root
>>> access to and then install these binaries through conda.
>>>
>>> A quick search of binstar.org showed the following user with GDAL built
>>> against HDF4:
>>>
>>> https://binstar.org/jevans
>>>
>>> You should be able to install this version of GDAL through conda using:
>>>
>>> conda install -c https://conda.binstar.org/jevans gdal
>>>
>>> Note: I haven't tested this.
>>>
>>> Building your own packages is a bit more involved - basically you create
>>> a recipe and then build it using:
>>>
>>> conda build recipe-folder
>>>
>>> There is a github repository with lots of examples here:
>>>
>>> https://github.com/conda/conda-recipes/
>>>
>>> We've built GDAL and other software through conda for Linux and OS X
>>> under virtual machines and installed on different machines (without root
>>> access) and it's worked pretty well.
>>>
>>> Hope this helps and the discussion of conda isn't too off topic.
>>>
>>> Thanks,
>>>
>>> Dan
>>>
>>> On 15 Aug 2014 23:11, Even Rouault <even.rouault at spatialys.com> wrote:
>>> >
>>> > Jake,
>>> >
>>> > well if you don't have the basic build dependencies, this might get
>>> > complicated... Nothing impossible, but might take time indeed.
>>> > Well one possibility is to access a CentOS where you have a root
>>> access (e.g. a
>>> > VM that you install), build on it, and then copy the resulting
>>> binaries.
>>> >
>>> > Even
>>> >
>>> >> Hey Even,
>>> >>
>>> >> Thank you for outlining this. The trouble I have is that, without root
>>> >> access, `make install` is a never-ending list of missing libraries, or
>>> >> compilation errors...
>>> >> Do you know of a way to resolve the missing libraries without root
>>> access
>>> >> (and without wasting the next 48hours untaring, compiling, and
>>> installing)?
>>> >>
>>> >> Just as an example, I cant even compile the HDF4 source with
>>> `./configure
>>> >> --prefix=/have/write/access` because of something with Fortran and
>>> g77... I
>>> >> disable fortran as `./configure --prefix=/have/write/access
>>> >> --enable-fortran=NO` but then it fails due to missing yacc
>>> utility.... This
>>> >> continues until I get so lost as to what library I'm installing for
>>> what
>>> >> package, that it just seems there must be an easier way...
>>> >>
>>> >> If you have any thoughts, please, let me know.
>>> >>
>>> >> Thank you for reaching out.
>>> >> Jake
>>> >>
>>> >>
>>> >> On Fri, Aug 15, 2014 at 4:45 PM, Even Rouault <
>>> even.rouault at spatialys.com>
>>> >> wrote:
>>> >>
>>> >>> Selon Jake Brinkmann <jakebrinkmann at gmail.com>:
>>> >>>
>>> >>>> Hello all geospatial-web-wizards,
>>> >>>>
>>> >>>> I am struggling pretty hard building the GDAL libraries and all the
>>> >>>> countless dependencies from source in CentOS6.5. I do not have root
>>> >>> access
>>> >>>> on my machine, but I need the GDAL (as well as HDF, GeoTiff, GEOS,
>>> etc.)
>>> >>>> libraries for performing image processing using the Terra/Aqua MODIS
>>> >>>> satellite remote sensing data.
>>> >>>> Does anyone out there have experience building GDAL along with HDF
>>> and
>>> >>>> Python bindings, but without, and I emphasize here: *without* root
>>> >>> access?
>>> >>>> Alternatively, if possible, I would be willing to install a binary,
>>> but
>>> >>>> remember: I do not have root access (so I'm not sure this would
>>> work...)
>>> >>>> and lack experience with *.rpm files
>>> >>>>
>>> >>>> Let me know, please, if anyone has any ideas at all.
>>> >>>> I am really wishing the Anaconda Python distribution would come
>>> with GDAL
>>> >>>> supporting HDF4, but it currently does not...
>>> >>>>
>>> >>>> Thanks for reading, and any help you can provide,
>>> >>>
>>> >>> Jake,
>>> >>>
>>> >>> It is always possible to build without root access.
>>> >>> The scheme is :
>>> >>> 1) Download HDF4 sources, untar, cd to the source directory
>>> >>> 2) ./configure --prefix=/somewhere/where/you/have/write/access
>>> >>> 3) make install
>>> >>> 4) Download GDAL sources, untar, cd to the source directory
>>> >>> 5) ./configure --prefix=/somewhere/where/you/have/write/access
>>> >>> --with-hdf4=/somewhere/where/you/have/write/access
>>> >>> 6) make install
>>> >>> 7) cd swig/python
>>> >>> 8) python setup.py build
>>> >>> 9) export PYTHONPATH=$PWD/build/lib.linuxXXXXXXXX (to be adapted
>>> depending
>>> >>> on
>>> >>> your architecture and Python version)
>>> >>> 10) export PATH=/somewhere/where/you/have/write/access/bin:$PATH
>>> >>> 11) export LD_LIBRARY_PATH=/somewhere/where/you/have/write/access/lib
>>> >>>
>>> >>> You should be done.
>>> >>>
>>> >>> Even
>>> >>>
>>> >>> --
>>> >>> Spatialys - Geospatial professional services
>>> >>> http://www.spatialys.com
>>>
>>>
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140818/e213b111/attachment-0001.html>


More information about the gdal-dev mailing list