Comments (8)
Can you give me a little bit more information about your build to help me reproduce the issue? What is:
- The architecture (arm?)
- The NDK version (21d?)
- The platform you are targeting.
from crossenv.
The architecture is x86, the NDK version r21d (21.3.6528147), the platform is Android 26, Python version 3.5.3.
from crossenv.
When I try to reproduce this, I get the following:
(cross) $ pip install cryptography
Collecting cryptography==2.8
Using cached https://files.pythonhosted.org/packages/45/73/d18a8884de8bffdcda475728008b5b13be7fbef40a2acc81a0d5d524175d/cryptography-2.8-cp34-abi3-manylinux1_x86_64.whl
Requirement already satisfied: six>=1.4.1 in ./cenv/cross/lib/python3.5/site-packages (from cryptography==2.8)
Requirement already satisfied: cffi!=1.11.3,>=1.8 in ./cenv/cross/lib/python3.5/site-packages (from cryptography==2.8)
Requirement already satisfied: pycparser in ./cenv/cross/lib/python3.5/site-packages (from cffi!=1.11.3,>=1.8->cryptography==2.8)
Installing collected packages: cryptography
Successfully installed cryptography-2.8
You are using pip version 9.0.1, however version 20.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
So it looks like pip isn't recognizing the difference between x86-linux-gnu and x86-linux-android, and it's grabbing the prebuilt Linux wheel from PyPi. This is something I'll need to look into, but in the mean time, you can work around it with:
$ pip install --no-binary=cryptography cryptography
(FYI: I found that upgrading pip caused some strange errors, so you might want to hold off.)
from crossenv.
Thank you for the help! I used the recommended pip command and it seems to work. Now there is a different problem though:
from cryptography.hazmat.bindings._constant_time import lib
File "<python>/importlib/_bootstrap.py", line 978, in _find_and_load
File "<python>/importlib/_bootstrap.py", line 967, in _find_and_load_unlocked
File "<python>/importlib/_bootstrap.py", line 666, in _load_unlocked
File "<python>/importlib/_bootstrap.py", line 577, in module_from_spec
File "<python>/importlib/_bootstrap_external.py", line 914, in create_module
File "<python>/importlib/_bootstrap.py", line 222, in _call_with_frames_removed
ImportError: dlopen failed: cannot locate symbol "memset" referenced by "/data/tmp/lib/python3.5/site-packages/cryptography/hazmat/bindings/_constant_time.abi3.so"...
from crossenv.
I'm having trouble getting to a point that I can reproduce that error. Can you send me the output of readelf -lS --dyn-syms _constant_time.abi3.so
?
from crossenv.
There are 30 section headers, starting at offset 0x3d54:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .interp PROGBITS 00000114 000114 00003d 00 A 0 0 1
[ 2] .dynsym DYNSYM 00000154 000154 000120 10 A 3 1 4
[ 3] .dynstr STRTAB 00000274 000274 000119 00 A 0 0 1
[ 4] .hash HASH 00000390 000390 000094 04 A 2 0 4
[ 5] .rel.dyn REL 00000424 000424 000038 08 A 2 0 4
[ 6] .rel.plt REL 0000045c 00045c 000060 08 AI 2 7 4
[ 7] .plt PROGBITS 000004c0 0004c0 0000d0 04 AX 0 0 16
[ 8] .text PROGBITS 00000590 000590 000691 00 AX 0 0 16
[ 9] .rodata PROGBITS 00000c30 000c30 000093 00 AMS 0 0 16
[10] .eh_frame PROGBITS 00000cc4 000cc4 000040 00 A 0 0 4
[11] .data.rel.ro PROGBITS 00001f08 000f08 000054 00 WA 0 0 4
[12] .dynamic DYNAMIC 00001f5c 000f5c 000098 08 WA 3 0 4
[13] .got PROGBITS 00001ff4 000ff4 000000 00 WA 0 0 4
[14] .got.plt PROGBITS 00001ff4 000ff4 00003c 00 WA 0 0 4
[15] .data PROGBITS 00002030 001030 000024 00 WA 0 0 4
[16] .bss NOBITS 00002054 001054 000070 00 WA 0 0 4
[17] .debug_str PROGBITS 00000000 001054 000653 01 MS 0 0 1
[18] .debug_loc PROGBITS 00000000 0016a7 000672 00 0 0 1
[19] .debug_abbrev PROGBITS 00000000 001d19 0001f3 00 0 0 1
[20] .debug_info PROGBITS 00000000 001f0c 0009c8 00 0 0 1
[21] .debug_ranges PROGBITS 00000000 0028d4 0000b0 00 0 0 1
[22] .debug_macinfo PROGBITS 00000000 002984 000001 00 0 0 1
[23] .comment PROGBITS 00000000 002985 0000b6 01 MS 0 0 1
[24] .debug_frame PROGBITS 00000000 002a3c 0000f8 00 0 0 4
[25] .debug_line PROGBITS 00000000 002b34 000564 00 0 0 1
[26] .note.gnu.go[...] NOTE 00000000 003098 00001c 00 0 0 4
[27] .symtab SYMTAB 00000000 0030b4 000980 10 28 135 4
[28] .strtab STRTAB 00000000 003a34 000205 00 0 0 1
[29] .shstrtab STRTAB 00000000 003c39 000118 00 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
L (link order), O (extra OS processing required), G (group), T (TLS),
C (compressed), x (unknown), o (OS specific), E (exclude),
p (processor specific)
Elf file type is DYN (Shared object file)
Entry point 0x0
There are 7 program headers, starting at offset 52
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
PHDR 0x000034 0x00000034 0x00000034 0x000e0 0x000e0 R 0x4
INTERP 0x000114 0x00000114 0x00000114 0x0003d 0x0003d R 0x1
[Requesting program interpreter: ~/Android/Sdk/ndk/21.3.6528147/sysroot/usr/include]
LOAD 0x000000 0x00000000 0x00000000 0x00d04 0x00d04 R E 0x1000
LOAD 0x000f08 0x00001f08 0x00001f08 0x0014c 0x001bc RW 0x1000
DYNAMIC 0x000f5c 0x00001f5c 0x00001f5c 0x00098 0x00098 RW 0x4
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10
GNU_RELRO 0x000f08 0x00001f08 0x00001f08 0x000f8 0x000f8 RW 0x4
Section to Segment mapping:
Segment Sections...
00
01 .interp
02 .interp .dynsym .dynstr .hash .rel.dyn .rel.plt .plt .text .rodata .eh_frame
03 .data.rel.ro .dynamic .got .got.plt .data .bss
04 .dynamic
05
06 .data.rel.ro .dynamic .got
Symbol table '.dynsym' contains 18 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000590 273 FUNC GLOBAL DEFAULT 8 Cryptography_con[...]
2: 00000000 0 NOTYPE GLOBAL DEFAULT UND PyArg_UnpackTuple
3: 00000000 0 NOTYPE GLOBAL DEFAULT UND PyErr_Occurred
4: 00000000 0 NOTYPE GLOBAL DEFAULT UND PyEval_RestoreThread
5: 00000000 0 NOTYPE GLOBAL DEFAULT UND PyEval_SaveThread
6: 00000000 0 NOTYPE GLOBAL DEFAULT UND PyImport_ImportModule
7: 000006b0 191 FUNC GLOBAL DEFAULT 8 PyInit__constant_time
8: 00000000 0 NOTYPE GLOBAL DEFAULT UND PyLong_FromLong
9: 00000000 0 NOTYPE GLOBAL DEFAULT UND PyLong_FromVoidPtr
10: 00000000 0 NOTYPE GLOBAL DEFAULT UND PyObject_CallMethod
11: 00000000 0 NOTYPE GLOBAL DEFAULT UND PyObject_Free
12: 00000000 0 NOTYPE GLOBAL DEFAULT UND PyObject_Malloc
13: 00000000 0 NOTYPE GLOBAL DEFAULT UND _Py_Dealloc
14: 00000000 0 NOTYPE GLOBAL DEFAULT UND memset
15: 00002054 0 NOTYPE GLOBAL DEFAULT ABS _edata
16: 00002054 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
17: 000020c4 0 NOTYPE GLOBAL DEFAULT ABS _end
from crossenv.
I'm not sure I can reproduce this, and it's certainly very odd that memset
can't be found. It should be part of libc.
Maybe it's related to this?
from crossenv.
Thank you for the help, I will give that a look.
from crossenv.
Related Issues (20)
- paramiko crosscompile issue HOT 2
- Help cross-compiling grpcio HOT 2
- PyPy does not define 'HOST_GNU_TYPE' HOT 5
- Broken in 3.11rc2 HOT 2
- Allow passing host_project_base directly
- Support musllinux tags HOT 5
- Compatibility problems with `importlib.metadata` and `pypa/build` HOT 2
- LIBRARY_PATH ignored
- Not working HOT 4
- problems on older python versions
- ModuleNotFoundError: No module named '_sysconfigdata__aarch64-linux-android'
- Making Android toolchain portable
- Python.h: No such file or directory HOT 1
- Building wheel for bcrypt did not run successfully HOT 3
- cryptography: error: can't find Rust compiler HOT 2
- Use Pyinstaller inside crossenv for cross packaging HOT 1
- Are there any plans to make this work with BSD? HOT 2
- Sane default bitness for 32-bit on 64-bit hosts HOT 1
- python3.10 & setuptools [wip report] HOT 3
- pip failed to install numpy when version>1.17.5 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crossenv.