Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: README installation instructions fail on GDAL installation with pip. #226

Closed
sevro opened this issue Aug 9, 2019 · 5 comments
Closed

Comments

@sevro
Copy link

sevro commented Aug 9, 2019

Summary of the bug

Installation instructions fail on GDAL installation with pip.

Steps to reproduce the bug

Execute the installation instructions from the README.

git clone https://github.com/CosmiQ/solaris.git
cd solaris
conda env create -n solaris -f environment-gpu.yml
conda activate solaris
pip install .

I also tried installation with environment.yml with the same result.

Buggy behaviour and/or error message

Installation fails with error: ‘GDALGetSpatialRef’ was not declared in this scope:

Processing /home/datenstrom/workspace/src/github.com/CosmiQ/solaris
Requirement already satisfied: shapely>=1.6.4 in /home/datenstrom/.local/lib/python3.6/site-packages (from solaris==0.1.2) (1.6.4.post2)
Requirement already satisfied: fiona>=1.8.6 in /home/datenstrom/.local/lib/python3.6/site-packages (from solaris==0.1.2) (1.8.6)
Requirement already satisfied: pandas>=0.24.2 in /home/datenstrom/.local/lib/python3.6/site-packages (from solaris==0.1.2) (0.24.2)
Requirement already satisfied: geopandas>=0.4.1 in /home/datenstrom/.local/lib/python3.6/site-packages (from solaris==0.1.2) (0.5.1)
Requirement already satisfied: opencv-python==4.1.0.25 in /home/datenstrom/.local/lib/python3.6/site-packages (from solaris==0.1.2) (4.1.0.25)
Requirement already satisfied: numpy>=1.16.4 in /home/datenstrom/.local/lib/python3.6/site-packages (from solaris==0.1.2) (1.16.4)
Requirement already satisfied: tqdm>=4.32.2 in /home/datenstrom/.local/lib/python3.6/site-packages (from solaris==0.1.2) (4.32.2)
Collecting GDAL>=2.4.0 (from solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/26/c6/f8846ba726b37f9a1099acb5bff43c309fb913577674c1ba491f6fc60598/GDAL-3.0.1.tar.gz
Collecting rtree>=0.8.3 (from solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/33/0d/0bcb0fdd759570e85697189f675fa462131e5636482f2832288bbe4bb6f7/Rtree-0.8.3-py3-none-any.whl
Collecting networkx>=2.3 (from solaris==0.1.2)
Collecting rasterio>=1.0.18 (from solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/ab/71/0f5f2bc8c1e34260b460fa2717a48317677bb4711166a2165b0c4ab1a68b/rasterio-1.0.25-cp36-cp36m-manylinux1_x86_64.whl
Collecting rio-cogeo>=1.0.0 (from solaris==0.1.2)
Requirement already satisfied: scipy>=1.3.0 in /home/datenstrom/.local/lib/python3.6/site-packages (from solaris==0.1.2) (1.3.0)
Requirement already satisfied: urllib3==1.24.3 in /home/datenstrom/.local/lib/python3.6/site-packages (from solaris==0.1.2) (1.24.3)
Collecting scikit-image>=0.15.0 (from solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/d4/ab/674e168bf7d0bc597218b3bec858d02c23fbac9ec1fec9cad878c6cee95f/scikit_image-0.15.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting tensorflow==1.13.1 (from solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/77/63/a9fa76de8dffe7455304c4ed635be4aa9c0bacef6e0633d87d5f54530c5c/tensorflow-1.13.1-cp36-cp36m-manylinux1_x86_64.whl
Requirement already satisfied: torch>=1.1.0 in /home/datenstrom/.local/lib/python3.6/site-packages (from solaris==0.1.2) (1.1.0)
Requirement already satisfied: matplotlib>=3.1.1 in /home/datenstrom/.local/lib/python3.6/site-packages (from solaris==0.1.2) (3.1.1)
Collecting affine>=2.2.2 (from solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/56/5d/6877929932d17850fa4903d0db8233ec8ed35aab7ceae96fa44ea6d479bd/affine-2.2.2-py2.py3-none-any.whl
Collecting albumentations>=0.2.3 (from solaris==0.1.2)
Collecting requests>=2.22.0 (from solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl
Requirement already satisfied: pyyaml>=5.1 in /home/datenstrom/.local/lib/python3.6/site-packages (from solaris==0.1.2) (5.1.1)
Requirement already satisfied: torchvision>=0.3.0 in /home/datenstrom/.local/lib/python3.6/site-packages (from solaris==0.1.2) (0.3.0)
Requirement already satisfied: attrs>=17 in /home/datenstrom/.local/lib/python3.6/site-packages (from fiona>=1.8.6->solaris==0.1.2) (19.1.0)
Requirement already satisfied: munch in /home/datenstrom/.local/lib/python3.6/site-packages (from fiona>=1.8.6->solaris==0.1.2) (2.3.2)
Requirement already satisfied: cligj>=0.5 in /home/datenstrom/.local/lib/python3.6/site-packages (from fiona>=1.8.6->solaris==0.1.2) (0.5.0)
Requirement already satisfied: click-plugins>=1.0 in /home/datenstrom/.local/lib/python3.6/site-packages (from fiona>=1.8.6->solaris==0.1.2) (1.1.1)
Requirement already satisfied: six>=1.7 in /home/datenstrom/.local/lib/python3.6/site-packages (from fiona>=1.8.6->solaris==0.1.2) (1.12.0)
Requirement already satisfied: click<8,>=4.0 in /home/datenstrom/.local/lib/python3.6/site-packages (from fiona>=1.8.6->solaris==0.1.2) (7.0)
Requirement already satisfied: pytz>=2011k in /home/datenstrom/.local/lib/python3.6/site-packages (from pandas>=0.24.2->solaris==0.1.2) (2019.1)
Requirement already satisfied: python-dateutil>=2.5.0 in /home/datenstrom/.local/lib/python3.6/site-packages (from pandas>=0.24.2->solaris==0.1.2) (2.8.0)
Requirement already satisfied: pyproj in /home/datenstrom/.local/lib/python3.6/site-packages (from geopandas>=0.4.1->solaris==0.1.2) (2.2.1)
Requirement already satisfied: setuptools in /home/datenstrom/.local/lib/python3.6/site-packages (from rtree>=0.8.3->solaris==0.1.2) (41.0.1)
Requirement already satisfied: decorator>=4.3.0 in /home/datenstrom/.local/lib/python3.6/site-packages (from networkx>=2.3->solaris==0.1.2) (4.4.0)
Collecting snuggs>=1.4.1 (from rasterio>=1.0.18->solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/58/14/8e90b7586ab6929861161e73e9fd55637a060e4d14dd1be14a4b8a08751f/snuggs-1.4.6-py3-none-any.whl
Collecting mercantile (from rio-cogeo>=1.0.0->solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/9d/1d/80d28ba17e4647bf820e8d5f485d58f9da9c5ca424450489eb49e325ba66/mercantile-1.1.2-py3-none-any.whl
Collecting supermercado (from rio-cogeo>=1.0.0->solaris==0.1.2)
Requirement already satisfied: pillow>=4.3.0 in /home/datenstrom/.local/lib/python3.6/site-packages (from scikit-image>=0.15.0->solaris==0.1.2) (6.1.0)
Collecting imageio>=2.0.1 (from scikit-image>=0.15.0->solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/af/0a/943c965d372dae0b1f1482677d29030ab834351a61a9a632fd62f27f1523/imageio-2.5.0-py3-none-any.whl
Collecting PyWavelets>=0.4.0 (from scikit-image>=0.15.0->solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/4e/cd/528dba0b474b08f6f9a3a5e1b4bb23d8e33ed5d9f0e321cc967c2607df05/PyWavelets-1.0.3-cp36-cp36m-manylinux1_x86_64.whl
Requirement already satisfied: wheel>=0.26 in /usr/lib/python3/dist-packages (from tensorflow==1.13.1->solaris==0.1.2) (0.30.0)
Collecting protobuf>=3.6.1 (from tensorflow==1.13.1->solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/eb/f4/a27952733796330cd17c17ea1f974459f5fefbbad119c0f296a6d807fec3/protobuf-3.9.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting gast>=0.2.0 (from tensorflow==1.13.1->solaris==0.1.2)
Collecting keras-preprocessing>=1.0.5 (from tensorflow==1.13.1->solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/28/6a/8c1f62c37212d9fc441a7e26736df51ce6f0e38455816445471f10da4f0a/Keras_Preprocessing-1.1.0-py2.py3-none-any.whl
Collecting grpcio>=1.8.6 (from tensorflow==1.13.1->solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/f2/5d/b434403adb2db8853a97828d3d19f2032e79d630e0d11a8e95d243103a11/grpcio-1.22.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting tensorboard<1.14.0,>=1.13.0 (from tensorflow==1.13.1->solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/0f/39/bdd75b08a6fba41f098b6cb091b9e8c7a80e1b4d679a581a0ccd17b10373/tensorboard-1.13.1-py3-none-any.whl
Collecting termcolor>=1.1.0 (from tensorflow==1.13.1->solaris==0.1.2)
Collecting absl-py>=0.1.6 (from tensorflow==1.13.1->solaris==0.1.2)
Collecting keras-applications>=1.0.6 (from tensorflow==1.13.1->solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/71/e3/19762fdfc62877ae9102edf6342d71b28fbfd9dea3d2f96a882ce099b03f/Keras_Applications-1.0.8-py3-none-any.whl
Collecting tensorflow-estimator<1.14.0rc0,>=1.13.0 (from tensorflow==1.13.1->solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/bb/48/13f49fc3fa0fdf916aa1419013bb8f2ad09674c275b4046d5ee669a46873/tensorflow_estimator-1.13.0-py2.py3-none-any.whl
Collecting astor>=0.6.0 (from tensorflow==1.13.1->solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/d1/4f/950dfae467b384fc96bc6469de25d832534f6b4441033c39f914efd13418/astor-0.8.0-py2.py3-none-any.whl
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /home/datenstrom/.local/lib/python3.6/site-packages (from matplotlib>=3.1.1->solaris==0.1.2) (2.4.1)
Requirement already satisfied: cycler>=0.10 in /home/datenstrom/.local/lib/python3.6/site-packages (from matplotlib>=3.1.1->solaris==0.1.2) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/datenstrom/.local/lib/python3.6/site-packages (from matplotlib>=3.1.1->solaris==0.1.2) (1.1.0)
Collecting imgaug<0.2.7,>=0.2.5 (from albumentations>=0.2.3->solaris==0.1.2)
Collecting opencv-python-headless (from albumentations>=0.2.3->solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/c5/99/73a9f2505b5a4fc6315ad35cb0dbda33e389201c3da24c6fbb0eb0e32c97/opencv_python_headless-4.1.0.25-cp36-cp36m-manylinux1_x86_64.whl
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python3/dist-packages (from requests>=2.22.0->solaris==0.1.2) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python3/dist-packages (from requests>=2.22.0->solaris==0.1.2) (2.6)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests>=2.22.0->solaris==0.1.2) (2018.1.18)
Collecting werkzeug>=0.11.15 (from tensorboard<1.14.0,>=1.13.0->tensorflow==1.13.1->solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/d1/ab/d3bed6b92042622d24decc7aadc8877badf18aeca1571045840ad4956d3f/Werkzeug-0.15.5-py2.py3-none-any.whl
Requirement already satisfied: markdown>=2.6.8 in /usr/lib/python3/dist-packages (from tensorboard<1.14.0,>=1.13.0->tensorflow==1.13.1->solaris==0.1.2) (2.6.9)
Requirement already satisfied: h5py in /home/datenstrom/.local/lib/python3.6/site-packages (from keras-applications>=1.0.6->tensorflow==1.13.1->solaris==0.1.2) (2.9.0)
Collecting mock>=2.0.0 (from tensorflow-estimator<1.14.0rc0,>=1.13.0->tensorflow==1.13.1->solaris==0.1.2)
  Using cached https://files.pythonhosted.org/packages/05/d2/f94e68be6b17f46d2c353564da56e6fb89ef09faeeff3313a046cb810ca9/mock-3.0.5-py2.py3-none-any.whl
Building wheels for collected packages: solaris, GDAL
  Building wheel for solaris (setup.py) ... done
  Created wheel for solaris: filename=solaris-0.1.2-cp36-none-any.whl size=8375893 sha256=d31f70725eb5b5445512ad015f6ea166c498d440de667a2ec7fe976fd66c50d9
  Stored in directory: /tmp/pip-ephem-wheel-cache-fi9qy64q/wheels/99/4a/dc/980e259ce33e12cd8d7d6f9a288c33933bebd22e3beb186e15
  Building wheel for GDAL (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vawjw8wy/GDAL/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vawjw8wy/GDAL/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-ab5pe4oy --python-tag cp36
       cwd: /tmp/pip-install-vawjw8wy/GDAL/
  Complete output (62 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  copying gdal.py -> build/lib.linux-x86_64-3.6
  copying ogr.py -> build/lib.linux-x86_64-3.6
  copying osr.py -> build/lib.linux-x86_64-3.6
  copying gdalconst.py -> build/lib.linux-x86_64-3.6
  copying gdalnumeric.py -> build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/osgeo
  copying osgeo/gnm.py -> build/lib.linux-x86_64-3.6/osgeo
  copying osgeo/gdalnumeric.py -> build/lib.linux-x86_64-3.6/osgeo
  copying osgeo/gdalconst.py -> build/lib.linux-x86_64-3.6/osgeo
  copying osgeo/gdal_array.py -> build/lib.linux-x86_64-3.6/osgeo
  copying osgeo/osr.py -> build/lib.linux-x86_64-3.6/osgeo
  copying osgeo/__init__.py -> build/lib.linux-x86_64-3.6/osgeo
  copying osgeo/ogr.py -> build/lib.linux-x86_64-3.6/osgeo
  copying osgeo/gdal.py -> build/lib.linux-x86_64-3.6/osgeo
  Fixing build/lib.linux-x86_64-3.6/gdal.py build/lib.linux-x86_64-3.6/ogr.py build/lib.linux-x86_64-3.6/osr.py build/lib.linux-x86_64-3.6/gdalconst.py build/lib.linux-x86_64-3.6/gdalnumeric.py build/lib.linux-x86_64-3.6/osgeo/gnm.py build/lib.linux-x86_64-3.6/osgeo/gdalnumeric.py build/lib.linux-x86_64-3.6/osgeo/gdalconst.py build/lib.linux-x86_64-3.6/osgeo/gdal_array.py build/lib.linux-x86_64-3.6/osgeo/osr.py build/lib.linux-x86_64-3.6/osgeo/__init__.py build/lib.linux-x86_64-3.6/osgeo/ogr.py build/lib.linux-x86_64-3.6/osgeo/gdal.py
  Skipping optional fixer: ws_comma
  Fixing build/lib.linux-x86_64-3.6/gdal.py build/lib.linux-x86_64-3.6/ogr.py build/lib.linux-x86_64-3.6/osr.py build/lib.linux-x86_64-3.6/gdalconst.py build/lib.linux-x86_64-3.6/gdalnumeric.py build/lib.linux-x86_64-3.6/osgeo/gnm.py build/lib.linux-x86_64-3.6/osgeo/gdalnumeric.py build/lib.linux-x86_64-3.6/osgeo/gdalconst.py build/lib.linux-x86_64-3.6/osgeo/gdal_array.py build/lib.linux-x86_64-3.6/osgeo/osr.py build/lib.linux-x86_64-3.6/osgeo/__init__.py build/lib.linux-x86_64-3.6/osgeo/ogr.py build/lib.linux-x86_64-3.6/osgeo/gdal.py
  Skipping optional fixer: ws_comma
  running build_ext
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python3.6m -I/home/datenstrom/.local/lib/python3.6/site-packages/numpy/core/include -I/home/datenstrom/.local/opt/anaconda3/envs/solaris/include -c gdal_python_cxx11_test.cpp -o gdal_python_cxx11_test.o
  building 'osgeo._gdal' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/extensions
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python3.6m -I/home/datenstrom/.local/lib/python3.6/site-packages/numpy/core/include -I/home/datenstrom/.local/opt/anaconda3/envs/solaris/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-3.6/extensions/gdal_wrap.o -I/home/datenstrom/.local/opt/anaconda3/envs/solaris/include
  extensions/gdal_wrap.cpp: In function ‘OSRSpatialReferenceShadow* GDALDatasetShadow_GetSpatialRef(GDALDatasetShadow*)’:
  extensions/gdal_wrap.cpp:4672:32: error: ‘GDALGetSpatialRef’ was not declared in this scope
       OGRSpatialReferenceH ref = GDALGetSpatialRef(self);
                                  ^~~~~~~~~~~~~~~~~
  extensions/gdal_wrap.cpp:4672:32: note: suggested alternative: ‘OGR_L_GetSpatialRef’
       OGRSpatialReferenceH ref = GDALGetSpatialRef(self);
                                  ^~~~~~~~~~~~~~~~~
                                  OGR_L_GetSpatialRef
  extensions/gdal_wrap.cpp: In function ‘void GDALDatasetShadow_SetSpatialRef(GDALDatasetShadow*, OSRSpatialReferenceShadow*)’:
  extensions/gdal_wrap.cpp:4681:6: error: ‘GDALSetSpatialRef’ was not declared in this scope
        GDALSetSpatialRef( self, (OGRSpatialReferenceH)srs );
        ^~~~~~~~~~~~~~~~~
  extensions/gdal_wrap.cpp:4681:6: note: suggested alternative: ‘OGR_L_GetSpatialRef’
        GDALSetSpatialRef( self, (OGRSpatialReferenceH)srs );
        ^~~~~~~~~~~~~~~~~
        OGR_L_GetSpatialRef
  extensions/gdal_wrap.cpp: In function ‘OSRSpatialReferenceShadow* GDALDatasetShadow_GetGCPSpatialRef(GDALDatasetShadow*)’:
  extensions/gdal_wrap.cpp:4722:32: error: ‘GDALGetGCPSpatialRef’ was not declared in this scope
       OGRSpatialReferenceH ref = GDALGetGCPSpatialRef(self);
                                  ^~~~~~~~~~~~~~~~~~~~
  extensions/gdal_wrap.cpp:4722:32: note: suggested alternative: ‘OGR_L_GetSpatialRef’
       OGRSpatialReferenceH ref = GDALGetGCPSpatialRef(self);
                                  ^~~~~~~~~~~~~~~~~~~~
                                  OGR_L_GetSpatialRef
  extensions/gdal_wrap.cpp: In function ‘CPLErr GDALDatasetShadow_SetGCPs2(GDALDatasetShadow*, int, const GDAL_GCP*, OSRSpatialReferenceShadow*)’:
  extensions/gdal_wrap.cpp:4735:12: error: ‘GDALSetGCPs2’ was not declared in this scope
       return GDALSetGCPs2( self, nGCPs, pGCPs, (OGRSpatialReferenceH)hSRS );
              ^~~~~~~~~~~~
  extensions/gdal_wrap.cpp:4735:12: note: suggested alternative: ‘GDALSetGCPs’
       return GDALSetGCPs2( self, nGCPs, pGCPs, (OGRSpatialReferenceH)hSRS );
              ^~~~~~~~~~~~
              GDALSetGCPs
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for GDAL
  Running setup.py clean for GDAL
Successfully built solaris
Failed to build GDAL
ERROR: chainer 6.2.0 has requirement protobuf<3.8.0rc1,>=3.0.0, but you'll have protobuf 3.9.1 which is incompatible.
Installing collected packages: GDAL, rtree, networkx, snuggs, affine, rasterio, mercantile, supermercado, rio-cogeo, imageio, PyWavelets, scikit-image, protobuf, gast, keras-preprocessing, grpcio, werkzeug, absl-py, tensorboard, termcolor, keras-applications, mock, tensorflow-estimator, astor, tensorflow, imgaug, opencv-python-headless, albumentations, requests, solaris
  Running setup.py install for GDAL ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vawjw8wy/GDAL/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vawjw8wy/GDAL/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-aeoka1ut/install-record.txt --single-version-externally-managed --compile
         cwd: /tmp/pip-install-vawjw8wy/GDAL/
    Complete output (62 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    copying gdal.py -> build/lib.linux-x86_64-3.6
    copying ogr.py -> build/lib.linux-x86_64-3.6
    copying osr.py -> build/lib.linux-x86_64-3.6
    copying gdalconst.py -> build/lib.linux-x86_64-3.6
    copying gdalnumeric.py -> build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/osgeo
    copying osgeo/gnm.py -> build/lib.linux-x86_64-3.6/osgeo
    copying osgeo/gdalnumeric.py -> build/lib.linux-x86_64-3.6/osgeo
    copying osgeo/gdalconst.py -> build/lib.linux-x86_64-3.6/osgeo
    copying osgeo/gdal_array.py -> build/lib.linux-x86_64-3.6/osgeo
    copying osgeo/osr.py -> build/lib.linux-x86_64-3.6/osgeo
    copying osgeo/__init__.py -> build/lib.linux-x86_64-3.6/osgeo
    copying osgeo/ogr.py -> build/lib.linux-x86_64-3.6/osgeo
    copying osgeo/gdal.py -> build/lib.linux-x86_64-3.6/osgeo
    Fixing build/lib.linux-x86_64-3.6/gdal.py build/lib.linux-x86_64-3.6/ogr.py build/lib.linux-x86_64-3.6/osr.py build/lib.linux-x86_64-3.6/gdalconst.py build/lib.linux-x86_64-3.6/gdalnumeric.py build/lib.linux-x86_64-3.6/osgeo/gnm.py build/lib.linux-x86_64-3.6/osgeo/gdalnumeric.py build/lib.linux-x86_64-3.6/osgeo/gdalconst.py build/lib.linux-x86_64-3.6/osgeo/gdal_array.py build/lib.linux-x86_64-3.6/osgeo/osr.py build/lib.linux-x86_64-3.6/osgeo/__init__.py build/lib.linux-x86_64-3.6/osgeo/ogr.py build/lib.linux-x86_64-3.6/osgeo/gdal.py
    Skipping optional fixer: ws_comma
    Fixing build/lib.linux-x86_64-3.6/gdal.py build/lib.linux-x86_64-3.6/ogr.py build/lib.linux-x86_64-3.6/osr.py build/lib.linux-x86_64-3.6/gdalconst.py build/lib.linux-x86_64-3.6/gdalnumeric.py build/lib.linux-x86_64-3.6/osgeo/gnm.py build/lib.linux-x86_64-3.6/osgeo/gdalnumeric.py build/lib.linux-x86_64-3.6/osgeo/gdalconst.py build/lib.linux-x86_64-3.6/osgeo/gdal_array.py build/lib.linux-x86_64-3.6/osgeo/osr.py build/lib.linux-x86_64-3.6/osgeo/__init__.py build/lib.linux-x86_64-3.6/osgeo/ogr.py build/lib.linux-x86_64-3.6/osgeo/gdal.py
    Skipping optional fixer: ws_comma
    running build_ext
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python3.6m -I/home/datenstrom/.local/lib/python3.6/site-packages/numpy/core/include -I/home/datenstrom/.local/opt/anaconda3/envs/solaris/include -c gdal_python_cxx11_test.cpp -o gdal_python_cxx11_test.o
    building 'osgeo._gdal' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/extensions
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python3.6m -I/home/datenstrom/.local/lib/python3.6/site-packages/numpy/core/include -I/home/datenstrom/.local/opt/anaconda3/envs/solaris/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-3.6/extensions/gdal_wrap.o -I/home/datenstrom/.local/opt/anaconda3/envs/solaris/include
    extensions/gdal_wrap.cpp: In function ‘OSRSpatialReferenceShadow* GDALDatasetShadow_GetSpatialRef(GDALDatasetShadow*)’:
    extensions/gdal_wrap.cpp:4672:32: error: ‘GDALGetSpatialRef’ was not declared in this scope
         OGRSpatialReferenceH ref = GDALGetSpatialRef(self);
                                    ^~~~~~~~~~~~~~~~~
    extensions/gdal_wrap.cpp:4672:32: note: suggested alternative: ‘OGR_L_GetSpatialRef’
         OGRSpatialReferenceH ref = GDALGetSpatialRef(self);
                                    ^~~~~~~~~~~~~~~~~
                                    OGR_L_GetSpatialRef
    extensions/gdal_wrap.cpp: In function ‘void GDALDatasetShadow_SetSpatialRef(GDALDatasetShadow*, OSRSpatialReferenceShadow*)’:
    extensions/gdal_wrap.cpp:4681:6: error: ‘GDALSetSpatialRef’ was not declared in this scope
          GDALSetSpatialRef( self, (OGRSpatialReferenceH)srs );
          ^~~~~~~~~~~~~~~~~
    extensions/gdal_wrap.cpp:4681:6: note: suggested alternative: ‘OGR_L_GetSpatialRef’
          GDALSetSpatialRef( self, (OGRSpatialReferenceH)srs );
          ^~~~~~~~~~~~~~~~~
          OGR_L_GetSpatialRef
    extensions/gdal_wrap.cpp: In function ‘OSRSpatialReferenceShadow* GDALDatasetShadow_GetGCPSpatialRef(GDALDatasetShadow*)’:
    extensions/gdal_wrap.cpp:4722:32: error: ‘GDALGetGCPSpatialRef’ was not declared in this scope
         OGRSpatialReferenceH ref = GDALGetGCPSpatialRef(self);
                                    ^~~~~~~~~~~~~~~~~~~~
    extensions/gdal_wrap.cpp:4722:32: note: suggested alternative: ‘OGR_L_GetSpatialRef’
         OGRSpatialReferenceH ref = GDALGetGCPSpatialRef(self);
                                    ^~~~~~~~~~~~~~~~~~~~
                                    OGR_L_GetSpatialRef
    extensions/gdal_wrap.cpp: In function ‘CPLErr GDALDatasetShadow_SetGCPs2(GDALDatasetShadow*, int, const GDAL_GCP*, OSRSpatialReferenceShadow*)’:
    extensions/gdal_wrap.cpp:4735:12: error: ‘GDALSetGCPs2’ was not declared in this scope
         return GDALSetGCPs2( self, nGCPs, pGCPs, (OGRSpatialReferenceH)hSRS );
                ^~~~~~~~~~~~
    extensions/gdal_wrap.cpp:4735:12: note: suggested alternative: ‘GDALSetGCPs’
         return GDALSetGCPs2( self, nGCPs, pGCPs, (OGRSpatialReferenceH)hSRS );
                ^~~~~~~~~~~~
                GDALSetGCPs
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vawjw8wy/GDAL/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vawjw8wy/GDAL/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-aeoka1ut/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

Environment information

  • OS: PopOS (Ubuntu 18.04)
  • solaris version:
    • master branch
    • v0.1.2
  • python version: 3.6.7
@nrweir
Copy link
Contributor

nrweir commented Aug 9, 2019

Hi @Eudoxier,

Thanks for providing the full trace and well-documented problem, I'll dig into this and get back to you shortly.

Nick

@nrweir
Copy link
Contributor

nrweir commented Aug 9, 2019

@Eudoxier,

OK, so the problem here is that your pip install is trying to install the (unsupported) GDAL package from PyPI. Digging into setup.py, I see we mistakenly left the GDAL>=2.4.0 requirement there from when the maintainers were trying to figure out the best way to consistently install GDAL across different platforms (oh, the woes of GDAL installs).

We'll get this fixed in 0.1.3. In the meantime, if you remove the GDAL requirement line here from your version of setup.py it should fix it.

Thanks for using solaris!

@sevro
Copy link
Author

sevro commented Aug 9, 2019

Thank you, I had just noticed that and was about to let you know. It does work when I pinned the version to 2.4.2.

@nrweir
Copy link
Contributor

nrweir commented Aug 9, 2019

Ah OK, good to know, thanks!

@nrweir
Copy link
Contributor

nrweir commented Aug 11, 2019

This is resolved in dev with #230; next bugfix release will include it.

@nrweir nrweir closed this as completed Aug 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants