Skip to content

Conversation

smoy
Copy link
Contributor

@smoy smoy commented Mar 5, 2024

Adopt the solution from #7148

@NikolajBjorner NikolajBjorner merged commit e8c8d8a into Z3Prover:master Mar 5, 2024
@smoy
Copy link
Contributor Author

smoy commented Mar 6, 2024

I am testing https://github.com/Z3Prover/z3/releases/download/Nightly/z3_solver-4.13.0.0-py2.py3-none-manylinux2014_aarch64.whl under debian. Although the pip install work, it seems like so library bundled is incorrect.

root@126be077ecfc:/# . venv/bin/activate
(venv) root@126be077ecfc:/# python
Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import z3
Could not find libz3.so; consider adding the directory containing it to
  - your system's PATH environment variable,
  - the Z3_LIBRARY_PATH environment variable, or 
  - to the custom Z3_LIB_DIRS Python-builtin before importing the z3 module, e.g. via
    import builtins
    builtins.Z3_LIB_DIRS = [ '/path/to/z3/lib/dir' ] # directory containing libz3.so
[OSError('/venv/lib/python3.11/site-packages/z3/lib/libz3.so: cannot open shared object file: No such file or directory'), TypeError('expected str, bytes or os.PathLike object, not NoneType'), OSError('/venv/lib/python3.11/site-packages/z3/lib/libz3.so: cannot open shared object file: No such file or directory'), OSError('libz3.so: cannot open shared object file: No such file or directory')]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/venv/lib/python3.11/site-packages/z3/__init__.py", line 1, in <module>
    from .z3 import *
  File "/venv/lib/python3.11/site-packages/z3/z3.py", line 46, in <module>
    from . import z3core
  File "/venv/lib/python3.11/site-packages/z3/z3core.py", line 79, in <module>
    raise Z3Exception("libz3.%s not found." % _ext)
z3.z3types.Z3Exception: libz3.so not found.
>>> 
(venv) root@126be077ecfc:/# stat venv/lib/python3.11/site-packages/z3/lib/libz3.so
  File: venv/lib/python3.11/site-packages/z3/lib/libz3.so
  Size: 31385832  	Blocks: 61304      IO Block: 4096   regular file
Device: 0,129	Inode: 3579333     Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2024-03-06 00:33:37.443927000 +0000
Modify: 2024-03-06 00:33:32.997368012 +0000
Change: 2024-03-06 00:33:32.997368012 +0000
 Birth: 2024-03-06 00:33:32.880368012 +0000
(venv) root@126be077ecfc:/# file venv/lib/python3.11/site-packages/z3/lib/libz3.so
venv/lib/python3.11/site-packages/z3/lib/libz3.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=92381da0e6c7e6373761c5743dec6cf760c39648, not stripped
(venv) root@126be077ecfc:/# uname -a
Linux 126be077ecfc 6.6.16-linuxkit #1 SMP Fri Feb 16 11:54:02 UTC 2024 aarch64 GNU/Linux

In contrast, when i check another so file from another manylinux wheel, it shows the expected aarch64 so

(venv) root@126be077ecfc:/# file venv/lib/python3.11/site-packages/casadi/libcoinmetis.so
venv/lib/python3.11/site-packages/casadi/libcoinmetis.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=3b760a55b9f24fa08510ad7457cfb2f468aaffa4, with debug_info, not stripped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants