Opened 5 years ago

Closed 5 years ago

#19626 closed defect (fixed)

OpenSSL hack for El Capitan

Reported by: vbraun Owned by:
Priority: major Milestone: sage-6.10
Component: packages: standard Keywords:
Cc: u/vbraun/openssl_hack_for_el_capitan Merged in:
Authors: Volker Braun Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: 5ba4495 (Commits) Commit: 5ba4495b19d88f38fe33a197fb6531f7f9e15a6a
Dependencies: Stopgaps:

Description (last modified by vbraun)

Make Python link against openssl on OSX 10.11

Change History (15)

comment:1 Changed 5 years ago by vbraun

  • Branch set to u/vbraun/openssl_hack_for_el_capitan

comment:2 Changed 5 years ago by vbraun

  • Authors set to Volker Braun
  • Commit set to 3dafaa95dbf22be98f3cb698d9d01cbc0ffbaed0
  • Component changed from PLEASE CHANGE to packages: standard
  • Description modified (diff)
  • Status changed from new to needs_review
  • Type changed from PLEASE CHANGE to defect

New commits:

3dafaa9OSX: add include path for hidden openssl headers

comment:3 Changed 5 years ago by jdemeyer

  • Reviewers set to Jeroen Demeyer
  • Status changed from needs_review to positive_review

I can't test this but if you say that it works, I believe you.

Please merge this in the same beta as #18542, otherwise you'll need to bump the version number of the package.

comment:4 Changed 5 years ago by jhpalmieri

It seems to work on OS X 10.10 (or at least when I build Python, it looks in the indicated place for the openssl headers), but I don't have access to my OS X 10.11 machine today.

comment:5 follow-up: Changed 5 years ago by dimpase

Cool, after applying this patch on OSX 10.11 and rebuilding python I indeed can do

>> import ssl

comment:6 Changed 5 years ago by vbraun

  • Branch changed from u/vbraun/openssl_hack_for_el_capitan to 3dafaa95dbf22be98f3cb698d9d01cbc0ffbaed0
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:7 in reply to: ↑ 5 ; follow-up: Changed 5 years ago by jhpalmieri

  • Commit 3dafaa95dbf22be98f3cb698d9d01cbc0ffbaed0 deleted

Replying to dimpase:

Cool, after applying this patch on OSX 10.11 and rebuilding python I indeed can do

>> import ssl

Could you try building from scratch? When I rebuild Python everything works, but when I build from scratch, Python fails to build. This is on OS X 10.10:

Installing valgrind suppression file...
Testing importing of various modules...
ctypes module imported OK
math module imported OK
hashlib module imported OK
crypt module imported OK
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named readline
readline module failed to import
socket module imported OK
Error: One or more modules failed to import.

Earlier in the log:

building 'readline' extension
gcc -fno-strict-aliasing -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-migrator/sdk/MacOSX.sdk/usr/include/ -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/palmieri/Desktop/TEMP/sage/local/include -I. -IInclude -I./Include -I/usr/local/include -I/Users/palmieri/Desktop/TEMP/sage/local/var/tmp/sage/build/python2-2.7.9/src/Include -I/Users/palmieri/Desktop/TEMP/sage/local/var/tmp/sage/build/python2-2.7.9/src -c /Users/palmieri/Desktop/TEMP/sage/local/var/tmp/sage/build/python2-2.7.9/src/Modules/readline.c -o build/temp.macosx-10.9-x86_64-2.7/Users/palmieri/Desktop/TEMP/sage/local/var/tmp/sage/build/python2-2.7.9/src/Modules/readline.o
Modules/readline.c: In function 'flex_complete':
Modules/readline.c:868:5: error: 'rl_completion_suppress_append' undeclared (first use in this function)
     rl_completion_suppress_append = 0;
     ^
Modules/readline.c:868:5: note: each undeclared identifier is reported only once for each function it appears in
Modules/readline.c: In function 'readline_until_enter_or_signal':
Modules/readline.c:988:5: error: 'rl_catch_signals' undeclared (first use in this function)
     rl_catch_signals = 0;
     ^

[snip]


Failed to build these modules:
_elementtree       _scproxy           pyexpat         
readline                                              

Could it be picking up the readline headers from the new include path?

I think this needs to be reopened, since it doesn't build from scratch successfully on OS X 10.10.

comment:8 in reply to: ↑ 7 Changed 5 years ago by dimpase

Replying to jhpalmieri:

Replying to dimpase:

Cool, after applying this patch on OSX 10.11 and rebuilding python I indeed can do

>> import ssl

Could you try building from scratch? When I rebuild Python everything works, but when I build from scratch, Python fails to build.

presently it is building in my office, I'll only know the outcome in about 14 hours from now on. In the worst case one can copy or link ...wift-migrator/sdk/MacOSX.sdk/usr/include/openssl/ somewhere, so that anything outside openssl/ from there is not looked up...

comment:9 Changed 5 years ago by vbraun

  • Branch 3dafaa95dbf22be98f3cb698d9d01cbc0ffbaed0 deleted
  • Cc u/vbraun/openssl_hack_for_el_capitan added
  • Resolution fixed deleted
  • Status changed from closed to new

comment:10 Changed 5 years ago by vbraun

  • Branch set to u/vbraun/openssl_hack_for_el_capitan

comment:11 Changed 5 years ago by vbraun

  • Commit set to 3dafaa95dbf22be98f3cb698d9d01cbc0ffbaed0
  • Status changed from new to needs_review

New commits:

3dafaa9OSX: add include path for hidden openssl headers

comment:12 Changed 5 years ago by git

  • Commit changed from 3dafaa95dbf22be98f3cb698d9d01cbc0ffbaed0 to 5ba4495b19d88f38fe33a197fb6531f7f9e15a6a

Branch pushed to git repo; I updated commit sha1. New commits:

5ba4495Make temp copy of xcode openssl headers

comment:13 Changed 5 years ago by vbraun

Rebuild from scratch works now

comment:14 Changed 5 years ago by jhpalmieri

Works for me, too.

comment:15 Changed 5 years ago by vbraun

  • Branch changed from u/vbraun/openssl_hack_for_el_capitan to 5ba4495b19d88f38fe33a197fb6531f7f9e15a6a
  • Resolution set to fixed
  • Status changed from needs_review to closed
Note: See TracTickets for help on using tickets.