benfogle / crossenv

Cross-compiling virtualenv for Python
MIT License
108 stars 22 forks source link

paramiko crosscompile issue #100

Open mosolovsa opened 2 years ago

mosolovsa commented 2 years ago

Hello! Please help me with cross compiling paramiko module to embedded Linux with ARM.

I've crosscompiling from linux x86_64 to armv7 (32 bit).

Looks like there is a problem with crosscompiling "cryptography" module due to some parts is written in Rust and Rust do not have information about need to crosscompile the library to target board. I think that way because of messages during build, e.g.:

error: linking with `cc` failed: exit status: 1
      |
      = note: "cc" "-m64"

I doubt that -m64 is right argument because my target board has imx6 (32-bit armv7)

and later on I've see:

     = note: /usr/bin/ld: /home/serg/crscmpl/imx6bh4/host/usr/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/lib32/../lib/Scrt1.o: Relocations in generic ELF (EM: 40)
              /usr/bin/ld: /home/serg/crscmpl/imx6bh4/host/usr/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/lib32/../lib/Scrt1.o: Relocations in generic ELF (EM: 40)
              /home/serg/crscmpl/imx6bh4/host/usr/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/lib32/../lib/Scrt1.o: error adding symbols: File in wrong format
              collect2: error: ld returned 1 exit status

host ld fails at trying to link target libs

host and target python version is 3.6.10, crossvenv ver. 1.20

verbose output:

(cross)  ✘ cepera@mosolov ξ‚° ~/tmp/pybh4 ξ‚° πŸ™ˆπŸ™ŠπŸ™‰ pip install paramiko
Collecting paramiko
  Using cached https://files.pythonhosted.org/packages/04/e5/39ec73dd4a8769d6759b8d6c60a1b2c9337f585407c2ae8bfb8ccb734278/paramiko-2.11.0-py2.py3-none-any.whl
Collecting cryptography>=2.5 (from paramiko)
  Using cached https://files.pythonhosted.org/packages/51/05/bb2b681f6a77276fc423d04187c39dafdb65b799c8d87b62ca82659f9ead/cryptography-37.0.2.tar.gz
  Installing build dependencies ... done
Collecting six (from paramiko)
  Using cached https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
Requirement already satisfied: bcrypt>=3.1.3 in ./cross_venv/cross/lib/python3.6/site-packages (from paramiko) (3.2.2)
Collecting pynacl>=1.0.1 (from paramiko)
  Using cached https://files.pythonhosted.org/packages/a7/22/27582568be639dfe22ddb3902225f91f2f17ceff88ce80e4db396c8986da/PyNaCl-1.5.0.tar.gz
  Installing build dependencies ... done
Requirement already satisfied: cffi>=1.12 in ./cross_venv/cross/lib/python3.6/site-packages (from cryptography>=2.5->paramiko) (1.15.0)
Requirement already satisfied: pycparser in ./cross_venv/cross/lib/python3.6/site-packages (from cffi>=1.12->cryptography>=2.5->paramiko) (2.21)
Installing collected packages: cryptography, six, pynacl, paramiko
  Running setup.py install for cryptography ... error
    Complete output from command /home/cepera/tmp/pybh4/cross_venv/cross/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-uw5jp1jq/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-17latr65/install-record.txt --single-version-externally-managed --compile --install-headers /home/cepera/tmp/pybh4/cross_venv/cross/include/site/python3.6/cryptography:
    /home/cepera/crscmpl/target/build-python/bh4/lib/python3.6/importlib/__init__.py:126: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography and will be removed in a future release.
      return _bootstrap._gcd_import(name[level:], package, level)
    running install
    /tmp/pip-build-env-sc5ybsya/lib/python3.6/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      setuptools.SetuptoolsDeprecationWarning,
    running build
    running build_py
    creating build
    creating build/lib.linux-arm-3.6
    creating build/lib.linux-arm-3.6/cryptography
    copying src/cryptography/fernet.py -> build/lib.linux-arm-3.6/cryptography
    copying src/cryptography/__about__.py -> build/lib.linux-arm-3.6/cryptography
    copying src/cryptography/exceptions.py -> build/lib.linux-arm-3.6/cryptography
    copying src/cryptography/utils.py -> build/lib.linux-arm-3.6/cryptography
    copying src/cryptography/__init__.py -> build/lib.linux-arm-3.6/cryptography
    creating build/lib.linux-arm-3.6/cryptography/hazmat
    copying src/cryptography/hazmat/_oid.py -> build/lib.linux-arm-3.6/cryptography/hazmat
    copying src/cryptography/hazmat/__init__.py -> build/lib.linux-arm-3.6/cryptography/hazmat
    creating build/lib.linux-arm-3.6/cryptography/x509
    copying src/cryptography/x509/certificate_transparency.py -> build/lib.linux-arm-3.6/cryptography/x509
    copying src/cryptography/x509/extensions.py -> build/lib.linux-arm-3.6/cryptography/x509
    copying src/cryptography/x509/base.py -> build/lib.linux-arm-3.6/cryptography/x509
    copying src/cryptography/x509/name.py -> build/lib.linux-arm-3.6/cryptography/x509
    copying src/cryptography/x509/ocsp.py -> build/lib.linux-arm-3.6/cryptography/x509
    copying src/cryptography/x509/oid.py -> build/lib.linux-arm-3.6/cryptography/x509
    copying src/cryptography/x509/__init__.py -> build/lib.linux-arm-3.6/cryptography/x509
    copying src/cryptography/x509/general_name.py -> build/lib.linux-arm-3.6/cryptography/x509
    creating build/lib.linux-arm-3.6/cryptography/hazmat/backends
    copying src/cryptography/hazmat/backends/__init__.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends
    creating build/lib.linux-arm-3.6/cryptography/hazmat/bindings
    copying src/cryptography/hazmat/bindings/__init__.py -> build/lib.linux-arm-3.6/cryptography/hazmat/bindings
    creating build/lib.linux-arm-3.6/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/padding.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/_serialization.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/_asymmetric.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/poly1305.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/__init__.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives
    copying src/cryptography/hazmat/primitives/_cipheralgorithm.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives
    creating build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/encode_asn1.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/x25519.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/x448.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/aead.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/ed448.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/ed25519.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/poly1305.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/__init__.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/dh.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.linux-arm-3.6/cryptography/hazmat/backends/openssl
    creating build/lib.linux-arm-3.6/cryptography/hazmat/bindings/openssl
    copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.linux-arm-3.6/cryptography/hazmat/bindings/openssl
    copying src/cryptography/hazmat/bindings/openssl/__init__.py -> build/lib.linux-arm-3.6/cryptography/hazmat/bindings/openssl
    copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.linux-arm-3.6/cryptography/hazmat/bindings/openssl
    creating build/lib.linux-arm-3.6/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/x25519.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/x448.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/ed448.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/ed25519.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/__init__.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/asymmetric
    copying src/cryptography/hazmat/primitives/asymmetric/types.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/asymmetric
    creating build/lib.linux-arm-3.6/cryptography/hazmat/primitives/serialization
    copying src/cryptography/hazmat/primitives/serialization/base.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/serialization
    copying src/cryptography/hazmat/primitives/serialization/ssh.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/serialization
    copying src/cryptography/hazmat/primitives/serialization/__init__.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/serialization
    copying src/cryptography/hazmat/primitives/serialization/pkcs12.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/serialization
    copying src/cryptography/hazmat/primitives/serialization/pkcs7.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/serialization
    creating build/lib.linux-arm-3.6/cryptography/hazmat/primitives/ciphers
    copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/ciphers
    copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/ciphers
    copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/ciphers
    copying src/cryptography/hazmat/primitives/ciphers/aead.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/ciphers
    copying src/cryptography/hazmat/primitives/ciphers/__init__.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/ciphers
    creating build/lib.linux-arm-3.6/cryptography/hazmat/primitives/twofactor
    copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/twofactor
    copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/twofactor
    copying src/cryptography/hazmat/primitives/twofactor/__init__.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/twofactor
    creating build/lib.linux-arm-3.6/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/scrypt.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/kdf
    copying src/cryptography/hazmat/primitives/kdf/__init__.py -> build/lib.linux-arm-3.6/cryptography/hazmat/primitives/kdf
    running egg_info
    writing src/cryptography.egg-info/PKG-INFO
    writing dependency_links to src/cryptography.egg-info/dependency_links.txt
    writing requirements to src/cryptography.egg-info/requires.txt
    writing top-level names to src/cryptography.egg-info/top_level.txt
    reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    no previously-included directories found matching 'docs/_build'
    warning: no previously-included files found matching 'vectors'
    warning: no previously-included files matching '*' found under directory 'vectors'
    warning: no previously-included files matching '*' found under directory '.github'
    warning: no previously-included files found matching 'release.py'
    warning: no previously-included files found matching '.coveragerc'
    warning: no previously-included files found matching 'codecov.yml'
    warning: no previously-included files found matching '.readthedocs.yml'
    warning: no previously-included files found matching 'dev-requirements.txt'
    warning: no previously-included files found matching 'tox.ini'
    warning: no previously-included files found matching 'mypy.ini'
    warning: no previously-included files matching '*' found under directory '.circleci'
    adding license file 'LICENSE'
    adding license file 'LICENSE.APACHE'
    adding license file 'LICENSE.BSD'
    adding license file 'LICENSE.PSF'
    writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
    copying src/cryptography/py.typed -> build/lib.linux-arm-3.6/cryptography
    creating build/lib.linux-arm-3.6/cryptography/hazmat/bindings/_rust
    copying src/cryptography/hazmat/bindings/_rust/__init__.pyi -> build/lib.linux-arm-3.6/cryptography/hazmat/bindings/_rust
    copying src/cryptography/hazmat/bindings/_rust/asn1.pyi -> build/lib.linux-arm-3.6/cryptography/hazmat/bindings/_rust
    copying src/cryptography/hazmat/bindings/_rust/ocsp.pyi -> build/lib.linux-arm-3.6/cryptography/hazmat/bindings/_rust
    copying src/cryptography/hazmat/bindings/_rust/x509.pyi -> build/lib.linux-arm-3.6/cryptography/hazmat/bindings/_rust
    running build_ext
    running build_rust
     Downloading crates ...
      Downloaded once_cell v1.10.0
      Downloaded asn1 v0.8.7
      Downloaded indoc v0.3.6
      Downloaded ouroboros v0.15.0
      Downloaded ouroboros_macro v0.15.0
      Downloaded proc-macro-hack v0.5.19
      Downloaded proc-macro2 v1.0.37
      Downloaded pyo3-build-config v0.15.2
      Downloaded pyo3-macros v0.15.2
      Downloaded pyo3 v0.15.2
      Downloaded redox_syscall v0.2.13
      Downloaded pyo3-macros-backend v0.15.2
      Downloaded syn v1.0.91
      Downloaded stable_deref_trait v1.2.0
      Downloaded unindent v0.1.8
      Downloaded aliasable v0.1.3
      Downloaded asn1_derive v0.8.7
      Downloaded indoc-impl v0.3.6
      Downloaded paste v0.1.18
      Downloaded paste-impl v0.1.18
      Downloaded quote v1.0.18
      Downloaded smallvec v1.8.0
      Downloaded pem v1.0.2
      Downloaded lock_api v0.4.7
      Downloaded Inflector v0.11.4
      Downloaded libc v0.2.124
    cargo rustc --lib --manifest-path src/rust/Cargo.toml --target arm-unknown-linux-gnueabihf --release -v --features pyo3/abi3-py36 pyo3/extension-module -- --crate-type cdylib -C linker=/home/serg/crscmpl/imx6bh4/host/usr/bin/arm-buildroot-linux-gnueabihf-gcc
       Compiling proc-macro2 v1.0.37
       Compiling unicode-xid v0.2.2
       Compiling autocfg v1.1.0
       Compiling syn v1.0.91
         Running `rustc --crate-name build_script_build --edition=2018 /home/cepera/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.37/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off -C overflow-checks=on --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=35ff75aff74bf081 -C extra-filename=-35ff75aff74bf081 --out-dir /tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/proc-macro2-35ff75aff74bf081 -L dependency=/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/deps --cap-lints allow`
         Running `rustc --crate-name build_script_build --edition=2018 /home/cepera/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.91/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off -C overflow-checks=on --cfg 'feature="clone-impls"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="extra-traits"' --cfg 'feature="full"' --cfg 'feature="parsing"' --cfg 'feature="printing"' --cfg 'feature="proc-macro"' --cfg 'feature="quote"' -C metadata=21505b28ff620a5c -C extra-filename=-21505b28ff620a5c --out-dir /tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/syn-21505b28ff620a5c -L dependency=/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/deps --cap-lints allow`
         Running `rustc --crate-name autocfg /home/cepera/.cargo/registry/src/github.com-1ecc6299db9ec823/autocfg-1.1.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off -C overflow-checks=on -C metadata=d37872fa5288df29 -C extra-filename=-d37872fa5288df29 --out-dir /tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/deps -L dependency=/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/deps --cap-lints allow`
         Running `rustc --crate-name unicode_xid /home/cepera/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-xid-0.2.2/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off -C overflow-checks=on --cfg 'feature="default"' -C metadata=2c51865e5af486b3 -C extra-filename=-2c51865e5af486b3 --out-dir /tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/deps -L dependency=/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/deps --cap-lints allow`
       Compiling version_check v0.9.4
         Running `rustc --crate-name version_check /home/cepera/.cargo/registry/src/github.com-1ecc6299db9ec823/version_check-0.9.4/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off -C overflow-checks=on -C metadata=29e8cd0c9737a1b7 -C extra-filename=-29e8cd0c9737a1b7 --out-dir /tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/deps -L dependency=/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/deps --cap-lints allow`
    error: linking with `cc` failed: exit status: 1
      |
      = note: "cc" "-m64" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/syn-21505b28ff620a5c/build_script_build-21505b28ff620a5c.build_script_build.db0d15af-cgu.0.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/syn-21505b28ff620a5c/build_script_build-21505b28ff620a5c.build_script_build.db0d15af-cgu.1.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/syn-21505b28ff620a5c/build_script_build-21505b28ff620a5c.build_script_build.db0d15af-cgu.10.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/syn-21505b28ff620a5c/build_script_build-21505b28ff620a5c.build_script_build.db0d15af-cgu.11.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/syn-21505b28ff620a5c/build_script_build-21505b28ff620a5c.build_script_build.db0d15af-cgu.12.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/syn-21505b28ff620a5c/build_script_build-21505b28ff620a5c.build_script_build.db0d15af-cgu.13.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/syn-21505b28ff620a5c/build_script_build-21505b28ff620a5c.build_script_build.db0d15af-cgu.14.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/syn-21505b28ff620a5c/build_script_build-21505b28ff620a5c.build_script_build.db0d15af-cgu.15.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/syn-21505b28ff620a5c/build_script_build-21505b28ff620a5c.build_script_build.db0d15af-cgu.2.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/syn-21505b28ff620a5c/build_script_build-21505b28ff620a5c.build_script_build.db0d15af-cgu.3.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/syn-21505b28ff620a5c/build_script_build-21505b28ff620a5c.build_script_build.db0d15af-cgu.4.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/syn-21505b28ff620a5c/build_script_build-21505b28ff620a5c.build_script_build.db0d15af-cgu.5.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/syn-21505b28ff620a5c/build_script_build-21505b28ff620a5c.build_script_build.db0d15af-cgu.6.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/syn-21505b28ff620a5c/build_script_build-21505b28ff620a5c.build_script_build.db0d15af-cgu.7.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/syn-21505b28ff620a5c/build_script_build-21505b28ff620a5c.build_script_build.db0d15af-cgu.8.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/syn-21505b28ff620a5c/build_script_build-21505b28ff620a5c.build_script_build.db0d15af-cgu.9.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/syn-21505b28ff620a5c/build_script_build-21505b28ff620a5c.1jfinw2wyfhmo45e.rcgu.o" "-Wl,--as-needed" "-L" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/deps" "-L" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,--start-group" "-Wl,-Bstatic" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-05b39ac0cb4c5688.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-ccaa149b737d6503.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-a94a6388c153126b.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-1ecfa264246b85c6.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-ee710154a50440b8.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-f09986d873ea8592.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-f3521e20c99619ab.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-df6036c77d75ce21.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-24f91c1a1dfc7e13.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-bffcc61991adb202.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-cf22313353d8663e.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-c45fb100f99430e9.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-0cdc47a8a81950ea.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-f1e158606c4c82f6.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-0b608b5ef4df0ec4.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-b8438dc0bcbbcc08.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-70e2ae036775ff2f.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-815d281f7068a893.rlib" "-Wl,--end-group" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-377835cfab8dae0d.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/syn-21505b28ff620a5c/build_script_build-21505b28ff620a5c" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-nodefaultlibs"
      = note: /usr/bin/ld: /home/serg/crscmpl/imx6bh4/host/usr/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/lib32/../lib/Scrt1.o: Relocations in generic ELF (EM: 40)
              /usr/bin/ld: /home/serg/crscmpl/imx6bh4/host/usr/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/lib32/../lib/Scrt1.o: Relocations in generic ELF (EM: 40)
              /home/serg/crscmpl/imx6bh4/host/usr/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/lib32/../lib/Scrt1.o: error adding symbols: File in wrong format
              collect2: error: ld returned 1 exit status

    error: could not compile `syn` due to previous error

    Caused by:
      process didn't exit successfully: `rustc --crate-name build_script_build --edition=2018 /home/cepera/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.91/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off -C overflow-checks=on --cfg 'feature="clone-impls"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="extra-traits"' --cfg 'feature="full"' --cfg 'feature="parsing"' --cfg 'feature="printing"' --cfg 'feature="proc-macro"' --cfg 'feature="quote"' -C metadata=21505b28ff620a5c -C extra-filename=-21505b28ff620a5c --out-dir /tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/syn-21505b28ff620a5c -L dependency=/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/deps --cap-lints allow` (exit status: 1)
    warning: build failed, waiting for other jobs to finish...
    error: linking with `cc` failed: exit status: 1
      |
      = note: "cc" "-m64" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/proc-macro2-35ff75aff74bf081/build_script_build-35ff75aff74bf081.build_script_build.caf484eb-cgu.0.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/proc-macro2-35ff75aff74bf081/build_script_build-35ff75aff74bf081.build_script_build.caf484eb-cgu.1.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/proc-macro2-35ff75aff74bf081/build_script_build-35ff75aff74bf081.build_script_build.caf484eb-cgu.10.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/proc-macro2-35ff75aff74bf081/build_script_build-35ff75aff74bf081.build_script_build.caf484eb-cgu.11.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/proc-macro2-35ff75aff74bf081/build_script_build-35ff75aff74bf081.build_script_build.caf484eb-cgu.12.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/proc-macro2-35ff75aff74bf081/build_script_build-35ff75aff74bf081.build_script_build.caf484eb-cgu.13.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/proc-macro2-35ff75aff74bf081/build_script_build-35ff75aff74bf081.build_script_build.caf484eb-cgu.14.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/proc-macro2-35ff75aff74bf081/build_script_build-35ff75aff74bf081.build_script_build.caf484eb-cgu.15.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/proc-macro2-35ff75aff74bf081/build_script_build-35ff75aff74bf081.build_script_build.caf484eb-cgu.2.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/proc-macro2-35ff75aff74bf081/build_script_build-35ff75aff74bf081.build_script_build.caf484eb-cgu.3.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/proc-macro2-35ff75aff74bf081/build_script_build-35ff75aff74bf081.build_script_build.caf484eb-cgu.4.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/proc-macro2-35ff75aff74bf081/build_script_build-35ff75aff74bf081.build_script_build.caf484eb-cgu.5.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/proc-macro2-35ff75aff74bf081/build_script_build-35ff75aff74bf081.build_script_build.caf484eb-cgu.6.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/proc-macro2-35ff75aff74bf081/build_script_build-35ff75aff74bf081.build_script_build.caf484eb-cgu.7.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/proc-macro2-35ff75aff74bf081/build_script_build-35ff75aff74bf081.build_script_build.caf484eb-cgu.8.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/proc-macro2-35ff75aff74bf081/build_script_build-35ff75aff74bf081.build_script_build.caf484eb-cgu.9.rcgu.o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/proc-macro2-35ff75aff74bf081/build_script_build-35ff75aff74bf081.285hor1zdzroiwv.rcgu.o" "-Wl,--as-needed" "-L" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/deps" "-L" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,--start-group" "-Wl,-Bstatic" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-05b39ac0cb4c5688.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-ccaa149b737d6503.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-a94a6388c153126b.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-1ecfa264246b85c6.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-ee710154a50440b8.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-f09986d873ea8592.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-f3521e20c99619ab.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-df6036c77d75ce21.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-24f91c1a1dfc7e13.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-bffcc61991adb202.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-cf22313353d8663e.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-c45fb100f99430e9.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-0cdc47a8a81950ea.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-f1e158606c4c82f6.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-0b608b5ef4df0ec4.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-b8438dc0bcbbcc08.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-70e2ae036775ff2f.rlib" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-815d281f7068a893.rlib" "-Wl,--end-group" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-377835cfab8dae0d.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/cepera/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/proc-macro2-35ff75aff74bf081/build_script_build-35ff75aff74bf081" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-nodefaultlibs"
      = note: /usr/bin/ld: /home/serg/crscmpl/imx6bh4/host/usr/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/lib32/../lib/Scrt1.o: Relocations in generic ELF (EM: 40)
              /usr/bin/ld: /home/serg/crscmpl/imx6bh4/host/usr/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/lib32/../lib/Scrt1.o: Relocations in generic ELF (EM: 40)
              /home/serg/crscmpl/imx6bh4/host/usr/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/lib32/../lib/Scrt1.o: error adding symbols: File in wrong format
              collect2: error: ld returned 1 exit status

    error: could not compile `proc-macro2` due to previous error

    Caused by:
      process didn't exit successfully: `rustc --crate-name build_script_build --edition=2018 /home/cepera/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.37/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off -C overflow-checks=on --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=35ff75aff74bf081 -C extra-filename=-35ff75aff74bf081 --out-dir /tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/build/proc-macro2-35ff75aff74bf081 -L dependency=/tmp/pip-install-uw5jp1jq/cryptography/src/rust/target/release/deps --cap-lints allow` (exit status: 1)

        =============================DEBUG ASSISTANCE=============================
        If you are seeing a compilation error please try the following steps to
        successfully install cryptography:
        1) Upgrade to the latest pip and try again. This will fix errors for most
           users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
        2) Read https://cryptography.io/en/latest/installation/ for specific
           instructions for your platform.
        3) Check our frequently asked questions for more information:
           https://cryptography.io/en/latest/faq/
        4) Ensure you have a recent Rust toolchain installed:
           https://cryptography.io/en/latest/installation/#rust

        Python: 3.6.10
        platform: Linux-arm-with
        pip: 18.1
        setuptools: 59.6.0
        setuptools_rust: 1.1.2
        =============================DEBUG ASSISTANCE=============================

    error: cargo failed with code: 101

    ----------------------------------------
Command "/home/cepera/tmp/pybh4/cross_venv/cross/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-uw5jp1jq/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-17latr65/install-record.txt --single-version-externally-managed --compile --install-headers /home/cepera/tmp/pybh4/cross_venv/cross/include/site/python3.6/cryptography" failed with error code 1 in /tmp/pip-install-uw5jp1jq/cryptography/
You are using pip version 18.1, however version 21.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
mosolovsa commented 2 years ago

Upd, looks like that's not the crossenv problem because: cargo rustc --lib --manifest-path src/rust/Cargo.toml --target arm-unknown-linux-gnueabihf --release -v --features pyo3/abi3-py36 pyo3/extension-module -- --crate-type cdylib -C linker=/home/serg/crscmpl/imx6bh4/host/usr/bin/arm-buildroot-linux-gnueabihf-gcc call to cargo (Rust package manager) has args that describing target and linker

I have no idea why during compiling module: Compiling version_check v0.9.4 process calls cc and /usr/bin/ld, maybe it's related to build.rs version_check has no build.rs

Actually syn and version_check module must be compiling for host (e.g. x86_64) but during linking time /usr/bin/ld: /home/serg/crscmpl/imx6bh4/host/usr/bin/../arm-buildroot-linux-gnueabihf/sysroot/usr/lib32/../lib/Scrt1.o: Relocations in generic ELF (EM: 40) ld tries to link it to target c runtime library, I'm not sure wether it because of some envvars setted by crossenv or other crosscompile mechanics.

I've tried to pull cryptography from github and test if it crosscompiles from source with direct cargo invocation cmd as during the crossenv build and it passes the stage of building version_check module.

There must be a reason why host ld tries to link with targer crt and that is happening only during crossenv build on my pc.

I would be gratefull for any help, thanks in advance, I wouldn't take your time any further with comments without being asked to provide any additional info.

Just in case cargo direct invocation log:

 cepera@mosolov ξ‚° ~/tmp/testcargo ξ‚° πŸ™ˆπŸ™ŠπŸ™‰ git clone https://github.com/pyca/cryptography
Cloning into 'cryptography'...
remote: Enumerating objects: 65854, done.
remote: Counting objects: 100% (146/146), done.
remote: Compressing objects: 100% (82/82), done.
remote: Total 65854 (delta 69), reused 119 (delta 60), pack-reused 65708
Receiving objects: 100% (65854/65854), 51.11 MiB | 2.15 MiB/s, done.
Resolving deltas: 100% (45109/45109), done.
 cepera@mosolov ξ‚° ~/tmp/testcargo ξ‚° πŸ™ˆπŸ™ŠπŸ™‰ cd cryptography/src/rust/         
 cepera@mosolov ξ‚° ~/tmp/testcargo/cryptography/src/rust ξ‚° ξ‚  main ξ‚° πŸ™ˆπŸ™ŠπŸ™‰ ls -l
total 20
-rw-rw-r-- 1 cepera cepera 10440 июн 10 10:53 Cargo.lock
-rw-rw-r-- 1 cepera cepera   618 июн 10 10:53 Cargo.toml
drwxrwxr-x 3 cepera cepera  4096 июн 10 10:53 src
 cepera@mosolov ξ‚° ~/tmp/testcargo/cryptography/src/rust ξ‚° ξ‚  main ξ‚° πŸ™ˆπŸ™ŠπŸ™‰ https://github.com/pyca/cryptography
 ✘ cepera@mosolov ξ‚° ~/tmp/testcargo/cryptography/src/rust ξ‚° ξ‚  main ξ‚° πŸ™ˆπŸ™ŠπŸ™‰     cargo rustc --lib --manifest-path src/rust/Cargo.toml --target arm-unknown-linux-gnueabihf --release -v --features pyo3/extension-module pyo3/abi3-py36 -- --crate-type cdylib -C linker=/home/serg/crscmpl/imx6bh4/host/usr/bin/arm-buildroot-linux-gnueabihf-gcc

error: manifest path `src/rust/Cargo.toml` does not exist
 ✘ cepera@mosolov ξ‚° ~/tmp/testcargo/cryptography/src/rust ξ‚° ξ‚  main ξ‚° πŸ™ˆπŸ™ŠπŸ™‰     cargo rustc --lib --target arm-unknown-linux-gnueabihf --release -v --features pyo3/extension-module pyo3/abi3-py36 -- --crate-type cdylib -C linker=/home/serg/crscmpl/imx6bh4/host/usr/bin/arm-buildroot-linux-gnueabihf-gcc 

    Updating crates.io index
  Downloaded once_cell v1.12.0
  Downloaded syn v1.0.96
  Downloaded unindent v0.1.9
  Downloaded num-traits v0.2.15
  Downloaded proc-macro2 v1.0.39
  Downloaded unicode-ident v1.0.0
  Downloaded asn1 v0.9.1
  Downloaded num-integer v0.1.45
  Downloaded asn1_derive v0.9.1
  Downloaded libc v0.2.126
  Downloaded 10 crates (1047.7 KB) in 0.84s
   Compiling proc-macro2 v1.0.39
   Compiling unicode-ident v1.0.0
   Compiling autocfg v1.1.0
   Compiling syn v1.0.96
     Running `rustc --crate-name unicode_ident --edition=2018 /home/cepera/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-ident-1.0.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off -C overflow-checks=on -C metadata=7e83a73caccf29fa -C extra-filename=-7e83a73caccf29fa --out-dir /home/cepera/tmp/testcargo/cryptography/src/rust/target/release/deps -L dependency=/home/cepera/tmp/testcargo/cryptography/src/rust/target/release/deps --cap-lints allow`
     Running `rustc --crate-name autocfg /home/cepera/.cargo/registry/src/github.com-1ecc6299db9ec823/autocfg-1.1.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off -C overflow-checks=on -C metadata=d37872fa5288df29 -C extra-filename=-d37872fa5288df29 --out-dir /home/cepera/tmp/testcargo/cryptography/src/rust/target/release/deps -L dependency=/home/cepera/tmp/testcargo/cryptography/src/rust/target/release/deps --cap-lints allow`
     Running `rustc --crate-name build_script_build --edition=2018 /home/cepera/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.39/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off -C overflow-checks=on --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=cecb894b2bcb1990 -C extra-filename=-cecb894b2bcb1990 --out-dir /home/cepera/tmp/testcargo/cryptography/src/rust/target/release/build/proc-macro2-cecb894b2bcb1990 -L dependency=/home/cepera/tmp/testcargo/cryptography/src/rust/target/release/deps --cap-lints allow`
     Running `rustc --crate-name build_script_build --edition=2018 /home/cepera/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.96/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off -C overflow-checks=on --cfg 'feature="clone-impls"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="extra-traits"' --cfg 'feature="full"' --cfg 'feature="parsing"' --cfg 'feature="printing"' --cfg 'feature="proc-macro"' --cfg 'feature="quote"' -C metadata=f49d0abf1839200a -C extra-filename=-f49d0abf1839200a --out-dir /home/cepera/tmp/testcargo/cryptography/src/rust/target/release/build/syn-f49d0abf1839200a -L dependency=/home/cepera/tmp/testcargo/cryptography/src/rust/target/release/deps --cap-lints allow`
   Compiling version_check v0.9.4
     Running `rustc --crate-name version_check /home/cepera/.cargo/registry/src/github.com-1ecc6299db9ec823/version_check-0.9.4/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off -C overflow-checks=on -C metadata=29e8cd0c9737a1b7 -C extra-filename=-29e8cd0c9737a1b7 --out-dir /home/cepera/tmp/testcargo/cryptography/src/rust/target/release/deps -L dependency=/home/cepera/tmp/testcargo/cryptography/src/rust/target/release/deps --cap-lints allow`
   Compiling proc-macro-hack v0.5.19
     Running `rustc --crate-name build_script_build --edition=2018 /home/cepera/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro-hack-0.5.19/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off -C overflow-checks=on -C metadata=472a3177141a9a01 -C extra-filename=-472a3177141a9a01 --out-dir /home/cepera/tmp/testcargo/cryptography/src/rust/target/release/build/proc-macro-hack-472a3177141a9a01 -L dependency=/home/cepera/tmp/testcargo/cryptography/src/rust/target/release/deps --cap-lints allow`

sysconfig:

(cross)  ✘ cepera@mosolov ξ‚° ~/newhope ξ‚° πŸ™ˆπŸ™ŠπŸ™‰ python -m sysconfig
Platform: "linux-arm"
Python version: "3.6"
Current installation scheme: "posix_prefix"

Paths: 
    data = "/home/cepera/newhope/cross_venv/cross"
    include = "/home/cepera/remote/target-utils/python/bh4/python/include/python3.6m"
    platinclude = "/home/cepera/remote/target-utils/python/bh4/python/include/python3.6m"
    platlib = "/home/cepera/newhope/cross_venv/cross/lib/python3.6/site-packages"
    platstdlib = "/home/cepera/newhope/cross_venv/cross/lib/python3.6"
    purelib = "/home/cepera/newhope/cross_venv/cross/lib/python3.6/site-packages"
    scripts = "/home/cepera/newhope/cross_venv/cross/bin"
    stdlib = "/home/cepera/remote/target-utils/python/bh4/python/lib/python3.6"

Variables: 
    ABIFLAGS = "m"
    AC_APPLE_UNIVERSAL_BUILD = "0"
    AIX_GENUINE_CPLUSPLUS = "0"
    ANDROID_API_LEVEL = "0"
    AR = "/home/serg/crscmpl/imx6bh4/host/usr/bin/arm-buildroot-linux-gnueabihf-ar"
    ARFLAGS = "rcs"
    BASECFLAGS = "-Wno-unused-result -Wsign-compare"
    BASECPPFLAGS = ""
    BASEMODLIBS = ""
    BINDIR = "/var/bacs/data/python/bin"
    BINLIBDEST = "/var/bacs/data/python/lib/python3.6"
    BLDLIBRARY = "-L. -lpython3.6m"
    BLDSHARED = "/home/serg/crscmpl/imx6bh4/host/usr/bin/arm-buildroot-linux-gnueabihf-gcc -shared -lssl -lcrypto -L/home/serg/osslbh4/lib -Wl,-rpath,/var/bacs/data/python/lib -lssl -lcrypto -L/home/serg/osslbh4/lib -Wl,-rpath,/var/bacs/data/python/lib"
    BUILDEXE = ""
    BUILDPYTHON = "python"
    BUILD_GNU_TYPE = "x86_64-pc-linux-gnu"
    BYTESTR_DEPS = "\"
    CC = "/home/serg/crscmpl/imx6bh4/host/usr/bin/arm-buildroot-linux-gnueabihf-gcc"
    CCSHARED = "-fPIC"
    CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/home/serg/osslbh4/include -Wl,-rpath,/var/bacs/data/python/lib -I/home/serg/osslbh4/include -Wl,-rpath,/var/bacs/data/python/lib"
    CFLAGSFORSHARED = "-fPIC"
    CFLAGS_ALIASING = ""
    CFLAGS_NODIST = ""
    CONFIGFILES = "configure configure.ac acconfig.h pyconfig.h.in Makefile.pre.in"
    CONFIGURE_CFLAGS = "-I/home/serg/osslbh4/include -Wl,-rpath,/var/bacs/data/python/lib"
    CONFIGURE_CFLAGS_NODIST = "-std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers"
    CONFIGURE_CPPFLAGS = "-I/home/serg/osslbh4/include -Wl,-rpath,/var/bacs/data/python/lib"
    CONFIGURE_LDFLAGS = "-lssl -lcrypto -L/home/serg/osslbh4/lib -Wl,-rpath,/var/bacs/data/python/lib"
    CONFIGURE_LDFLAGS_NODIST = ""
    CONFIG_ARGS = "'--host=arm-linux-gnueabihf' '--target=arm-linux-gnueabihf' '--build=x86_64-linux-gnu' '--prefix=/var/bacs/data/python' '--disable-ipv6' '--enable-shared' 'build_alias=x86_64-linux-gnu' 'host_alias=arm-linux-gnueabihf' 'target_alias=arm-linux-gnueabihf' 'CC=/home/serg/crscmpl/imx6bh4/host/usr/bin/arm-buildroot-linux-gnueabihf-gcc' 'CFLAGS=-I/home/serg/osslbh4/include -Wl,-rpath,/var/bacs/data/python/lib' 'LDFLAGS=-lssl -lcrypto -L/home/serg/osslbh4/lib -Wl,-rpath,/var/bacs/data/python/lib' 'CPPFLAGS=-I/home/serg/osslbh4/include -Wl,-rpath,/var/bacs/data/python/lib'"
    CONFINCLUDEDIR = "/var/bacs/data/python/include"
    CONFINCLUDEPY = "/var/bacs/data/python/include/python3.6m"
    COREPYTHONPATH = ":"
    COVERAGE_INFO = "/home/serg/autotools/pycrs4/coverage.info"
    COVERAGE_REPORT = "/home/serg/autotools/pycrs4/lcov-report"
    COVERAGE_REPORT_OPTIONS = "--no-branch-coverage --title "CPython lcov report""
    CPPFLAGS = "-I. -I./Include -I/home/serg/osslbh4/include -Wl,-rpath,/var/bacs/data/python/lib -I/home/serg/osslbh4/include -Wl,-rpath,/var/bacs/data/python/lib"
    CXX = "/home/serg/crscmpl/imx6bh4/host/usr/bin/arm-buildroot-linux-gnueabihf-g++"
    DESTDIRS = "/var/bacs/data/python /var/bacs/data/python/lib /var/bacs/data/python/lib/python3.6 /var/bacs/data/python/lib/python3.6/lib-dynload"
    DESTLIB = "/var/bacs/data/python/lib/python3.6"
    DESTPATH = ""
    DESTSHARED = "/var/bacs/data/python/lib/python3.6/lib-dynload"
    DFLAGS = ""
    DIRMODE = "755"
    DIST = "README ChangeLog configure configure.ac acconfig.h pyconfig.h.in Makefile.pre.in Include Lib Misc Ext-dummy"
    DISTDIRS = "Include Lib Misc Ext-dummy"
    DISTFILES = "README ChangeLog configure configure.ac acconfig.h pyconfig.h.in Makefile.pre.in"
    DLINCLDIR = "."
    DLLLIBRARY = ""
    DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 = "0"
    DOUBLE_IS_BIG_ENDIAN_IEEE754 = "0"
    DOUBLE_IS_LITTLE_ENDIAN_IEEE754 = "0"
    DTRACE = ""
    DTRACE_DEPS = "\"
    DTRACE_HEADERS = ""
    DTRACE_OBJS = ""
    DYNLOADFILE = "dynload_shlib.o"
    ENABLE_IPV6 = "0"
    ENSUREPIP = "upgrade"
    EXE = ""
    EXEMODE = "755"
    EXTRAMACHDEPPATH = ""
    EXTRATESTOPTS = ""
    EXTRA_CFLAGS = ""
    EXT_SUFFIX = ".cpython-36m-arm-linux-gnueabihf.so"
    FILEMODE = "644"
    FLOCK_NEEDS_LIBBSD = "0"
    GETPGRP_HAVE_ARG = "0"
    GETTIMEOFDAY_NO_TZ = "0"
    GITBRANCH = ""
    GITTAG = ""
    GITVERSION = ""
    GNULD = "yes"
    HAVE_ACCEPT4 = "1"
    HAVE_ACOSH = "1"
    HAVE_ADDRINFO = "1"
    HAVE_ALARM = "1"
    HAVE_ALIGNED_REQUIRED = "1"
    HAVE_ALLOCA_H = "1"
    HAVE_ALTZONE = "0"
    HAVE_ASINH = "1"
    HAVE_ASM_TYPES_H = "1"
    HAVE_ATANH = "1"
    HAVE_BIND_TEXTDOMAIN_CODESET = "1"
    HAVE_BLUETOOTH_BLUETOOTH_H = "0"
    HAVE_BLUETOOTH_H = "0"
    HAVE_BROKEN_MBSTOWCS = "0"
    HAVE_BROKEN_NICE = "0"
    HAVE_BROKEN_PIPE_BUF = "0"
    HAVE_BROKEN_POLL = "0"
    HAVE_BROKEN_POSIX_SEMAPHORES = "0"
    HAVE_BROKEN_PTHREAD_SIGMASK = "0"
    HAVE_BROKEN_SEM_GETVALUE = "1"
    HAVE_BROKEN_UNSETENV = "0"
    HAVE_BUILTIN_ATOMIC = "1"
    HAVE_CHFLAGS = "0"
    HAVE_CHOWN = "1"
    HAVE_CHROOT = "1"
    HAVE_CLOCK = "1"
    HAVE_CLOCK_GETRES = "1"
    HAVE_CLOCK_GETTIME = "1"
    HAVE_CLOCK_SETTIME = "1"
    HAVE_COMPUTED_GOTOS = "0"
    HAVE_CONFSTR = "1"
    HAVE_CONIO_H = "0"
    HAVE_COPYSIGN = "1"
    HAVE_CRYPT_H = "1"
    HAVE_CTERMID = "1"
    HAVE_CTERMID_R = "0"
    HAVE_CURSES_FILTER = "1"
    HAVE_CURSES_H = "1"
    HAVE_CURSES_HAS_KEY = "1"
    HAVE_CURSES_IMMEDOK = "1"
    HAVE_CURSES_IS_PAD = "1"
    HAVE_CURSES_IS_TERM_RESIZED = "1"
    HAVE_CURSES_RESIZETERM = "1"
    HAVE_CURSES_RESIZE_TERM = "1"
    HAVE_CURSES_SYNCOK = "1"
    HAVE_CURSES_TYPEAHEAD = "1"
    HAVE_CURSES_USE_ENV = "1"
    HAVE_CURSES_WCHGAT = "1"
    HAVE_DECL_ISFINITE = "1"
    HAVE_DECL_ISINF = "1"
    HAVE_DECL_ISNAN = "1"
    HAVE_DECL_RTLD_DEEPBIND = "1"
    HAVE_DECL_RTLD_GLOBAL = "1"
    HAVE_DECL_RTLD_LAZY = "1"
    HAVE_DECL_RTLD_LOCAL = "1"
    HAVE_DECL_RTLD_NODELETE = "1"
    HAVE_DECL_RTLD_NOLOAD = "1"
    HAVE_DECL_RTLD_NOW = "1"
    HAVE_DECL_TZNAME = "0"
    HAVE_DEVICE_MACROS = "1"
    HAVE_DEV_PTC = "0"
    HAVE_DEV_PTMX = "0"
    HAVE_DIRECT_H = "0"
    HAVE_DIRENT_D_TYPE = "1"
    HAVE_DIRENT_H = "1"
    HAVE_DIRFD = "1"
    HAVE_DLFCN_H = "1"
    HAVE_DLOPEN = "1"
    HAVE_DUP2 = "1"
    HAVE_DUP3 = "1"
    HAVE_DYNAMIC_LOADING = "1"
    HAVE_ENDIAN_H = "1"
    HAVE_EPOLL = "1"
    HAVE_EPOLL_CREATE1 = "1"
    HAVE_ERF = "1"
    HAVE_ERFC = "1"
    HAVE_ERRNO_H = "1"
    HAVE_EXECV = "1"
    HAVE_EXPM1 = "1"
    HAVE_FACCESSAT = "1"
    HAVE_FCHDIR = "1"
    HAVE_FCHMOD = "1"
    HAVE_FCHMODAT = "1"
    HAVE_FCHOWN = "1"
    HAVE_FCHOWNAT = "1"
    HAVE_FCNTL_H = "1"
    HAVE_FDATASYNC = "1"
    HAVE_FDOPENDIR = "1"
    HAVE_FEXECVE = "1"
    HAVE_FINITE = "1"
    HAVE_FLOCK = "1"
    HAVE_FORK = "1"
    HAVE_FORKPTY = "1"
    HAVE_FPATHCONF = "1"
    HAVE_FSEEK64 = "0"
    HAVE_FSEEKO = "1"
    HAVE_FSTATAT = "1"
    HAVE_FSTATVFS = "1"
    HAVE_FSYNC = "1"
    HAVE_FTELL64 = "0"
    HAVE_FTELLO = "1"
    HAVE_FTIME = "1"
    HAVE_FTRUNCATE = "1"
    HAVE_FUTIMENS = "1"
    HAVE_FUTIMES = "1"
    HAVE_FUTIMESAT = "1"
    HAVE_GAI_STRERROR = "1"
    HAVE_GAMMA = "1"
    HAVE_GCC_ASM_FOR_MC68881 = "0"
    HAVE_GCC_ASM_FOR_X64 = "0"
    HAVE_GCC_ASM_FOR_X87 = "0"
    HAVE_GCC_UINT128_T = "0"
    HAVE_GETADDRINFO = "1"
    HAVE_GETC_UNLOCKED = "1"
    HAVE_GETENTROPY = "0"
    HAVE_GETGROUPLIST = "1"
    HAVE_GETGROUPS = "1"
    HAVE_GETHOSTBYNAME = "0"
    HAVE_GETHOSTBYNAME_R = "1"
    HAVE_GETHOSTBYNAME_R_3_ARG = "0"
    HAVE_GETHOSTBYNAME_R_5_ARG = "0"
    HAVE_GETHOSTBYNAME_R_6_ARG = "1"
    HAVE_GETITIMER = "1"
    HAVE_GETLOADAVG = "1"
    HAVE_GETLOGIN = "1"
    HAVE_GETNAMEINFO = "1"
    HAVE_GETPAGESIZE = "1"
    HAVE_GETPEERNAME = "1"
    HAVE_GETPGID = "1"
    HAVE_GETPGRP = "1"
    HAVE_GETPID = "1"
    HAVE_GETPRIORITY = "1"
    HAVE_GETPWENT = "1"
    HAVE_GETRANDOM = "0"
    HAVE_GETRANDOM_SYSCALL = "0"
    HAVE_GETRESGID = "1"
    HAVE_GETRESUID = "1"
    HAVE_GETSID = "1"
    HAVE_GETSPENT = "1"
    HAVE_GETSPNAM = "1"
    HAVE_GETTIMEOFDAY = "1"
    HAVE_GETWD = "1"
    HAVE_GLIBC_MEMMOVE_BUG = "0"
    HAVE_GRP_H = "1"
    HAVE_HSTRERROR = "1"
    HAVE_HTOLE64 = "1"
    HAVE_HYPOT = "1"
    HAVE_IEEEFP_H = "0"
    HAVE_IF_NAMEINDEX = "1"
    HAVE_INET_ATON = "1"
    HAVE_INET_PTON = "1"
    HAVE_INITGROUPS = "1"
    HAVE_INTTYPES_H = "1"
    HAVE_IO_H = "0"
    HAVE_IPA_PURE_CONST_BUG = "0"
    HAVE_KILL = "1"
    HAVE_KILLPG = "1"
    HAVE_KQUEUE = "0"
    HAVE_LANGINFO_H = "1"
    HAVE_LARGEFILE_SUPPORT = "1"
    HAVE_LCHFLAGS = "0"
    HAVE_LCHMOD = "0"
    HAVE_LCHOWN = "1"
    HAVE_LGAMMA = "1"
    HAVE_LIBDL = "1"
    HAVE_LIBDLD = "0"
    HAVE_LIBIEEE = "0"
    HAVE_LIBINTL_H = "1"
    HAVE_LIBREADLINE = "1"
    HAVE_LIBRESOLV = "0"
    HAVE_LIBSENDFILE = "0"
    HAVE_LIBUTIL_H = "0"
    HAVE_LINK = "1"
    HAVE_LINKAT = "1"
    HAVE_LINUX_CAN_BCM_H = "1"
    HAVE_LINUX_CAN_H = "1"
    HAVE_LINUX_CAN_RAW_FD_FRAMES = "1"
    HAVE_LINUX_CAN_RAW_H = "1"
    HAVE_LINUX_NETLINK_H = "1"
    HAVE_LINUX_RANDOM_H = "1"
    HAVE_LINUX_TIPC_H = "1"
    HAVE_LOCKF = "1"
    HAVE_LOG1P = "1"
    HAVE_LOG2 = "1"
    HAVE_LONG_DOUBLE = "1"
    HAVE_LSTAT = "1"
    HAVE_LUTIMES = "1"
    HAVE_MAKEDEV = "1"
    HAVE_MBRTOWC = "1"
    HAVE_MEMMOVE = "1"
    HAVE_MEMORY_H = "1"
    HAVE_MEMRCHR = "1"
    HAVE_MKDIRAT = "1"
    HAVE_MKFIFO = "1"
    HAVE_MKFIFOAT = "1"
    HAVE_MKNOD = "1"
    HAVE_MKNODAT = "1"
    HAVE_MKTIME = "1"
    HAVE_MMAP = "1"
    HAVE_MREMAP = "1"
    HAVE_NCURSES_H = "1"
    HAVE_NDIR_H = "0"
    HAVE_NETPACKET_PACKET_H = "1"
    HAVE_NET_IF_H = "1"
    HAVE_NICE = "1"
    HAVE_OPENAT = "1"
    HAVE_OPENPTY = "1"
    HAVE_PATHCONF = "1"
    HAVE_PAUSE = "1"
    HAVE_PIPE2 = "1"
    HAVE_PLOCK = "0"
    HAVE_POLL = "1"
    HAVE_POLL_H = "1"
    HAVE_POSIX_FADVISE = "1"
    HAVE_POSIX_FALLOCATE = "1"
    HAVE_PREAD = "1"
    HAVE_PRLIMIT = "1"
    HAVE_PROCESS_H = "0"
    HAVE_PROTOTYPES = "1"
    HAVE_PTHREAD_ATFORK = "1"
    HAVE_PTHREAD_DESTRUCTOR = "0"
    HAVE_PTHREAD_H = "1"
    HAVE_PTHREAD_INIT = "0"
    HAVE_PTHREAD_KILL = "1"
    HAVE_PTHREAD_SIGMASK = "1"
    HAVE_PTY_H = "1"
    HAVE_PUTENV = "1"
    HAVE_PWRITE = "1"
    HAVE_READLINK = "1"
    HAVE_READLINKAT = "1"
    HAVE_READV = "1"
    HAVE_REALPATH = "1"
    HAVE_RENAMEAT = "1"
    HAVE_RL_APPEND_HISTORY = "1"
    HAVE_RL_CALLBACK = "1"
    HAVE_RL_CATCH_SIGNAL = "1"
    HAVE_RL_COMPLETION_APPEND_CHARACTER = "1"
    HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK = "1"
    HAVE_RL_COMPLETION_MATCHES = "1"
    HAVE_RL_COMPLETION_SUPPRESS_APPEND = "1"
    HAVE_RL_PRE_INPUT_HOOK = "1"
    HAVE_RL_RESIZE_TERMINAL = "1"
    HAVE_ROUND = "1"
    HAVE_SCHED_GET_PRIORITY_MAX = "1"
    HAVE_SCHED_H = "1"
    HAVE_SCHED_RR_GET_INTERVAL = "1"
    HAVE_SCHED_SETAFFINITY = "1"
    HAVE_SCHED_SETPARAM = "1"
    HAVE_SCHED_SETSCHEDULER = "1"
    HAVE_SELECT = "1"
    HAVE_SEM_GETVALUE = "1"
    HAVE_SEM_OPEN = "1"
    HAVE_SEM_TIMEDWAIT = "1"
    HAVE_SEM_UNLINK = "1"
    HAVE_SENDFILE = "1"
    HAVE_SETEGID = "1"
    HAVE_SETEUID = "1"
    HAVE_SETGID = "1"
    HAVE_SETGROUPS = "1"
    HAVE_SETHOSTNAME = "1"
    HAVE_SETITIMER = "1"
    HAVE_SETLOCALE = "1"
    HAVE_SETPGID = "1"
    HAVE_SETPGRP = "1"
    HAVE_SETPRIORITY = "1"
    HAVE_SETREGID = "1"
    HAVE_SETRESGID = "1"
    HAVE_SETRESUID = "1"
    HAVE_SETREUID = "1"
    HAVE_SETSID = "1"
    HAVE_SETUID = "1"
    HAVE_SETVBUF = "1"
    HAVE_SHADOW_H = "1"
    HAVE_SIGACTION = "1"
    HAVE_SIGALTSTACK = "1"
    HAVE_SIGINTERRUPT = "1"
    HAVE_SIGNAL_H = "1"
    HAVE_SIGPENDING = "1"
    HAVE_SIGRELSE = "1"
    HAVE_SIGTIMEDWAIT = "1"
    HAVE_SIGWAIT = "1"
    HAVE_SIGWAITINFO = "1"
    HAVE_SNPRINTF = "1"
    HAVE_SOCKADDR_ALG = "1"
    HAVE_SOCKADDR_SA_LEN = "0"
    HAVE_SOCKADDR_STORAGE = "1"
    HAVE_SOCKETPAIR = "1"
    HAVE_SPAWN_H = "1"
    HAVE_SSIZE_T = "1"
    HAVE_STATVFS = "1"
    HAVE_STAT_TV_NSEC = "1"
    HAVE_STAT_TV_NSEC2 = "0"
    HAVE_STDARG_PROTOTYPES = "1"
    HAVE_STDINT_H = "1"
    HAVE_STDLIB_H = "1"
    HAVE_STD_ATOMIC = "0"
    HAVE_STRDUP = "1"
    HAVE_STRFTIME = "1"
    HAVE_STRINGS_H = "1"
    HAVE_STRING_H = "1"
    HAVE_STRLCPY = "0"
    HAVE_STROPTS_H = "1"
    HAVE_STRUCT_PASSWD_PW_GECOS = "1"
    HAVE_STRUCT_PASSWD_PW_PASSWD = "1"
    HAVE_STRUCT_STAT_ST_BIRTHTIME = "0"
    HAVE_STRUCT_STAT_ST_BLKSIZE = "1"
    HAVE_STRUCT_STAT_ST_BLOCKS = "1"
    HAVE_STRUCT_STAT_ST_FLAGS = "0"
    HAVE_STRUCT_STAT_ST_GEN = "0"
    HAVE_STRUCT_STAT_ST_RDEV = "1"
    HAVE_STRUCT_TM_TM_ZONE = "1"
    HAVE_SYMLINK = "1"
    HAVE_SYMLINKAT = "1"
    HAVE_SYNC = "1"
    HAVE_SYSCONF = "1"
    HAVE_SYSEXITS_H = "1"
    HAVE_SYS_AUDIOIO_H = "0"
    HAVE_SYS_BSDTTY_H = "0"
    HAVE_SYS_DEVPOLL_H = "0"
    HAVE_SYS_DIR_H = "0"
    HAVE_SYS_ENDIAN_H = "0"
    HAVE_SYS_EPOLL_H = "1"
    HAVE_SYS_EVENT_H = "0"
    HAVE_SYS_FILE_H = "1"
    HAVE_SYS_IOCTL_H = "1"
    HAVE_SYS_KERN_CONTROL_H = "0"
    HAVE_SYS_LOADAVG_H = "0"
    HAVE_SYS_LOCK_H = "0"
    HAVE_SYS_MKDEV_H = "0"
    HAVE_SYS_MODEM_H = "0"
    HAVE_SYS_NDIR_H = "0"
    HAVE_SYS_PARAM_H = "1"
    HAVE_SYS_POLL_H = "1"
    HAVE_SYS_RANDOM_H = "0"
    HAVE_SYS_RESOURCE_H = "1"
    HAVE_SYS_SELECT_H = "1"
    HAVE_SYS_SENDFILE_H = "1"
    HAVE_SYS_SOCKET_H = "1"
    HAVE_SYS_STATVFS_H = "1"
    HAVE_SYS_STAT_H = "1"
    HAVE_SYS_SYSCALL_H = "1"
    HAVE_SYS_SYSMACROS_H = "1"
    HAVE_SYS_SYS_DOMAIN_H = "0"
    HAVE_SYS_TERMIO_H = "0"
    HAVE_SYS_TIMES_H = "1"
    HAVE_SYS_TIME_H = "1"
    HAVE_SYS_TYPES_H = "1"
    HAVE_SYS_UIO_H = "1"
    HAVE_SYS_UN_H = "1"
    HAVE_SYS_UTSNAME_H = "1"
    HAVE_SYS_WAIT_H = "1"
    HAVE_SYS_XATTR_H = "1"
    HAVE_TCGETPGRP = "1"
    HAVE_TCSETPGRP = "1"
    HAVE_TEMPNAM = "1"
    HAVE_TERMIOS_H = "1"
    HAVE_TERM_H = "1"
    HAVE_TGAMMA = "1"
    HAVE_TIMEGM = "1"
    HAVE_TIMES = "1"
    HAVE_TMPFILE = "1"
    HAVE_TMPNAM = "1"
    HAVE_TMPNAM_R = "1"
    HAVE_TM_ZONE = "1"
    HAVE_TRUNCATE = "1"
    HAVE_TZNAME = "0"
    HAVE_UCS4_TCL = "0"
    HAVE_UNAME = "1"
    HAVE_UNISTD_H = "1"
    HAVE_UNLINKAT = "1"
    HAVE_UNSETENV = "1"
    HAVE_USABLE_WCHAR_T = "0"
    HAVE_UTIL_H = "0"
    HAVE_UTIMENSAT = "1"
    HAVE_UTIMES = "1"
    HAVE_UTIME_H = "1"
    HAVE_WAIT3 = "1"
    HAVE_WAIT4 = "1"
    HAVE_WAITID = "1"
    HAVE_WAITPID = "1"
    HAVE_WCHAR_H = "1"
    HAVE_WCSCOLL = "1"
    HAVE_WCSFTIME = "1"
    HAVE_WCSXFRM = "1"
    HAVE_WMEMCMP = "1"
    HAVE_WORKING_TZSET = "0"
    HAVE_WRITEV = "1"
    HAVE_ZLIB_COPY = "1"
    HAVE__GETPTY = "0"
    HOST_GNU_TYPE = "arm-unknown-linux-gnueabihf"
    INCLDIRSTOMAKE = "/var/bacs/data/python/include /var/bacs/data/python/include /var/bacs/data/python/include/python3.6m /var/bacs/data/python/include/python3.6m"
    INCLUDEDIR = "/var/bacs/data/python/include"
    INCLUDEPY = "/var/bacs/data/python/include/python3.6m"
    INSTALL = "/usr/bin/install -c"
    INSTALL_DATA = "/usr/bin/install -c -m 644"
    INSTALL_PROGRAM = "/usr/bin/install -c"
    INSTALL_SCRIPT = "/usr/bin/install -c"
    INSTALL_SHARED = "/usr/bin/install -c -m 555"
    INSTSONAME = "libpython3.6m.so.1.0"
    IO_H = "Modules/_io/_iomodule.h"
    IO_OBJS = "\"
    LDCXXSHARED = "/home/serg/crscmpl/imx6bh4/host/usr/bin/arm-buildroot-linux-gnueabihf-g++ -shared"
    LDFLAGS = "-lssl -lcrypto -L/home/serg/osslbh4/lib -Wl,-rpath,/var/bacs/data/python/lib -lssl -lcrypto -L/home/serg/osslbh4/lib -Wl,-rpath,/var/bacs/data/python/lib"
    LDFLAGS_NODIST = ""
    LDLAST = ""
    LDLIBRARY = "libpython3.6m.so"
    LDLIBRARYDIR = ""
    LDSHARED = "/home/serg/crscmpl/imx6bh4/host/usr/bin/arm-buildroot-linux-gnueabihf-gcc -shared -lssl -lcrypto -L/home/serg/osslbh4/lib -Wl,-rpath,/var/bacs/data/python/lib -lssl -lcrypto -L/home/serg/osslbh4/lib -Wl,-rpath,/var/bacs/data/python/lib"
    LDVERSION = "3.6m"
    LIBC = ""
    LIBDEST = "/var/bacs/data/python/lib/python3.6"
    LIBDIR = "/var/bacs/data/python/lib"
    LIBFFI_INCLUDEDIR = ""
    LIBM = "-lm"
    LIBOBJDIR = "Python/"
    LIBOBJS = ""
    LIBPC = "/var/bacs/data/python/lib/pkgconfig"
    LIBPL = "/var/bacs/data/python/lib/python3.6/config-3.6m-arm-linux-gnueabihf"
    LIBRARY = "libpython3.6m.a"
    LIBRARY_OBJS = "\"
    LIBRARY_OBJS_OMIT_FROZEN = "\"
    LIBS = "-lpthread -ldl  -lpthread -lutil"
    LIBSUBDIRS = "tkinter tkinter/test tkinter/test/test_tkinter \"
    LINKCC = "/home/serg/crscmpl/imx6bh4/host/usr/bin/arm-buildroot-linux-gnueabihf-gcc"
    LINKFORSHARED = "-Xlinker -export-dynamic"
    LIPO_32BIT_FLAGS = ""
    LLVM_PROF_ERR = "no"
    LLVM_PROF_FILE = ""
    LLVM_PROF_MERGER = "true"
    LN = "ln"
    LOCALMODLIBS = ""
    LOG1P_DROPS_ZERO_SIGN = "0"
    MACHDEP = "linux"
    MACHDEPPATH = ":"
    MACHDEP_OBJS = ""
    MACHDESTLIB = "/var/bacs/data/python/lib/python3.6"
    MACOSX_DEPLOYMENT_TARGET = ""
    MAINCC = "/home/serg/crscmpl/imx6bh4/host/usr/bin/arm-buildroot-linux-gnueabihf-gcc"
    MAJOR_IN_MKDEV = "0"
    MAJOR_IN_SYSMACROS = "0"
    MAKESETUP = "./Modules/makesetup"
    MANDIR = "/var/bacs/data/python/share/man"
    MKDIR_P = "/bin/mkdir -p"
    MODLIBS = ""
    MODNAMES = "_thread posix errno pwd _sre _codecs _weakref _functools _operator _collections itertools atexit _signal _stat time _locale _io zipimport faulthandler _tracemalloc _symtable xxsubtype"
    MODOBJS = "Modules/_threadmodule.o  Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  Modules/_sre.o  Modules/_codecsmodule.o  Modules/_weakref.o  Modules/_functoolsmodule.o  Modules/_operator.o  Modules/_collectionsmodule.o  Modules/itertoolsmodule.o  Modules/atexitmodule.o  Modules/signalmodule.o  Modules/_stat.o  Modules/timemodule.o  Modules/_localemodule.o  Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o  Modules/zipimport.o  Modules/faulthandler.o  Modules/_tracemalloc.o Modules/hashtable.o  Modules/symtablemodule.o  Modules/xxsubtype.o"
    MODULE_OBJS = "\"
    MULTIARCH = "arm-linux-gnueabihf"
    MULTIARCH_CPPFLAGS = "-DMULTIARCH=\"arm-linux-gnueabihf\""
    MVWDELCH_IS_EXPRESSION = "1"
    NO_AS_NEEDED = "-Wl,--no-as-needed"
    OBJECT_OBJS = "\"
    OPT = "-DNDEBUG -g -fwrapv -O3 -Wall"
    OTHER_LIBTOOL_OPT = ""
    PACKAGE_BUGREPORT = "0"
    PACKAGE_NAME = "0"
    PACKAGE_STRING = "0"
    PACKAGE_TARNAME = "0"
    PACKAGE_URL = "0"
    PACKAGE_VERSION = "0"
    PARSER_HEADERS = "\"
    PARSER_OBJS = "\ Parser/myreadline.o Parser/parsetok.o Parser/tokenizer.o"
    PGEN = "Parser/pgen"
    PGENOBJS = "\ \"
    PGOBJS = "\"
    PGO_PROF_GEN_FLAG = "-fprofile-generate"
    PGO_PROF_USE_FLAG = "-fprofile-use -fprofile-correction"
    PLATDIR = ""
    POBJS = "\"
    POSIX_SEMAPHORES_NOT_ENABLED = "0"
    PROFILE_TASK = "-m test.regrtest --pgo"
    PTHREAD_SYSTEM_SCHED_SUPPORTED = "0"
    PURIFY = ""
    PY3LIBRARY = "libpython3.so"
    PYLONG_BITS_IN_DIGIT = "0"
    PYTHON = "python"
    PYTHONFRAMEWORK = ""
    PYTHONFRAMEWORKDIR = "no-framework"
    PYTHONFRAMEWORKINSTALLDIR = ""
    PYTHONFRAMEWORKPREFIX = ""
    PYTHONPATH = ":"
    PYTHON_FOR_BUILD = "_PYTHON_PROJECT_BASE=/home/serg/autotools/pycrs4 _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo /home/serg/autotools/pycrs4/`cat pybuilddir.txt`:)./Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_m_linux_arm-linux-gnueabihf python3.6"
    PYTHON_FOR_REGEN = "python3.6"
    PYTHON_HEADERS = "\"
    PYTHON_OBJS = "\"
    PY_CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/home/serg/osslbh4/include -Wl,-rpath,/var/bacs/data/python/lib -I/home/serg/osslbh4/include -Wl,-rpath,/var/bacs/data/python/lib"
    PY_CFLAGS_NODIST = "-std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers"
    PY_CORE_CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/home/serg/osslbh4/include -Wl,-rpath,/var/bacs/data/python/lib -I/home/serg/osslbh4/include -Wl,-rpath,/var/bacs/data/python/lib -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -I. -I./Include -I/home/serg/osslbh4/include -Wl,-rpath,/var/bacs/data/python/lib -I/home/serg/osslbh4/include -Wl,-rpath,/var/bacs/data/python/lib -fPIC -DPy_BUILD_CORE"
    PY_CORE_LDFLAGS = "-lssl -lcrypto -L/home/serg/osslbh4/lib -Wl,-rpath,/var/bacs/data/python/lib -lssl -lcrypto -L/home/serg/osslbh4/lib -Wl,-rpath,/var/bacs/data/python/lib"
    PY_CPPFLAGS = "-I. -I./Include -I/home/serg/osslbh4/include -Wl,-rpath,/var/bacs/data/python/lib -I/home/serg/osslbh4/include -Wl,-rpath,/var/bacs/data/python/lib"
    PY_FORMAT_SIZE_T = ""z""
    PY_LDFLAGS = "-lssl -lcrypto -L/home/serg/osslbh4/lib -Wl,-rpath,/var/bacs/data/python/lib -lssl -lcrypto -L/home/serg/osslbh4/lib -Wl,-rpath,/var/bacs/data/python/lib"
    PY_LDFLAGS_NODIST = ""
    Py_DEBUG = "0"
    Py_ENABLE_SHARED = "1"
    Py_HASH_ALGORITHM = "0"
    QUICKTESTOPTS = "-x test_subprocess test_io test_lib2to3 \"
    READELF = "/home/serg/crscmpl/imx6bh4/host/usr/bin/arm-buildroot-linux-gnueabihf-readelf"
    RESSRCDIR = "Mac/Resources/framework"
    RETSIGTYPE = "void"
    RUNSHARED = ""
    SCRIPTDIR = "/var/bacs/data/python/lib"
    SETPGRP_HAVE_ARG = "0"
    SGI_ABI = ""
    SHELL = "/bin/sh"
    SHLIBS = "-lpthread -ldl  -lpthread -lutil"
    SHLIB_SUFFIX = ".so"
    SIGNED_RIGHT_SHIFT_ZERO_FILLS = "0"
    SITEPATH = ""
    SIZEOF_DOUBLE = "8"
    SIZEOF_FLOAT = "4"
    SIZEOF_FPOS_T = "16"
    SIZEOF_INT = "4"
    SIZEOF_LONG = "4"
    SIZEOF_LONG_DOUBLE = "8"
    SIZEOF_LONG_LONG = "8"
    SIZEOF_OFF_T = "8"
    SIZEOF_PID_T = "4"
    SIZEOF_PTHREAD_T = "4"
    SIZEOF_SHORT = "2"
    SIZEOF_SIZE_T = "4"
    SIZEOF_TIME_T = "4"
    SIZEOF_UINTPTR_T = "4"
    SIZEOF_VOID_P = "4"
    SIZEOF_WCHAR_T = "4"
    SIZEOF__BOOL = "1"
    SO = ".cpython-36m-arm-linux-gnueabihf.so"
    SOABI = "cpython-36m-arm-linux-gnueabihf"
    SRCDIRS = "Parser Objects Python Modules Programs"
    SRC_GDB_HOOKS = "./Tools/gdb/libpython.py"
    STDC_HEADERS = "1"
    STRICT_SYSV_CURSES = "/* Don't use ncurses extensions */"
    STRIPFLAG = "-s"
    SUBDIRS = ""
    SUBDIRSTOO = "Include Lib Misc"
    SYSLIBS = "-lm"
    SYS_SELECT_WITH_SYS_TIME = "1"
    TANH_PRESERVES_ZERO_SIGN = "0"
    TCLTK_INCLUDES = ""
    TCLTK_LIBS = ""
    TESTOPTS = ""
    TESTPATH = ""
    TESTPYTHON = "./python"
    TESTPYTHONOPTS = ""
    TESTRUNNER = "./python ./Tools/scripts/run_tests.py"
    TESTTIMEOUT = "1200"
    THREADOBJ = "Python/thread.o"
    TIMEMODULE_LIB = "0"
    TIME_WITH_SYS_TIME = "1"
    TM_IN_SYS_TIME = "0"
    UNICODE_DEPS = "\"
    UNIVERSALSDK = ""
    UPDATE_FILE = "python3.6 ./Tools/scripts/update_file.py"
    USE_COMPUTED_GOTOS = "0"
    USE_INLINE = "1"
    VERSION = "3.6"
    WANT_SIGFPE_HANDLER = "0"
    WINDOW_HAS_FLAGS = "1"
    WITH_DOC_STRINGS = "1"
    WITH_DTRACE = "0"
    WITH_DYLD = "0"
    WITH_LIBINTL = "0"
    WITH_NEXT_FRAMEWORK = "0"
    WITH_PYMALLOC = "1"
    WITH_THREAD = "1"
    WITH_VALGRIND = "0"
    X87_DOUBLE_ROUNDING = "0"
    XMLLIBSUBDIRS = "xml xml/dom xml/etree xml/parsers xml/sax"
    abiflags = "m"
    abs_builddir = "/home/serg/autotools/pycrs4"
    abs_srcdir = "/home/serg/autotools/pycrs4"
    base = "/home/cepera/newhope/cross_venv/cross"
    datarootdir = "/var/bacs/data/python/share"
    exec_prefix = "/var/bacs/data/python"
    installed_base = "/home/cepera/remote/target-utils/python/bh4/python"
    installed_platbase = "/home/cepera/remote/target-utils/python/bh4/python"
    platbase = "/home/cepera/newhope/cross_venv/cross"
    prefix = "/var/bacs/data/python"
    projectbase = "/home/cepera/newhope/cross_venv/cross/bin"
    py_version = "3.6.10"
    py_version_nodot = "36"
    py_version_short = "3.6"
    srcdir = "/home/cepera/remote/target-utils/python/bh4/python/lib/python3.6/config-3.6m-arm-linux-gnueabihf"
    userbase = "/home/cepera/.local"
benfogle commented 2 years ago

Usually when I've seen errors like that (outside of crossenv), the fix was to add a [target] section to ~/.cargo/config:

[target.arm-unknown-linux-gnueabihf]
linker = "/home/serg/crscmpl/imx6bh4/host/usr/bin/arm-buildroot-linux-gnueabihf-gcc"

There's also the possibility that some build script in there is using the cc crate in a way that isn't compatible with cross compiling.