ImportError: ../libunity_shared.so: undefined symbol: gzopen64

User 2108 | 7/27/2015, 12:23:26 PM

Hello, I'm trying to import graphlab to AWS server with no luck. I've got a license, and followed the installation instructions. Every time i try to import, the following error appears: `

import graphlab Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/site-packages/graphlab/init.py", line 52, in <module> import graphlab.connect.aws as aws File "/usr/local/lib/python2.7/site-packages/graphlab/connect/aws/init.py", line 18, in <module> from ec2 import getcredentials, listinstances, setcredentials File "/usr/local/lib/python2.7/site-packages/graphlab/connect/aws/ec2.py", line 25, in <module> import graphlab.connect.server as glserver File "/usr/local/lib/python2.7/site-packages/graphlab/connect/server.py", line 26, in <module> from graphlab.cython.cyipc import PyCommClient as Client ImportError: /usr/local/lib/python2.7/site-packages/graphlab/cython/../libunity_shared.so: undefined symbol: gzopen64 `

any ideas? please help!!! Ido

Comments

User 19 | 7/28/2015, 6:30:11 PM

Hi Ido,

Happy to help!

A few questions first: What OS/version are you using on your instance? Which installation instructions did you follow?

Thanks, Chris


User 1190 | 7/30/2015, 5:25:36 PM

The latest GraphLab Create 1.5.x requires zlib version > 1.2.3. However, 1.2.3 is the highest supported version on CentOS 6.x systems.

Here is how to upgrade zlib on your system.

Step 1: Download and compile the source code form http://www.zlib.net/ wget http://zlib.net/zlib-1.2.8.tar.gz Step 2: Untar the source code tar -zxvf zlib-1.2.8.tar.gz Step 3: Compile zlib cd zlib-1.2.8 ./configure --prefix=/usr/local make sudo make install

If you do not have sudo permission, here is a workaround.

In Step 3: change the prefix to somewhere in your home directory, e.g. ~/zlib, and use "make; make install". Then you can copy ~/zlib/lib/*.so to the graphlab directory, which is typically under "venv/lib/python2.7/site-packages/graphlab/". cd zlib-1.2.8 ./configure --prefix=~/zlib make make install cp ~/zlib/lib/* venv/lib/python2.7/site-packages/graphlab/


User 2600 | 11/14/2015, 5:15:05 AM

Hi Jay, Chris, and Ido -

I am getting the same error as a non-privileged user on CentOS 6.x - I tried copying libz.so.1 to the site-packages/graphlab directory as Jay advised, but still get the error when attempting to import graphlab. I then tried editing the RPATH of each of the .so files and the pylambdaworker and unityserver executables to prepend the <ZLIBBUILDDIR>/lib directory containing zlib.so.1, and as a result running ldd on any *.so file in the site-packages/graphlab directory or site-packages/graphlab/cython directory now tells me that:

libz.so.1 => /home/<USERNAME>/lib/zlib-build/lib/libz.so.1 (0x0000...

However, the error is still thrown. I deleted and recompiled all *.pyc files in site-packages/graphlab and sub-directories as a hail mary, with no change. When I check to see if the offending symbol is present in zlib.so.1:

$ readelf -Ws /home/<USERNAME>/lib/zlib-build/lib/libz.so.1 | grep "gzopen64" 62: 000000000000e300 13 FUNC GLOBAL DEFAULT 12 gzopen64@@ZLIB_1.2.3.3 138: 000000000000e300 13 FUNC GLOBAL DEFAULT 12 gzopen64

The first hit above is in the '.dynsym' symbol table, the second in the '.symtab' symbol table. I assume this means I'm missing something related to GraphLab that's needed to get it to see my zlib.so.1 - any pointers or theories would be greatly appreciated, thanks!

Kind Regards, Dylan


User 1207 | 11/16/2015, 11:31:39 PM

Hello Dylan,

We've hit this error in other contexts as well, and there it was due to ipython and/or python preloading the system gzip libraries before graphlab is loaded. The consistent solution we've found to this problem is to either set LDLIBRARYPATH or use LD_PRELOAD. For the first, run export LD_LIBRARY_PATH=/home/<USERNAME>/lib/zlib-build/lib/:$LD_LIBRARY_PATH, or start python / ipython with LD_PRELOAD=/home/<USERNAME>/lib/zlib-build/lib/libz.so.1 ipython. Hopefully that will resolve these issues.


User 2600 | 11/18/2015, 6:46:10 AM

Thanks Hoytak -

I did manage to get it working by re-building Python under my home directory against the newer libz.so.1 - thanks for explaining why that fixes the issue, I couldn't quite make it out. I forget why, but Python did give me some grief for trying to point it to a new libz.so.1 - once I got the right edits into setup.py and to find the include files and shared libraries and put zlib-build/lib on LDLIBRARYPATH I was in business!