Closed mikec closed 10 years ago
you probably have openssl 1.x headers but you are linking to a 0.9.x libssl. Make a search for libssl.*.dylib into your filesystem to get the correct path.
@unbit That seems to be the issue.
Here's what I did to get it to work:
Find where my lib is:
find / -name "libssl.*.dylib" 2>/dev/null
For me, 1.x was installed in /usr/local and /usr/local/lib via homebrew. 0.9.x was installed by Xcode at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
I decided to use 1.x from homebrew:
sudo C_INCLUDE_PATH=/usr/local/include LIBRARY_PATH=/usr/local/lib pip install uwsgi
Possible that the 1.x header got copied to /usr/local/lib somehow. Reinstalling homebrew openssl (which is keg only and won't (shouldn't) interfere with OS X header) cleaned up the issue:
brew uninstall openssl --force
brew install openssl
@dustinfarris This fixed my issue as well. Thanks.
Just ran into this problem and @dustinfarris's suggestion worked for me as well. Thanks mate! :heart:
I took a different approach by specifying the LDFLAGS
and CPPFLAGS
and it built just fine as well!
In short, just run this:
LDFLAGS=-L/usr/local/opt/openssl/lib CPPFLAGS=-I/usr/local/opt/openssl/include pip install sentry
$ brew info openssl
openssl: stable 1.0.2g (bottled) [keg-only]
SSL/TLS cryptography library
https://openssl.org/
/usr/local/Cellar/openssl/1.0.2e_1 (465 files, 11.9M)
Poured from bottle
/usr/local/Cellar/openssl/1.0.2f (466 files, 11.9M)
Poured from bottle
/usr/local/Cellar/openssl/1.0.2g (466 files, 11.9M) *
Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/openssl.rb
==> Dependencies
Build: makedepend ✘
==> Options
--universal
Build a universal binary
--without-test
Skip build-time tests (not recommended)
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
This formula is keg-only, which means it was not symlinked into /usr/local.
Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
$ LDFLAGS=-L/usr/local/opt/openssl/lib CPPFLAGS=-I/usr/local/opt/openssl/include pip install sentry
Collecting sentry
Using cached sentry-8.2.4-py27-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): simplejson<3.9.0,>=3.2.0 in /Users/ye/.envs/sentry/lib/python2.7/site-packages (from sentry)
Requirement already satisfied (use --upgrade to upgrade): pytest-django<2.10.0,>=2.9.1 in /Users/ye/.envs/sentry/lib/python2.7/site-packages (from sentry)
Requirement already satisfied (use --upgrade to upgrade): django-picklefield<0.4.0,>=0.3.0 in /Users/ye/.envs/sentry/lib/python2.7/site-packages (from sentry)
Requirement already satisfied (use --upgrade to upgrade): statsd<3.2.0,>=3.1.0 in /Users/ye/.envs/sentry/lib/python2.7/site-packages (from sentry)
Requirement already satisfied (use --upgrade to upgrade): click<7.0,>=5.0 in /Users/ye/.envs/sentry/lib/python2.7/site-packages (from sentry)
Requirement already satisfied (use --upgrade to upgrade): django-paging<0.3.0,>=0.2.5 in /Users/ye/.envs/sentry/lib/python2.7/site-packages (from sentry)
Collecting uwsgi<2.1.0,>2.0.0 (from sentry)
Using cached uwsgi-2.0.12.tar.gz
Collecting hiredis<0.2.0,>=0.1.0 (from sentry)
Requirement already satisfied (use --upgrade to upgrade): django-templatetag-sugar>=0.1.0 in /Users/ye/.envs/sentry/lib/python2.7/site-packages (from sentry)
Collecting email-reply-parser<0.3.0,>=0.2.0 (from sentry)
Collecting ua-parser<0.7.0,>=0.6.1 (from sentry)
Using cached ua_parser-0.6.1-py2.py3-none-any.whl
Collecting mock<1.1,>=0.8.0 (from sentry)
Collecting progressbar<2.4,>=2.2 (from sentry)
Collecting psycopg2<2.6.0,>=2.5.0 (from sentry)
Collecting petname<1.8,>=1.7 (from sentry)
Collecting Django<1.7,>=1.6.0 (from sentry)
Using cached Django-1.6.11-py2.py3-none-any.whl
Collecting toronado<0.1.0,>=0.0.4 (from sentry)
Collecting djangorestframework<2.4.0,>=2.3.8 (from sentry)
Using cached djangorestframework-2.3.14-py2.py3-none-any.whl
Collecting PyYAML<4.0,>=3.11 (from sentry)
Collecting django-crispy-forms<1.5.0,>=1.4.0 (from sentry)
Collecting raven>=5.3.0 (from sentry)
Using cached raven-5.12.0-py2.py3-none-any.whl
Collecting django-recaptcha<1.1.0,>=1.0.4 (from sentry)
Collecting BeautifulSoup<3.3.0,>=3.2.1 (from sentry)
Collecting kombu==3.0.30 (from sentry)
Using cached kombu-3.0.30-py2.py3-none-any.whl
Collecting django-sudo<1.3.0,>=1.2.0 (from sentry)
Using cached django_sudo-1.2.1-py2.py3-none-any.whl
Collecting enum34<1.2.0,>=0.9.18 (from sentry)
Collecting python-dateutil<3.0.0,>=2.0.0 (from sentry)
Using cached python_dateutil-2.5.2-py2.py3-none-any.whl
Collecting redis<2.11.0,>=2.10.3 (from sentry)
Using cached redis-2.10.5-py2.py3-none-any.whl
Collecting lxml>=3.4.1 (from sentry)
Collecting rb<2.0.0,>=1.4.0 (from sentry)
Using cached rb-1.4-py2-none-any.whl
Collecting setproctitle<1.2.0,>=1.1.7 (from sentry)
Collecting urllib3<1.15,>=1.14 (from sentry)
Using cached urllib3-1.14-py2.py3-none-any.whl
Collecting six<2.0.0,>=1.6.0 (from sentry)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting cssutils<0.10.0,>=0.9.9 (from sentry)
Collecting django-social-auth<0.8.0,>=0.7.28 (from sentry)
Collecting South==1.0.1 (from sentry)
Requirement already satisfied (use --upgrade to upgrade): pytest<2.7.0,>=2.6.4 in /Users/ye/.envs/sentry/lib/python2.7/site-packages (from sentry)
Collecting requests[security]<2.10.0,>=2.9.1 (from sentry)
Using cached requests-2.9.1-py2.py3-none-any.whl
Collecting django-bitfield<1.8.0,>=1.7.0 (from sentry)
Using cached django_bitfield-1.7.1-py2.py3-none-any.whl
Collecting django-debug-toolbar<1.4.0,>=1.3.2 (from sentry)
Using cached django_debug_toolbar-1.3.2-py2.py3-none-any.whl
Collecting ipaddr<2.2.0,>=2.1.11 (from sentry)
Collecting django-jsonfield<0.9.14,>=0.9.13 (from sentry)
Collecting exam>=0.5.1 (from sentry)
Collecting python-memcached<2.0.0,>=1.53 (from sentry)
Using cached python_memcached-1.57-py2.py3-none-any.whl
Collecting celery<3.1.19,>=3.1.8 (from sentry)
Using cached celery-3.1.18-py2.py3-none-any.whl
Collecting cssselect (from toronado<0.1.0,>=0.0.4->sentry)
Collecting contextlib2 (from raven>=5.3.0->sentry)
Collecting amqp<2.0,>=1.4.5 (from kombu==3.0.30->sentry)
Using cached amqp-1.4.9-py2.py3-none-any.whl
Collecting anyjson>=0.3.3 (from kombu==3.0.30->sentry)
Collecting oauth2>=1.5.167 (from django-social-auth<0.8.0,>=0.7.28->sentry)
Using cached oauth2-1.9.0.post1-py2.py3-none-any.whl
Collecting python-openid>=2.2 (from django-social-auth<0.8.0,>=0.7.28->sentry)
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.25 in /Users/ye/.envs/sentry/lib/python2.7/site-packages (from pytest<2.7.0,>=2.6.4->sentry)
Collecting pyOpenSSL>=0.13 (from requests[security]<2.10.0,>=2.9.1->sentry)
Using cached pyOpenSSL-16.0.0-py2.py3-none-any.whl
Collecting ndg-httpsclient (from requests[security]<2.10.0,>=2.9.1->sentry)
Collecting pyasn1 (from requests[security]<2.10.0,>=2.9.1->sentry)
Using cached pyasn1-0.1.9-py2.py3-none-any.whl
Collecting sqlparse (from django-debug-toolbar<1.4.0,>=1.3.2->sentry)
Collecting pytz>dev (from celery<3.1.19,>=3.1.8->sentry)
Using cached pytz-2016.3-py2.py3-none-any.whl
Collecting billiard<3.4,>=3.3.0.20 (from celery<3.1.19,>=3.1.8->sentry)
Using cached billiard-3.3.0.23-cp27-none-macosx_10_6_intel.whl
Collecting httplib2 (from oauth2>=1.5.167->django-social-auth<0.8.0,>=0.7.28->sentry)
Collecting cryptography>=1.3 (from pyOpenSSL>=0.13->requests[security]<2.10.0,>=2.9.1->sentry)
Using cached cryptography-1.3.1-cp27-cp27m-macosx_10_10_intel.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools>=11.3 in /Users/ye/.envs/sentry/lib/python2.7/site-packages (from cryptography>=1.3->pyOpenSSL>=0.13->requests[security]<2.10.0,>=2.9.1->sentry)
Collecting ipaddress (from cryptography>=1.3->pyOpenSSL>=0.13->requests[security]<2.10.0,>=2.9.1->sentry)
Using cached ipaddress-1.0.16-py27-none-any.whl
Collecting idna>=2.0 (from cryptography>=1.3->pyOpenSSL>=0.13->requests[security]<2.10.0,>=2.9.1->sentry)
Using cached idna-2.1-py2-none-any.whl
Collecting cffi>=1.4.1 (from cryptography>=1.3->pyOpenSSL>=0.13->requests[security]<2.10.0,>=2.9.1->sentry)
Using cached cffi-1.5.2-cp27-cp27m-macosx_10_10_intel.whl
Collecting pycparser (from cffi>=1.4.1->cryptography>=1.3->pyOpenSSL>=0.13->requests[security]<2.10.0,>=2.9.1->sentry)
Building wheels for collected packages: uwsgi
Running setup.py bdist_wheel for uwsgi ... done
Stored in directory: /Users/ye/Library/Caches/pip/wheels/a4/7b/7c/8cbe2fe2c2b963173361cc18aa726f165dc4803effbb8195fc
Successfully built uwsgi
Installing collected packages: uwsgi, hiredis, email-reply-parser, ua-parser, mock, progressbar, psycopg2, petname, Django, lxml, cssutils, cssselect, toronado, djangorestframework, PyYAML, django-crispy-forms, contextlib2, raven, django-recaptcha, BeautifulSoup, amqp, anyjson, kombu, django-sudo, enum34, six, python-dateutil, redis, rb, setproctitle, urllib3, httplib2, oauth2, python-openid, django-social-auth, South, ipaddress, pyasn1, idna, pycparser, cffi, cryptography, pyOpenSSL, ndg-httpsclient, requests, django-bitfield, sqlparse, django-debug-toolbar, ipaddr, django-jsonfield, exam, python-memcached, pytz, billiard, celery, sentry
Successfully installed BeautifulSoup-3.2.1 Django-1.6.11 PyYAML-3.11 South-1.0.1 amqp-1.4.9 anyjson-0.3.3 billiard-3.3.0.23 celery-3.1.18 cffi-1.5.2 contextlib2-0.5.1 cryptography-1.3.1 cssselect-0.9.1 cssutils-0.9.10 django-bitfield-1.7.1 django-crispy-forms-1.4.0 django-debug-toolbar-1.3.2 django-jsonfield-0.9.13 django-recaptcha-1.0.5 django-social-auth-0.7.28 django-sudo-1.2.1 djangorestframework-2.3.14 email-reply-parser-0.2.0 enum34-1.1.2 exam-0.10.5 hiredis-0.1.6 httplib2-0.9.2 idna-2.1 ipaddr-2.1.11 ipaddress-1.0.16 kombu-3.0.30 lxml-3.6.0 mock-1.0.1 ndg-httpsclient-0.4.0 oauth2-1.9.0.post1 petname-1.7 progressbar-2.3 psycopg2-2.5.5 pyOpenSSL-16.0.0 pyasn1-0.1.9 pycparser-2.14 python-dateutil-2.5.2 python-memcached-1.57 python-openid-2.2.5 pytz-2016.3 raven-5.12.0 rb-1.4 redis-2.10.5 requests-2.9.1 sentry-8.2.4 setproctitle-1.1.9 six-1.10.0 sqlparse-0.1.19 toronado-0.0.7 ua-parser-0.6.1 urllib3-1.14 uwsgi-2.0.12
I update my issue I found in Mac Os El Capitan. A solution taken from the suggestion of others.
find / -name "libssl.*.dylib" 2>/dev/null
/usr/lib/libssl.0.9.7.dylib
/usr/lib/libssl.0.9.8.dylib
/usr/local/Cellar/openssl/1.0.2d/lib/libssl.1.0.0.dylib <--- Installed by homebrew
/usr/local/lib/libssl.1.0.0.dylib
Then I built uwsgi as follows:
sudo LDFLAGS=-L/usr/local/Cellar/openssl/1.0.2d/lib make
I'm on OS X El Capitan. I tried all the suggestions here and various permutations. as of Aug 8 2016, I'm unable to get this to work. Has anything changed?
(env)Johns-iMac:2localhost jwheeler$ brew info openssl
openssl: stable 1.0.2h (bottled) [keg-only]
SSL/TLS cryptography library
https://openssl.org/
/usr/local/Cellar/openssl/1.0.2h_1 (1,691 files, 12M)
Poured from bottle on 2016-08-08 at 13:21:52
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/openssl.rb
==> Dependencies
Build: makedepend ✘
==> Options
--universal
Build a universal binary
--without-test
Skip build-time tests (not recommended)
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
This formula is keg-only, which means it was not symlinked into /usr/local.
Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
then I run:
LDFLAGS=-L/usr/local/opt/openssl/lib CPPFLAGS=-I/usr/local/opt/openssl/include pip install uwsgi -v
I get ssl=False
################# uWSGI configuration #################
pcre = False
kernel = Darwin
malloc = libc
execinfo = False
ifaddrs = True
ssl = False
zlib = True
locking = osx_spinlock
plugin_dir = .
timer = kqueue
yaml = embedded
json = False
filemonitor = kqueue
routing = False
debug = False
ucontext = False
capabilities = False
xml = libxml2
event = kqueue
I fixed my issue. I got totally lucky as it required an undocumented feature UWSGI_PROFILE_OVERRIDE. This seems like a bug as the build system is supposed to auto-detect support for openssl if you give it the headers location?
CFLAGS="-I/usr/local/opt/openssl/include" LDFLAGS="-L/usr/local/opt/openssl/lib" UWSGI_PROFILE_OVERRIDE=ssl=true pip install uwsgi -Iv
Anyway, that will get uwsgi compiles with ssl=True on El Capitan
Trying to install uwsgi with pip on OSX 10.8: