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
toolchain.py build kivy fails with CERTIFICATE_VERIFY_FAILED #282
Comments
You could try installing libffi using brew before building. |
Many thanks for your response.
Unfortunately? I had already installed libffi:
$ brew install libffi
Warning: libffi 3.2.1 is already installed and up-to-date
To reinstall 3.2.1, run `brew reinstall libffi`
Just in case I reinstalled libffii and all dependencies, then
unlinked/relinked libtool and mercurial.
The error is the same. It looks like the problem is with the connection to
the server.
I did see the warning below when reinstalling openssl, and attempted to
build kivy-ios after prepending /usr/local/opt/openssl/bin to my path, as
suggested below. But again, the connection is refused.
Is there any way to bypass the libffi download stage in the script? Given
that I've already got it in the build folder, would that work?
########################################################################
100.0%
==> Pouring openssl-1.0.2o_1.el_capitan.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), 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,
because Apple has deprecated use of OpenSSL in favor of its own TLS and
crypto libraries.
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.zshrc
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
For pkg-config to find this software you may need to set:
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
==> Summary
🍺 /usr/local/Cellar/openssl/1.0.2o_1: 1,791 files, 12.1MB
…On Fri, Apr 20, 2018 at 6:39 AM, Dan MacNaughtan ***@***.***> wrote:
You could try installing libffi using brew before building.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#282 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AQoMzQbo_sWaERGlpcNk8P-DT4Fy7vWmks5tqbr5gaJpZM4TVgcD>
.
|
I just posted the same issue, sorry for this. But my solution was to change the first line in toolchain.py to usr/bin/python. Check which python you are using! |
A possible, insecure, workaround is to |
This is a generic issue with python where it needs to use latest openssl not the older one. Fixing your PATH should help with this. In other word make sure If using brew update openssl. Closing as this is not a Kivy-ios specific issue. |
I know this is not a Kivy related issue BUT this problem happens during the command Toolkit Buiild Kivy when installing Kivy. Had me going for days until solved. I loaded the latest OpenSSL and ensured the build was using it - same problem. I puked down the certificate from the URL that was failing and out it in the keychain. It was not shown as trusted so I overload it to make it trust always. It still failed, I finally found that in the python folder there is a program to update certificates. Running that did resolve the problem and the build ran fine. |
Hi-
macos 10.11.6
python 2.7.14 [intel]
kivy-ios latest
kivy 1.10.0
urllib3 1.22
pyopenssl 17.5.0
I am trying to build kivy-ios from the git repository on my system (toolchain.py build kivy). All goes well until the point where it tries to download libffi-3.2.1.tar.gz, where I get the CERTIFICATE_VERIFY_FAILED error. See below.
I've downloaded the tarfile via wget into .cache and tried compiling libffi explicitly (from: https://www.bountysource.com/issues/35347723-failed-build-openssl). But the toolchain script still tries (and fails) to download the source tarball.
Hopefully, this is something straightforward with a simple workaround that I'm overlooking. Not really all that familiar with either the build process or urlllib on python.
The full log is here (toolchain.log.txt), but I also pasted just the crashy parts below:
[....]
Download libffi
Downloading https://www.mirrorservice.org/sites/sourceware.org/pub/libffi/libffi-3.2.1.tar.gz
Traceback (most recent call last):
File "toolchain.py", line 1364, in
ToolchainCL()
File "toolchain.py", line 1113, in init
getattr(self, args.command)()
File "toolchain.py", line 1154, in build
build_recipes(args.recipe, ctx)
File "toolchain.py", line 1004, in build_recipes
recipe.execute()
File "/Users/stan/git/kivy-ios/toolchain.py", line 612, in execute
self.download()
File "/Users/stan/git/kivy-ios/toolchain.py", line 55, in _cache_execution
f(self, *args, **kwargs)
File "/Users/stan/git/kivy-ios/toolchain.py", line 641, in download
self.download_file(self.url.format(version=self.version), fn)
File "/Users/stan/git/kivy-ios/toolchain.py", line 433, in download_file
urlretrieve(url, filename, report_hook)
File "/Users/stan/anaconda/envs/kivy/lib/python2.7/urllib.py", line 245, in retrieve
fp = self.open(url, data)
File "/Users/stan/anaconda/envs/kivy/lib/python2.7/urllib.py", line 213, in open
return getattr(self, name)(url)
File "/Users/stan/anaconda/envs/kivy/lib/python2.7/urllib.py", line 443, in open_https
h.endheaders(data)
File "/Users/stan/anaconda/envs/kivy/lib/python2.7/httplib.py", line 1038, in endheaders
self._send_output(message_body)
File "/Users/stan/anaconda/envs/kivy/lib/python2.7/httplib.py", line 882, in _send_output
self.send(msg)
File "/Users/stan/anaconda/envs/kivy/lib/python2.7/httplib.py", line 844, in send
self.connect()
File "/Users/stan/anaconda/envs/kivy/lib/python2.7/httplib.py", line 1263, in connect
server_hostname=server_hostname)
File "/Users/stan/anaconda/envs/kivy/lib/python2.7/ssl.py", line 363, in wrap_socket
_context=self)
File "/Users/stan/anaconda/envs/kivy/lib/python2.7/ssl.py", line 611, in init
self.do_handshake()
File "/Users/stan/anaconda/envs/kivy/lib/python2.7/ssl.py", line 840, in do_handshake
self._sslobj.do_handshake()
IOError: [Errno socket error] [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)
The text was updated successfully, but these errors were encountered: