Kuree / kratos

:crossed_swords: Debuggable hardware generator
https://kratos-doc.readthedocs.io
BSD 2-Clause "Simplified" License
67 stars 9 forks source link

Kratos Dependency Error During Installation of magma-lang #153

Closed varunshenoy closed 4 years ago

varunshenoy commented 4 years ago

I'm currently running into the following issue when trying to install magma-lang and run the tests. Ross let me know to submit a Github issue here.


Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/uniform/test_uniform.py:6: in <module>
    import magma as m
../magma/magma/__init__.py:35: in <module>
    from .bit import *
../magma/magma/bit.py:16: in <module>
    from magma.circuit import Circuit, coreir_port_mapping
../magma/magma/circuit.py:23: in <module>
    from magma.syntax.verilog import combinational_to_verilog, \
../magma/magma/syntax/__init__.py:2: in <module>
    from magma.syntax.verilog import build_kratos_debug_info
../magma/magma/syntax/verilog.py:9: in <module>
    import kratos
../../../../opt/miniconda3/envs/myenv/lib/python3.8/site-packages/kratos/__init__.py:1: in <module>
    from .generator import Generator, PortType, PortDirection, BlockEdgeType, \
../../../../opt/miniconda3/envs/myenv/lib/python3.8/site-packages/kratos/generator.py:2: in <module>
    from .pyast import transform_stmt_block, CodeBlockType, add_scope_context, \
../../../../opt/miniconda3/envs/myenv/lib/python3.8/site-packages/kratos/pyast.py:5: in <module>
    import _kratos
E   ImportError: dlopen(/Users/varunshenoy/opt/miniconda3/envs/myenv/lib/python3.8/site-packages/_kratos.cpython-38-darwin.so, 2): Symbol not found: _aligned_alloc
E     Referenced from: /Users/varunshenoy/opt/miniconda3/envs/myenv/lib/python3.8/site-packages/_kratos.cpython-38-darwin.so
E     Expected in: /usr/lib/libSystem.B.dylib
E    in /Users/varunshenoy/opt/miniconda3/envs/myenv/lib/python3.8/site-packages/_kratos.cpython-38-darwin.so
Kuree commented 4 years ago

Are you using MacOS lower than the latest version? The wheel is built against the newest image via Github Actions. I believe the latest OS has some non-backward compatible ABI that clang relies on.

Unfortunately I only have physical access to Linux machines. The only solution I can think of is to recompile from source. Sorry about that. Please let me know if you have any issue compiling from source.