I'm attempting to install gippy
on my laptop from my (up-to-date) fork of the repo. I've come across this issue with libgip.so before, but I cannot remember the cause. Leaving only the commands and import error
$ sudo git clean -xfd ; \
python setup.py build ; \
sudo python setup.py install ; \
cd ~ ; \
python -c "import gippy ; print 'success' "
[[[ snipped compilation and installation output ]]]
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/gippy/__init__.py", line 23, in <module>
from gippy import *
File "/usr/local/lib/python2.7/dist-packages/gippy/gippy.py", line 32, in <module>
_gippy = swig_import_helper()
File "/usr/local/lib/python2.7/dist-packages/gippy/gippy.py", line 28, in swig_import_helper
_mod = imp.load_module('_gippy', fp, pathname, description)
ImportError: libgip.so: cannot open shared object file: No such file or directory
But everything seems to be there
/usr/local/lib/python2.7/dist-packages/
├── gippy
│ ├── algorithms.py
│ ├── algorithms.pyc
│ ├── _algorithms.so
│ ├── gippy.py
│ ├── gippy.pyc
│ ├── _gippy.so
│ ├── __init__.py
│ ├── __init__.pyc
│ ├── libgip.so
│ ├── tests.py
│ ├── tests.pyc
│ ├── _tests.so
│ ├── version.py
│ └── version.pyc
└── gippy-0.3.3.egg-info
├── dependency_links.txt
├── PKG-INFO
├── SOURCES.txt
└── top_level.txt
below is the build output:
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/gippy
copying gippy/version.py -> build/lib.linux-x86_64-2.7/gippy
copying gippy/__init__.py -> build/lib.linux-x86_64-2.7/gippy
running build_ext
building 'gippy/libgip' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/GIP
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -IGIP -I/usr/include/python2.7 -c GIP/GeoRaster.cpp -o build/temp.linux-x86_64-2.7/GIP/GeoRaster.o -std=c++11 -O3 -DBOOST_LOG_DYN_LINK
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -IGIP -I/usr/include/python2.7 -c GIP/GeoImage.cpp -o build/temp.linux-x86_64-2.7/GIP/GeoImage.o -std=c++11 -O3 -DBOOST_LOG_DYN_LINK
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -IGIP -I/usr/include/python2.7 -c GIP/GeoAlgorithms.cpp -o build/temp.linux-x86_64-2.7/GIP/GeoAlgorithms.o -std=c++11 -O3 -DBOOST_LOG_DYN_LINK
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -IGIP -I/usr/include/python2.7 -c GIP/gip_gdal.cpp -o build/temp.linux-x86_64-2.7/GIP/gip_gdal.o -std=c++11 -O3 -DBOOST_LOG_DYN_LINK
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -IGIP -I/usr/include/python2.7 -c GIP/GeoResource.cpp -o build/temp.linux-x86_64-2.7/GIP/GeoResource.o -std=c++11 -O3 -DBOOST_LOG_DYN_LINK
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -IGIP -I/usr/include/python2.7 -c GIP/GeoSpatialContext.cpp -o build/temp.linux-x86_64-2.7/GIP/GeoSpatialContext.o -std=c++11 -O3 -DBOOST_LOG_DYN_LINK
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -IGIP -I/usr/include/python2.7 -c GIP/GeoVectorResource.cpp -o build/temp.linux-x86_64-2.7/GIP/GeoVectorResource.o -std=c++11 -O3 -DBOOST_LOG_DYN_LINK
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -IGIP -I/usr/include/python2.7 -c GIP/tests.cpp -o build/temp.linux-x86_64-2.7/GIP/tests.o -std=c++11 -O3 -DBOOST_LOG_DYN_LINK
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -IGIP -I/usr/include/python2.7 -c GIP/GeoImages.cpp -o build/temp.linux-x86_64-2.7/GIP/GeoImages.o -std=c++11 -O3 -DBOOST_LOG_DYN_LINK
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/GIP/GeoRaster.o build/temp.linux-x86_64-2.7/GIP/GeoImage.o build/temp.linux-x86_64-2.7/GIP/GeoAlgorithms.o build/temp.linux-x86_64-2.7/GIP/gip_gdal.o build/temp.linux-x86_64-2.7/GIP/GeoResource.o build/temp.linux-x86_64-2.7/GIP/GeoSpatialContext.o build/temp.linux-x86_64-2.7/GIP/GeoVectorResource.o build/temp.linux-x86_64-2.7/GIP/tests.o build/temp.linux-x86_64-2.7/GIP/GeoImages.o -Lbuild/lib.linux-x86_64-2.7/gippy -o build/lib.linux-x86_64-2.7/gippy/libgip.so
building 'gippy/_gippy' extension
swigging gippy/gippy.i to gippy/gippy_wrap.cpp
swig -python -c++ -w509 -IGIP -o gippy/gippy_wrap.cpp gippy/gippy.i
creating build/temp.linux-x86_64-2.7/gippy
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -IGIP -I/home/icooke/.local/lib/python2.7/site-packages/numpy/core/include -I/usr/include/gdal -I/usr/include/python2.7 -c gippy/gippy_wrap.cpp -o build/temp.linux-x86_64-2.7/gippy/gippy_wrap.o -fPIC -std=c++11 -DBOOST_LOG_DYN_LINK
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gippy/gippy_wrap.cpp: In function ‘PyObject* _wrap_new_GeoImages(PyObject*, PyObject*)’:
gippy/gippy_wrap.cpp:4765:61: warning: ‘argv[0]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
return traits_asptr_stdseq<std::vector<T> >::asptr(obj, vec);
^
gippy/gippy_wrap.cpp:28262:13: note: ‘argv[0]’ was declared here
PyObject *argv[2];
^
gippy/gippy_wrap.cpp: In function ‘PyObject* _wrap_new_mapss(PyObject*, PyObject*)’:
gippy/gippy_wrap.cpp:5295:4: warning: ‘argv[0]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
res = SWIG_ConvertPtr(obj,(void**)&p,swig::type_info<map_type>(),0);
^
gippy/gippy_wrap.cpp:11317:13: note: ‘argv[0]’ was declared here
PyObject *argv[2];
^
c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/gippy/gippy_wrap.o -Lbuild/lib.linux-x86_64-2.7/gippy -lgip -lgdal -lboost_system -lboost_filesystem -lboost_log -lpthread -o build/lib.linux-x86_64-2.7/gippy/_gippy.so
building 'gippy/_tests' extension
swigging gippy/tests.i to gippy/tests_wrap.cpp
swig -python -c++ -w509 -IGIP -o gippy/tests_wrap.cpp gippy/tests.i
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -IGIP -I/home/icooke/.local/lib/python2.7/site-packages/numpy/core/include -I/usr/include/gdal -I/usr/include/python2.7 -c gippy/tests_wrap.cpp -o build/temp.linux-x86_64-2.7/gippy/tests_wrap.o -fPIC -std=c++11 -DBOOST_LOG_DYN_LINK
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gippy/tests_wrap.cpp: In function ‘PyObject* _wrap_new_GeoImages(PyObject*, PyObject*)’:
gippy/tests_wrap.cpp:4758:61: warning: ‘argv[0]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
return traits_asptr_stdseq<std::vector<T> >::asptr(obj, vec);
^
gippy/tests_wrap.cpp:28243:13: note: ‘argv[0]’ was declared here
PyObject *argv[2];
^
gippy/tests_wrap.cpp: In function ‘PyObject* _wrap_new_mapss(PyObject*, PyObject*)’:
gippy/tests_wrap.cpp:5288:4: warning: ‘argv[0]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
res = SWIG_ConvertPtr(obj,(void**)&p,swig::type_info<map_type>(),0);
^
gippy/tests_wrap.cpp:11298:13: note: ‘argv[0]’ was declared here
PyObject *argv[2];
^
c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/gippy/tests_wrap.o -Lbuild/lib.linux-x86_64-2.7/gippy -lgip -lgdal -lboost_system -lboost_filesystem -lboost_log -lpthread -o build/lib.linux-x86_64-2.7/gippy/_tests.so
building 'gippy/_algorithms' extension
swigging gippy/algorithms.i to gippy/algorithms_wrap.cpp
swig -python -c++ -w509 -IGIP -o gippy/algorithms_wrap.cpp gippy/algorithms.i
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -IGIP -I/home/icooke/.local/lib/python2.7/site-packages/numpy/core/include -I/usr/include/gdal -I/usr/include/python2.7 -c gippy/algorithms_wrap.cpp -o build/temp.linux-x86_64-2.7/gippy/algorithms_wrap.o -fPIC -std=c++11 -DBOOST_LOG_DYN_LINK
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gippy/algorithms_wrap.cpp: In function ‘PyObject* _wrap_new_GeoImages(PyObject*, PyObject*)’:
gippy/algorithms_wrap.cpp:4757:61: warning: ‘argv[0]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
return traits_asptr_stdseq<std::vector<T> >::asptr(obj, vec);
^
gippy/algorithms_wrap.cpp:28258:13: note: ‘argv[0]’ was declared here
PyObject *argv[2];
^
gippy/algorithms_wrap.cpp: In function ‘PyObject* _wrap_new_mapss(PyObject*, PyObject*)’:
gippy/algorithms_wrap.cpp:5287:4: warning: ‘argv[0]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
res = SWIG_ConvertPtr(obj,(void**)&p,swig::type_info<map_type>(),0);
^
gippy/algorithms_wrap.cpp:11313:13: note: ‘argv[0]’ was declared here
PyObject *argv[2];
^
c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/gippy/algorithms_wrap.o -Lbuild/lib.linux-x86_64-2.7/gippy -lgip -lgdal -lboost_system -lboost_filesystem -lboost_log -lpthread -o build/lib.linux-x86_64-2.7/gippy/_algorithms.so
running install
module <setuptools.extension.Extension instance at 0x7f3ae522d2d8> /usr/local/lib/python2.7/dist-packages/gippy
module <setuptools.extension.Extension instance at 0x7f3ae37236c8> /usr/local/lib/python2.7/dist-packages/gippy
module <setuptools.extension.Extension instance at 0x7f3ae3723758> /usr/local/lib/python2.7/dist-packages/gippy
module <setuptools.extension.Extension instance at 0x7f3ae3723a70> /usr/local/lib/python2.7/dist-packages/gippy
running build_ext
running build
running build_py
copying gippy/tests.py -> build/lib.linux-x86_64-2.7/gippy
copying gippy/algorithms.py -> build/lib.linux-x86_64-2.7/gippy
copying gippy/gippy.py -> build/lib.linux-x86_64-2.7/gippy
running install_lib
creating /usr/local/lib/python2.7/dist-packages/gippy
copying build/lib.linux-x86_64-2.7/gippy/tests.py -> /usr/local/lib/python2.7/dist-packages/gippy
copying build/lib.linux-x86_64-2.7/gippy/version.py -> /usr/local/lib/python2.7/dist-packages/gippy
copying build/lib.linux-x86_64-2.7/gippy/__init__.py -> /usr/local/lib/python2.7/dist-packages/gippy
copying build/lib.linux-x86_64-2.7/gippy/libgip.so -> /usr/local/lib/python2.7/dist-packages/gippy
copying build/lib.linux-x86_64-2.7/gippy/algorithms.py -> /usr/local/lib/python2.7/dist-packages/gippy
copying build/lib.linux-x86_64-2.7/gippy/gippy.py -> /usr/local/lib/python2.7/dist-packages/gippy
copying build/lib.linux-x86_64-2.7/gippy/_algorithms.so -> /usr/local/lib/python2.7/dist-packages/gippy
copying build/lib.linux-x86_64-2.7/gippy/_gippy.so -> /usr/local/lib/python2.7/dist-packages/gippy
copying build/lib.linux-x86_64-2.7/gippy/_tests.so -> /usr/local/lib/python2.7/dist-packages/gippy
byte-compiling /usr/local/lib/python2.7/dist-packages/gippy/tests.py to tests.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/gippy/version.py to version.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/gippy/__init__.py to __init__.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/gippy/algorithms.py to algorithms.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/gippy/gippy.py to gippy.pyc
running install_egg_info
running egg_info
creating gippy.egg-info
writing gippy.egg-info/PKG-INFO
writing top-level names to gippy.egg-info/top_level.txt
writing dependency_links to gippy.egg-info/dependency_links.txt
writing manifest file 'gippy.egg-info/SOURCES.txt'
reading manifest file 'gippy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'gippy.egg-info/SOURCES.txt'
Copying gippy.egg-info to /usr/local/lib/python2.7/dist-packages/gippy-0.3.3.egg-info
running install_scripts
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "gippy/__init__.py", line 23, in <module>
from gippy import *
File "gippy/gippy.py", line 32, in <module>
_gippy = swig_import_helper()
File "gippy/gippy.py", line 24, in swig_import_helper
import _gippy
ImportError: No module named _gippy
question