conda / conda-build

Commands and tools for building conda packages
https://docs.conda.io/projects/conda-build/
Other
382 stars 423 forks source link

conda build exits with Python OSError (GDAL with GEOS support build attempt) #332

Closed vitale232 closed 9 years ago

vitale232 commented 9 years ago

The version of GDAL that is available via conda install does not include GEOS support, which is a problem for a large portion of our code base. To remedy the issue, I have been attempting to build a separate conda package for GDAL that includes GEOS support.

It seems like I'm almost there, but I'm getting a Python error. It seems like everything succeeds with the make and make install, but then the conda build*.py scripts are crashing.

Any help as to what could be going wrong is much appreciated!

./gdal_geos/meta.yaml:

package: name: gdal_geos version: 1.11.2

source: fn: gdal-1.11.2.tar.gz url: http://download.osgeo.org/gdal/1.11.2/gdal-1.11.2.tar.gz md5: 866a46f72b1feadd60310206439c1a76

build: number: 0

requirements: build:

about: home: http://www.gdal.org/index.html license: MIT


./gdal_geos/build.sh:

chmod 755 configure ./configure \ --prefix=$PREFIX \ --with-geos=yes \ --with-hdf5=yes \ --with-hdf4=yes \ --with-python=yes \ --with-java=no

make make install


Traceback + a little:

nstalled /home/vitale232/anaconda/envs/_build/lib/python2.7/site-packages/GDAL-1.11.2-py2.7-linux-x86_64.egg Processing dependencies for GDAL==1.11.2 Finished processing dependencies for GDAL==1.11.2 for f in ls ./scripts ; do /bin/bash /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/libtool --mode=install /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/$f /home/vitale232/anaconda/envs/_build/bin ; done libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/epsg_tr.py /home/vitale232/anaconda/envs/_build/bin/epsg_tr.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/esri2wkt.py /home/vitale232/anaconda/envs/_build/bin/esri2wkt.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gcps2vec.py /home/vitale232/anaconda/envs/_build/bin/gcps2vec.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gcps2wld.py /home/vitale232/anaconda/envs/_build/bin/gcps2wld.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdal2tiles.py /home/vitale232/anaconda/envs/_build/bin/gdal2tiles.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdal2xyz.py /home/vitale232/anaconda/envs/_build/bin/gdal2xyz.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdal_auth.py /home/vitale232/anaconda/envs/_build/bin/gdal_auth.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdal_calc.dox /home/vitale232/anaconda/envs/_build/bin/gdal_calc.dox libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdal_calc.py /home/vitale232/anaconda/envs/_build/bin/gdal_calc.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdalchksum.py /home/vitale232/anaconda/envs/_build/bin/gdalchksum.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdalcompare.dox /home/vitale232/anaconda/envs/_build/bin/gdalcompare.dox libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdalcompare.py /home/vitale232/anaconda/envs/_build/bin/gdalcompare.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdal_edit.dox /home/vitale232/anaconda/envs/_build/bin/gdal_edit.dox libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdal_edit.py /home/vitale232/anaconda/envs/_build/bin/gdal_edit.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdal_fillnodata.dox /home/vitale232/anaconda/envs/_build/bin/gdal_fillnodata.dox libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdal_fillnodata.py /home/vitale232/anaconda/envs/_build/bin/gdal_fillnodata.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdalident.py /home/vitale232/anaconda/envs/_build/bin/gdalident.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdalimport.py /home/vitale232/anaconda/envs/_build/bin/gdalimport.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdal_merge.py /home/vitale232/anaconda/envs/_build/bin/gdal_merge.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdalmove.dox /home/vitale232/anaconda/envs/_build/bin/gdalmove.dox libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdalmove.py /home/vitale232/anaconda/envs/_build/bin/gdalmove.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdal_polygonize.dox /home/vitale232/anaconda/envs/_build/bin/gdal_polygonize.dox libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdal_polygonize.py /home/vitale232/anaconda/envs/_build/bin/gdal_polygonize.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdal_proximity.dox /home/vitale232/anaconda/envs/_build/bin/gdal_proximity.dox libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdal_proximity.py /home/vitale232/anaconda/envs/_build/bin/gdal_proximity.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdal_retile.py /home/vitale232/anaconda/envs/_build/bin/gdal_retile.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdal_sieve.dox /home/vitale232/anaconda/envs/_build/bin/gdal_sieve.dox libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/gdal_sieve.py /home/vitale232/anaconda/envs/_build/bin/gdal_sieve.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/mkgraticule.py /home/vitale232/anaconda/envs/_build/bin/mkgraticule.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/pct2rgb.py /home/vitale232/anaconda/envs/_build/bin/pct2rgb.py libtool: install: /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c ./scripts/rgb2pct.py /home/vitale232/anaconda/envs/build/bin/rgb2pct.py make[2]: Leaving directory /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/swig/python' make[1]: Leaving directory/home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/swig' for f in LICENSE.TXT data/._ ; do /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c -m 0644 $f /home/vitale232/anaconda/envs/_build/share/gdal ; done /bin/bash /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/libtool --mode=finish --silent /home/vitale232/anaconda/envs/_build/lib /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -d /home/vitale232/anaconda/envs/_build/lib/pkgconfig /home/vitale232/anaconda/conda-bld/work/gdal-1.11.2/install-sh -c -m 0644 gdal.pc /home/vitale232/anaconda/envs/_build/lib/pkgconfig/gdal.pc found egg dir: /home/vitale232/anaconda/envs/_build/lib/python2.7/site-packages/GDAL-1.11.2-py2.7-linux-x86_64.egg An unexpected error has occurred, please consider sending the following traceback to the conda GitHub issue tracker at:

https://github.com/conda/conda-build/issues

Include the output of the command 'conda info' in your report.

Traceback (most recent call last): File "/home/vitale232/anaconda/bin/conda-build", line 5, in sys.exit(main()) File "/home/vitale232/anaconda/lib/python2.7/site-packages/conda_build/main_build.py", line 110, in main args_func(args, p) File "/home/vitale232/anaconda/lib/python2.7/site-packages/conda_build/main_build.py", line 308, in args_func args.func(args, p) File "/home/vitale232/anaconda/lib/python2.7/site-packages/conda_build/main_build.py", line 268, in execute build.build(m, verbose=not args.quiet, post=post) File "/home/vitale232/anaconda/lib/python2.7/site-packages/conda_build/build.py", line 354, in build post_process(preserve_egg_dir=bool(m.get_value('build/preserve_egg_dir'))) File "/home/vitale232/anaconda/lib/python2.7/site-packages/conda_build/post.py", line 136, in post_process remove_easy_install_pth(preserve_egg_dir=preserve_egg_dir) File "/home/vitale232/anaconda/lib/python2.7/site-packages/conda_build/post.py", line 95, in remove_easy_install_pth utils.copy_into(join(egg_path, fn), join(sp_dir, fn)) File "/home/vitale232/anaconda/lib/python2.7/site-packages/conda_build/utils.py", line 21, in copy_into tocopy = os.listdir(src) OSError: [Errno 20] Not a directory: '/home/vitale232/anaconda/envs/_build/lib/python2.7/site-packages/GDAL-1.11.2-py2.7-linux-x86_64.egg/gdalnumeric.py'


*conda info

         platform : linux-64
    conda version : 3.9.1

conda-build version : 1.8.2 python version : 2.7.9.final.0 requests version : 2.5.3 root environment : /home/vitale232/anaconda (writable) default environment : /home/vitale232/anaconda envs directories : /home/vitale232/anaconda/envs package cache : /home/vitale232/anaconda/pkgs channel URLs : https://conda.binstar.org/birdhouse/linux-64/ https://conda.binstar.org/birdhouse/noarch/ http://repo.continuum.io/pkgs/free/linux-64/ http://repo.continuum.io/pkgs/free/noarch/ http://repo.continuum.io/pkgs/pro/linux-64/ http://repo.continuum.io/pkgs/pro/noarch/ config file : /home/vitale232/.condarc is foreign system : False


asmeurer commented 9 years ago

Can you show me your conda info?

vitale232 commented 9 years ago

Sorry about that. I appended the original post with conda info output.

vitale232 commented 9 years ago

After digging through some other issues and maintaining persistence, I was able to resolve this. This meta.yaml does the trick:


package: name: gdal_geos version: 1.11.2

source: fn: gdal-1.11.2.tar.gz url: http://download.osgeo.org/gdal/1.11.2/gdal-1.11.2.tar.gz md5: 866a46f72b1feadd60310206439c1a76

build: number: 0 preserve_egg_dir: True

requirements: build:

about: home: http://www.gdal.org/index.html license: MIT


I think in particular, adding preserve_egg_dir: True solved it.

github-actions[bot] commented 2 years ago

Hi there, thank you for your contribution!

This issue has been automatically locked because it has not had recent activity after being closed.

Please open a new issue if needed.

Thanks!