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

Make error - make: *** [_snowboydetect.so] Error 1 #42

Closed
Corkskru opened this issue Aug 25, 2016 · 5 comments
Closed

Make error - make: *** [_snowboydetect.so] Error 1 #42

Corkskru opened this issue Aug 25, 2016 · 5 comments

Comments

@Corkskru
Copy link

" g++ -I../../ -O3 -fPIC -std=c++0x -shared snowboy-detect-swig.o
../..//lib/ubuntu64/libsnowboy-detect.a -L/usr/local/lib/python2.7/config -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic -lm -ldl -lf77blas -lcblas -llapack_atlas -latlas -o _snowboydetect.so
/usr/bin/ld: /usr/local/lib/python2.7/config/libpython2.7.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/python2.7/config/libpython2.7.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [_snowboydetect.so] Error 1 "

I am following the exact steps provided in the git documentation. I navigate to "swig/Python" and compile ( make ). I get the above make error. Any solutions for this??

@Corkskru Corkskru changed the title Make error Make error - make: *** [_snowboydetect.so] Error 1 Aug 25, 2016
@chenguoguo
Copy link
Collaborator

what was your platform? os?

I briefly searched and it might related to python installation. Did you compile Python by yourself or did you use the standard python? see here: gmarcais/Jellyfish#45

@Corkskru
Copy link
Author

Hi,
Ubuntu 14.04 -- trying to compile and run the Python wrapper. I compiled Python 2.7.5 by myself.
the files are in /usr/local/lib. However, 'which python' returns /usr/local/bin. Are the compiled and default(pre-installed) pythons in conflict with each other?

@chenguoguo
Copy link
Collaborator

I think so. In the makefile we used shell python-config --cflags and shell python-config --ldflags to determine the python dependencies. You may want to replace them with what you are actually using. Also, it might be easier if you install and use your Python in a virtual environment (you have to set this up correctly though). Please let us know if this helps.

@Corkskru
Copy link
Author

Thanks a lot! It was indeed a conflict -- 'sys.path' displayed that it was using the compiled version of python. I removed/uninstalled the extra python files and now its working wonders!!
Great SDK though! :)

@chenguoguo
Copy link
Collaborator

OK thanks, closing since it's resolved.

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

2 participants