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

uboot build under OE - DSO support routines::could not load the shared library #6895

Closed
muvarov opened this issue Feb 24, 2022 · 6 comments
Closed

Comments

@muvarov
Copy link

muvarov commented Feb 24, 2022

Building u-boot under Open Embedded. It refers to openssl to sign keys. With python3.7 everything worked, now I get the following error:
| Traceback (most recent call last):
| File "/home/maxim.uvarov/meta-ts/build/tmp/work/qemuarm64_secureboot-poky-linux/u-boot/1_2022.01-r0/git/tools/efivar.py", line 15, in
| from OpenSSL import crypto
| File "/home/maxim.uvarov/meta-ts/build/tmp/work/qemuarm64_secureboot-poky-linux/u-boot/1_2022.01-r0/recipe-sysroot-native/usr/lib/python3.10/site-packages/OpenSSL/init.py", line 8, in
| from OpenSSL import crypto, SSL
| File "/home/maxim.uvarov/meta-ts/build/tmp/work/qemuarm64_secureboot-poky-linux/u-boot/1_2022.01-r0/recipe-sysroot-native/usr/lib/python3.10/site-packages/OpenSSL/crypto.py", line 11, in
| from OpenSSL._util import (
| File "/home/maxim.uvarov/meta-ts/build/tmp/work/qemuarm64_secureboot-poky-linux/u-boot/1_2022.01-r0/recipe-sysroot-native/usr/lib/python3.10/site-packages/OpenSSL/_util.py", line 5, in
| from cryptography.hazmat.bindings.openssl.binding import Binding
| File "/home/maxim.uvarov/meta-ts/build/tmp/work/qemuarm64_secureboot-poky-linux/u-boot/1_2022.01-r0/recipe-sysroot-native/usr/lib/python3.10/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 205, in
| Binding.init_static_locks()
| File "/home/maxim.uvarov/meta-ts/build/tmp/work/qemuarm64_secureboot-poky-linux/u-boot/1_2022.01-r0/recipe-sysroot-native/usr/lib/python3.10/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 179, in init_static_locks
| cls._ensure_ffi_initialized()
| File "/home/maxim.uvarov/meta-ts/build/tmp/work/qemuarm64_secureboot-poky-linux/u-boot/1_2022.01-r0/recipe-sysroot-native/usr/lib/python3.10/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 167, in _ensure_ffi_initialized
| _openssl_assert(
| File "/home/maxim.uvarov/meta-ts/build/tmp/work/qemuarm64_secureboot-poky-linux/u-boot/1_2022.01-r0/recipe-sysroot-native/usr/lib/python3.10/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 77, in _openssl_assert
| raise InternalError(
| cryptography.exceptions.InternalError: Unknown OpenSSL error. This error is commonly encountered when another library is not cleaning up the OpenSSL error stack. If you are using cryptography with another library that uses OpenSSL try disabling it before reporting a bug. Otherwise please file an issue at https://github.com/pyca/cryptography/issues with information on how to reproduce this. ([_OpenSSLErrorWithText(code=310378599, lib=37, reason=103, reason_text=b'error:12800067:DSO support routines::could not load the shared library'), _OpenSSLErrorWithText(code=310378599, lib=37, reason=103, reason_text=b'error:12800067:DSO support routines::could not load the shared library'), _OpenSSLErrorWithText(code=126615813, lib=15, reason=786693, reason_text=b'error:078C0105:common libcrypto routines::init fail')])

It looks like some collision between built openssl and host native. But it's not clear how to fix it.

@reaperhulk
Copy link
Member

Unfortunately without any instructions on how to reproduce this we can't really do much to help. Is this something you can replicate in a docker container and share that way?

@muvarov
Copy link
Author

muvarov commented Feb 25, 2022

@reaperhulk yea, I can provide instructions how to reproduce it. But it's OE build which will have some time to build dependencies. From the log it was not clean for me if it's OE (environment, paths, variables or etc) problem or if it's something related to pyca.

@reaperhulk
Copy link
Member

It’s not hugely likely that this is our bug but we can try to take a look if we’ve got a reproducer.

@muvarov
Copy link
Author

muvarov commented Feb 25, 2022

@reaperhulk Paul, please try to reproduce with the following instructions:

  1. git clone https://github.com/muvarov/meta-ts.git
  2. cd meta-ts
  3. kas build ./ci/qemuarm64-secureboot.yml

(or kas shell./ci/qemuarm64-secureboot.yml, then bitbake u-boot).

Code refers to the latest commits on OE layers for today. I set up refspecs to make bug producible.

@reaperhulk
Copy link
Member

There was a decent quantity of setup required to look at this and I got a random failure building libmpc while it was compiling the world. The error msg in question only occurs when cryptography has been built incorrectly though, so something in this build toolchain is building/linking incorrectly such that it fails during import at runtime.

@reaperhulk
Copy link
Member

Closing since this appears to be an unfortunate environmental challenge rather than anything specific to cryptography.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants