Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'use_lit_shell' #97

Open
sunheyi6 opened this issue Aug 25, 2023 · 1 comment
Open

Comments

@sunheyi6
Copy link

sunheyi6 commented Aug 25, 2023

image

@banach-space I followed the instructions in the README and proceeded with the operation.
First,

wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main"
sudo apt-get update
sudo apt-get install -y llvm-16 llvm-16-dev llvm-16-tools clang-16

Second,

cd /root/llvm-tutor/build/
cmake -DLT_LLVM_INSTALL_DIR=/usr/lib/llvm-16 /root/llvm-tutor
make

Third

root@LAPTOP-OJLO0M82:~/llvm-tutor/build# ls
CMakeCache.txt  CMakeFiles  Makefile  cmake_install.cmake  input_for_hello.ll
root@LAPTOP-OJLO0M82:~/llvm-tutor/build# lit --version
lit 16.0.6
root@LAPTOP-OJLO0M82:~/llvm-tutor/build# lit ../test
lit: /usr/local/lib/python3.10/dist-packages/lit/TestingConfig.py:140: fatal: unable to parse config file '/root/llvm-tutor/test/lit.cfg.py', traceback: Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/lit/TestingConfig.py", line 129, in load_from_path
    exec(compile(data, path, 'exec'), cfg_globals, None)
  File "/root/llvm-tutor/test/lit.cfg.py", line 22, in <module>
    config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell)
AttributeError: 'NoneType' object has no attribute 'use_lit_shell'
@banach-space
Copy link
Owner

That's not what the README says:

lit ../test

Please use this instead:

$ lit <build_dir>/test

where "<build_dir>" is where you build all of llvm-tutor.

-Andrzej

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

No branches or pull requests

2 participants