Giter Site home page Giter Site logo

Unable to cross compile due to cffi about bcrypt HOT 6 CLOSED

pyca avatar pyca commented on August 23, 2024
Unable to cross compile due to cffi

from bcrypt.

Comments (6)

dstufft avatar dstufft commented on August 23, 2024

Hmm... So this looks like it might actually be a problem with CFFI itself. The error that's occuring now is that it can't import the _cffi_backend from the installed library. What happens if you install cffi before running the build for bcrypt?

from bcrypt.

Diaoul avatar Diaoul commented on August 23, 2024

Exactly the same as pyca/pyopenssl#157 read my comments in that issue.
The problem is that bcrypt tries to import itself during setup.py to trigger cffi compilation, even with cffi installed on the host and cross-compilation going well it will ultimately fail when it tries to import the cross-compiled binary on the host.

from bcrypt.

Diaoul avatar Diaoul commented on August 23, 2024

This is since 1.1.0, 1.0.2 was fine.

from bcrypt.

dstufft avatar dstufft commented on August 23, 2024

Well bcrypt has always imported itself during setup.py, it's just previously there was two compilations, one was implicit that compiled on import, and one was explicit that compiled as part of the setup.py build_ext run. bcrypt 1.1.0 is very careful not to call _load_library during the invocation of setup.py. In fact this is failing before that is even taking place since it's failing at _ffi = FFI() which is occurring before anything bcrypt specific.

Is there a set of commands I can use to reproduce this on either an OS X box or some kind of Linux box?

from bcrypt.

Diaoul avatar Diaoul commented on August 23, 2024

Importing occurs on the host where cffi isn't installed. I installed it and now it seems to work. I'll try to import it on target and keep you posted.

from bcrypt.

Diaoul avatar Diaoul commented on August 23, 2024

It seems to work with cffi installed on the host. I can import bcrypt on the target. I don't know if the C extension is loaded properly though, I'll reopen if I have any problem.

I'm sceptical about the module trying to import itself during setup. Setup is about setting up things before you use it. In bcrypt's case that's almost OK because you don't have a lot of dependencies but still, that doesn't seem right.

from bcrypt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.