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

_pyhash.so: undefined symbol: __cpu_model #13

Closed
NikitaMorev opened this issue Mar 7, 2017 · 2 comments
Closed

_pyhash.so: undefined symbol: __cpu_model #13

NikitaMorev opened this issue Mar 7, 2017 · 2 comments

Comments

@NikitaMorev
Copy link

  1. Ubuntu 16.04
  2. python 2.7.12
  3. pip install pyhash succesful installed
  4. python -c "import pyhash" failed:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/pyhash.py", line 7, in <module>
    import _pyhash
ImportError: /usr/local/lib/python2.7/dist-packages/_pyhash.so: undefined symbol: __cpu_model

@OrsonMM
Copy link

OrsonMM commented Apr 13, 2017

Hi NikitaMorev

You can install pyhash, I have the same ubuntu 16.04, python 2.7.12.
I have these error.

Collecting pyhash
Downloading pyhash-0.8.tar.gz (288kB)
100% |████████████████████████████████| 296kB 726kB/s
Installing collected packages: pyhash
Running setup.py install for pyhash ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-m2J6pc/pyhash/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-iq1hHL-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-i686-2.7
copying pyhash.py -> build/lib.linux-i686-2.7
running build_ext
building '_pyhash' extension
creating build/temp.linux-i686-2.7
creating build/temp.linux-i686-2.7/src
creating build/temp.linux-i686-2.7/src/fnv
creating build/temp.linux-i686-2.7/src/lookup3
creating build/temp.linux-i686-2.7/src/SuperFastHash
creating build/temp.linux-i686-2.7/src/smhasher
i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DBOOST_PYTHON_STATIC_LIB -I/usr/include/python2.7 -c src/Hash.cpp -o build/temp.linux-i686-2.7/src/Hash.o -DSUPPORT_INT128=1 -msse4.2 -maes
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from src/Hash.cpp:1:0:
src/Hash.h:3:28: fatal error: boost/python.hpp: No existe el archivo o el directorio
compilation terminated.
error: command 'i686-linux-gnu-gcc' failed with exit status 1

----------------------------------------

Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-m2J6pc/pyhash/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-iq1hHL-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-m2J6pc/pyhash/

flier added a commit that referenced this issue May 9, 2017
@flier
Copy link
Owner

flier commented May 9, 2017

@NikitaMorev It seems caused by a GCC 5 bug, which will be fixed in GCC 6.

ld: a.out: hidden symbol `__cpu_model' in /usr/lib/gcc/x86_64-linux-gnu/5/libgcc.a(cpuinfo.o) is referenced by DSO

@OrsonMM Please install Boost first

sudo apt-get install libboost-all-dev

@flier flier closed this as completed May 9, 2017
flier added a commit that referenced this issue May 9, 2017
* add mum hash
* add T1 hash
* add xx hash
* use optimized t1 hash with SSE4.2
* migrate to latest smhasher
* enable AES instruction set support.
* upgrade setuptools bootstrap script
* remove self upgrade setuptools
* fix GCC 5 bug, resolve #13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants