Closed vigo332 closed 6 years ago
Hi,
what shared library is your build linked against? Could you send result of ldd for your _pgmagick.so
?
ldd {path_to_python_env}/pgmagick/_pgmagick*.so
This should also show us whether your BOOST_LIB is registered with ldconfig.
Hi, @komackaj
Thanks for replying again. Here it is.
$ ldd _pgmagick.so
linux-vdso.so.1 => (0x00007ffff7ffe000)
libboost_python.so.1.54.0 => /apps/boost/1.54.0/lib/libboost_python.so.1.54.0 (0x00007ffff718e000)
libGraphicsMagick.so.3 => /home2/s167891/installs/GraphicsMagick/lib/libGraphicsMagick.so.3 (0x00007ffff6c8f000)
libstdc++.so.6 => /cm/shared/apps/gcc/5.4.0/lib64/libstdc++.so.6 (0x00007ffff6901000)
libm.so.6 => /lib64/libm.so.6 (0x00007ffff6663000)
libgcc_s.so.1 => /cm/shared/apps/gcc/5.4.0/lib64/libgcc_s.so.1 (0x00007ffff644c000)
libc.so.6 => /lib64/libc.so.6 (0x00007ffff60b8000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007ffff5eb5000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ffff5c97000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007ffff5a93000)
librt.so.1 => /lib64/librt.so.1 (0x00007ffff588b000)
libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007ffff55ed000)
libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007ffff52b0000)
libz.so.1 => /lib64/libz.so.1 (0x00007ffff509a000)
libgomp.so.1 => /cm/shared/apps/gcc/5.4.0/lib/../lib64/libgomp.so.1 (0x00007ffff4e78000)
/lib64/ld-linux-x86-64.so.2 (0x0000003de4a00000)
libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007ffff4c59000)
libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007ffff4a55000)
So here is mine, for comparision (from Ubuntu)
$ ldd _pgmagick.so
linux-vdso.so.1 => (0x00007ffe7cdb7000)
libboost_python-py27.so.1.54.0 => /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.54.0 (0x00007ff153779000)
libGraphicsMagick.so.3 => /usr/lib/libGraphicsMagick.so.3 (0x00007ff1524de000)
libGraphicsMagick++.so.3 => /usr/lib/libGraphicsMagick++.so.3 (0x00007ff15350e000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff15320a000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff1521d8000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff152ff4000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff152a0d000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff152dd6000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff14fa47000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007ff15185f000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007ff150a2a000)
libjbig.so.0 => /usr/lib/x86_64-linux-gnu/libjbig.so.0 (0x00007ff151fca000)
liblcms2.so.2 => /usr/lib/x86_64-linux-gnu/liblcms2.so.2 (0x00007ff151d74000)
libtiff.so.5 => /usr/lib/x86_64-linux-gnu/libtiff.so.5 (0x00007ff151b02000)
libjasper.so.1 => /usr/lib/x86_64-linux-gnu/libjasper.so.1 (0x00007ff151608000)
libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007ff1513b3000)
libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007ff15118d000)
libwmflite-0.2.so.7 => /usr/lib/x86_64-linux-gnu/libwmflite-0.2.so.7 (0x00007ff150f71000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007ff150d5f000)
libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007ff15081a000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007ff1504b4000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ff15029b000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007ff14fe6a000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007ff15008c000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff153ee1000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007ff14fc4b000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007ff14f843000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007ff14f63d000)
The main issue is, your pgmagick.so
isn't linked against GM C++ library, you need to add -lGraphicsMagick++
to your LIBS in src/Makefile
Next difference is that on my system libgraphicsMagick.so loads multiple external codecs for various image formats - but maybe you have it statically linked (makes sense for sandboxed environment). I recommend to test reading / writing an common image format (e.g. PNG or JPG) after sucessfull importing python module to check the GM library build.
@vigo332 Hi, have you been able to solve this?
@komackaj Yes. Adding -lGraphicsMagick++ solved the problem. Apologies for late response.
Hi, Developer,
I tried to install pgmagick on Red Hat 6.9 with customized boost, imagemagick and GraphicsMagick installation locations. I tried to do the source install as pip install does not honor the BOOST_DIR BOOST_LIB BOOST_INC env variables.
I changed the setup.py accordingly to include BOOST_INC, imagemagick and GraphicsMagick, and the src/Makefile: for setup.py
for src/Makefile
The python setup.py install seems to have successfully completed, and all the *cpp files are compiled and I have the _pgmagick.so
........ skipping g++ compiling message ....... creating build/bdist.linux-x86_64 creating build/bdist.linux-x86_64/egg creating build/bdist.linux-x86_64/egg/pgmagick copying build/lib.linux-x86_64-2.7/pgmagick/init.py -> build/bdist.linux-x86_64/egg/pgmagick copying build/lib.linux-x86_64-2.7/pgmagick/_version.py -> build/bdist.linux-x86_64/egg/pgmagick copying build/lib.linux-x86_64-2.7/pgmagick/api.py -> build/bdist.linux-x86_64/egg/pgmagick copying build/lib.linux-x86_64-2.7/pgmagick/_pgmagick.so -> build/bdist.linux-x86_64/egg/pgmagick byte-compiling build/bdist.linux-x86_64/egg/pgmagick/init.py to init.pyc byte-compiling build/bdist.linux-x86_64/egg/pgmagick/_version.py to _version.pyc byte-compiling build/bdist.linux-x86_64/egg/pgmagick/api.py to api.pyc creating stub loader for pgmagick/_pgmagick.so byte-compiling build/bdist.linux-x86_64/egg/pgmagick/_pgmagick.py to _pgmagick.pyc creating build/bdist.linux-x86_64/egg/EGG-INFO copying pgmagick.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying pgmagick.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying pgmagick.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying pgmagick.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt zip_safe flag not set; analyzing archive contents... creating dist creating 'dist/pgmagick-0.7.2-py2.7-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing pgmagick-0.7.2-py2.7-linux-x86_64.egg Removing /home2/s167891/.conda/envs/catmaid/lib/python2.7/site-packages/pgmagick-0.7.2-py2.7-linux-x86_64.egg Copying pgmagick-0.7.2-py2.7-linux-x86_64.egg to /home2/s167891/.conda/envs/catmaid/lib/python2.7/site-packages pgmagick 0.7.2 is already the active version in easy-install.pth
Installed /home2/s167891/.conda/envs/catmaid/lib/python2.7/site-packages/pgmagick-0.7.2-py2.7-linux-x86_64.egg Processing dependencies for pgmagick==0.7.2 Finished processing dependencies for pgmagick==0.7.2
But what I have is
Please help.
Thanks very much