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

Installation on Mac OSX 0.12.4 (Sierra) fails due to missing LDFLAGS #78

Open
skoroneos opened this issue Apr 4, 2017 · 0 comments
Open

Comments

@skoroneos
Copy link

skoroneos commented Apr 4, 2017

Trying to install on Mac OSX from PIP or from source results in a linker error due to the missing path to OpenSSL.
cc -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -Wl,-F. build/temp.macosx-10.12-intel-2.7/src/mmapbitarray.o build/temp.macosx-10.12-intel-2.7/src/bloomfilter.o build/temp.macosx-10.12-intel-2.7/src/md5.o build/temp.macosx-10.12-intel-2.7/src/primetester.o build/temp.macosx-10.12-intel-2.7/src/MurmurHash3.o build/temp.macosx-10.12-intel-2.7/src/pybloomfilter.o -lcrypto -o build/lib.macosx-10.12-intel-2.7/pybloomfilter.so
ld: library not found for -lcrypto
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'cc' failed with exit status 1

After Setting the LDFLAGS in env it builds ok
i.e
sudo su
export LDFLAGS=-L/usr/local/opt/openssl/lib
sh-3.2# pip install pybloomfiltermmap
Collecting pybloomfiltermmap
Using cached pybloomfiltermmap-0.3.15.tar.gz
Installing collected packages: pybloomfiltermmap
Running setup.py install for pybloomfiltermmap ... done
Successfully installed pybloomfiltermmap-0.3.15


Installation failed messages

sudo -H pip install pybloomfiltermmap
Collecting pybloomfiltermmap
Using cached pybloomfiltermmap-0.3.15.tar.gz
Installing collected packages: pybloomfiltermmap
Running setup.py install for pybloomfiltermmap ... error
Complete output from command /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;file='/private/tmp/pip-build-CTch7V/pybloomfiltermmap/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-oBJRRI-record/install-record.txt --single-version-externally-managed --compile:
info: Building from Cython
running install
running build
running build_ext
skipping 'src/pybloomfilter.c' Cython extension (up-to-date)
building 'pybloomfilter' extension
creating build
creating build/temp.macosx-10.12-intel-2.7
creating build/temp.macosx-10.12-intel-2.7/src
cc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/mmapbitarray.c -o build/temp.macosx-10.12-intel-2.7/src/mmapbitarray.o
cc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/bloomfilter.c -o build/temp.macosx-10.12-intel-2.7/src/bloomfilter.o
In file included from src/bloomfilter.c:9:
In file included from src/bloomfilter.h:6:
src/mmapbitarray.h:115:16: warning: attribute 'always_inline' is ignored, place it after "struct" to apply attribute to type declaration [-Wignored-attributes]
attribute((always_inline))
^
1 warning generated.
In file included from src/bloomfilter.c:9:
In file included from src/bloomfilter.h:6:
src/mmapbitarray.h:115:16: warning: attribute 'always_inline' is ignored, place it after "struct" to apply attribute to type declaration [-Wignored-attributes]
attribute((always_inline))
^
1 warning generated.
cc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/md5.c -o build/temp.macosx-10.12-intel-2.7/src/md5.o
cc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/primetester.c -o build/temp.macosx-10.12-intel-2.7/src/primetester.o
cc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/MurmurHash3.c -o build/temp.macosx-10.12-intel-2.7/src/MurmurHash3.o
cc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/pybloomfilter.c -o build/temp.macosx-10.12-intel-2.7/src/pybloomfilter.o
In file included from src/pybloomfilter.c:248:
src/mmapbitarray.h:115:16: warning: attribute 'always_inline' is ignored, place it after "struct" to apply attribute to type declaration [-Wignored-attributes]
attribute((always_inline))
^
In file included from src/pybloomfilter.c:249:
src/bloomfilter.h:94:16: warning: 'always_inline' attribute only applies to functions [-Wignored-attributes]
attribute((always_inline))
^
src/pybloomfilter.c:2942:56: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'long' [-Wshorten-64-to-32]
__pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_self->_bf->max_num_elem); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = LINE; goto __pyx_L1_error;}
~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
src/pybloomfilter.c:3230:63: warning: implicit conversion loses integer precision: 'BTYPE' (aka 'unsigned long long') to 'long' [-Wshorten-64-to-32]
__pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_self->_bf->array->bits); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = LINE; goto __pyx_L1_error;}
~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
src/pybloomfilter.c:3598:56: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'long' [-Wshorten-64-to-32]
__pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_self->_bf->max_num_elem); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = LINE; goto __pyx_L1_error;}
~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
src/pybloomfilter.c:5103:32: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'Py_ssize_t' (aka 'long') [-Wshorten-64-to-32]
__pyx_r = __pyx_v_self->_bf->elem_count;
~ ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
src/pybloomfilter.c:9193:32: warning: unused function '__Pyx_PyUnicode_FromString' [-Wunused-function]
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
^
src/pybloomfilter.c:314:29: warning: unused function '__Pyx_Py_UNICODE_strlen' [-Wunused-function]
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
^
src/pybloomfilter.c:9333:33: warning: unused function '__Pyx_PyInt_FromSize_t' [-Wunused-function]
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
^
src/pybloomfilter.c:8113:27: warning: unused function '__Pyx_ErrFetch' [-Wunused-function]
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject tb) {
^
10 warnings generated.
In file included from src/pybloomfilter.c:248:
src/mmapbitarray.h:115:16: warning: attribute 'always_inline' is ignored, place it after "struct" to apply attribute to type declaration [-Wignored-attributes]
attribute((always_inline))
^
In file included from src/pybloomfilter.c:249:
src/bloomfilter.h:94:16: warning: 'always_inline' attribute only applies to functions [-Wignored-attributes]
attribute((always_inline))
^
src/pybloomfilter.c:9193:32: warning: unused function '__Pyx_PyUnicode_FromString' [-Wunused-function]
static CYTHON_INLINE PyObject
__Pyx_PyUnicode_FromString(const char
c_str) {
^
src/pybloomfilter.c:314:29: warning: unused function '__Pyx_Py_UNICODE_strlen' [-Wunused-function]
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
^
src/pybloomfilter.c:9333:33: warning: unused function '__Pyx_PyInt_FromSize_t' [-Wunused-function]
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
^
src/pybloomfilter.c:8113:27: warning: unused function '__Pyx_ErrFetch' [-Wunused-function]
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
^
6 warnings generated.
creating build/lib.macosx-10.12-intel-2.7
cc -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -Wl,-F. build/temp.macosx-10.12-intel-2.7/src/mmapbitarray.o build/temp.macosx-10.12-intel-2.7/src/bloomfilter.o build/temp.macosx-10.12-intel-2.7/src/md5.o build/temp.macosx-10.12-intel-2.7/src/primetester.o build/temp.macosx-10.12-intel-2.7/src/MurmurHash3.o build/temp.macosx-10.12-intel-2.7/src/pybloomfilter.o -lcrypto -o build/lib.macosx-10.12-intel-2.7/pybloomfilter.so
ld: library not found for -lcrypto
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'cc' failed with exit status 1

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

Command "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;file='/private/tmp/pip-build-CTch7V/pybloomfiltermmap/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-oBJRRI-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-CTch7V/pybloomfiltermmap/

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

1 participant