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

Ubuntu 18.04 script fails on Raspberry PI #166

Closed
cyberkryption opened this issue Mar 31, 2021 · 1 comment
Closed

Ubuntu 18.04 script fails on Raspberry PI #166

cyberkryption opened this issue Mar 31, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@cyberkryption
Copy link

Describe the bug
The ubuntu 18.04 script fails when used on a raspberry Pi 4 in the following ways:-
1.) Ta-lib fails to compile as architecture aarch64 is not detected by build scripts - Solved see below.
2.) Install script fails as llvmlite cannot be built

To Reproduce
Steps to reproduce the behavior:

  1. Install Ubuntu 18.04 on a raspberry Pi 4 - 4GB
  2. Run the script provided in the documentation

Expected behavior
I would expect that the scripts should build on any ubuntu supported platform

Screenshots
If applicable, add screenshots to help explain your problem.

Enviroment (please complete the following information):

  • Pi4 runinng Ubunu server 18.04 lTS

Additional context
Fix for the ta-lib script. Ta-lib script fails because config.guess included in ta-lib download is very old, solution is to replace it with a current one.

cd ta-lib
rm config.guess
rm config.sub
wget -O config.guess 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'
wget -O config.sub 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD'

Output from failed llvmlite build

Requirement already satisfied: multitasking>=0.0.7 in ./.local/lib/python3.8/site-packages (from yfinance>=0.1.55->quantstats==0.0.30->-r https://raw.githubusercontent.com/jesse-ai/jesse/master/requirements.txt (line 21)) (0.0.9)
Requirement already satisfied: lxml>=4.5.1 in ./.local/lib/python3.8/site-packages (from yfinance>=0.1.55->quantstats==0.0.30->-r https://raw.githubusercontent.com/jesse-ai/jesse/master/requirements.txt (line 21)) (4.6.3)
Building wheels for collected packages: llvmlite
  Building wheel for llvmlite (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-74oqeiap/llvmlite_f836d5e5fbd4419e91ff5f8f7409e469/setup.py'"'"'; __file__='"'"'/tmp/pip-install-74oqeiap/llvmlite_f836d5e5fbd4419e91ff5f8f7409e469/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-y0nib2em
       cwd: /tmp/pip-install-74oqeiap/llvmlite_f836d5e5fbd4419e91ff5f8f7409e469/
  Complete output (11 lines):
  running bdist_wheel
  /usr/bin/python /tmp/pip-install-74oqeiap/llvmlite_f836d5e5fbd4419e91ff5f8f7409e469/ffi/build.py
  LLVM version... Traceback (most recent call last):
    File "/tmp/pip-install-74oqeiap/llvmlite_f836d5e5fbd4419e91ff5f8f7409e469/ffi/build.py", line 220, in <module>
      main()
    File "/tmp/pip-install-74oqeiap/llvmlite_f836d5e5fbd4419e91ff5f8f7409e469/ffi/build.py", line 210, in main
      main_posix('linux', '.so')
    File "/tmp/pip-install-74oqeiap/llvmlite_f836d5e5fbd4419e91ff5f8f7409e469/ffi/build.py", line 134, in main_posix
      raise RuntimeError(msg) from None
  RuntimeError: Could not find a `llvm-config` binary. There are a number of reasons this could occur, please see: https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#using-pip for help.
  error: command '/usr/bin/python' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for llvmlite
  Running setup.py clean for llvmlite
Failed to build llvmlite
Installing collected packages: llvmlite, quantstats, numpy-groupies, numba, click
    Running setup.py install for llvmlite ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-74oqeiap/llvmlite_f836d5e5fbd4419e91ff5f8f7409e469/setup.py'"'"'; __file__='"'"'/tmp/pip-install-74oqeiap/llvmlite_f836d5e5fbd4419e91ff5f8f7409e469/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-336lc0w_/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/ubuntu/.local/include/python3.8/llvmlite
         cwd: /tmp/pip-install-74oqeiap/llvmlite_f836d5e5fbd4419e91ff5f8f7409e469/
    Complete output (14 lines):
    running install
    running build
    got version from file /tmp/pip-install-74oqeiap/llvmlite_f836d5e5fbd4419e91ff5f8f7409e469/llvmlite/_version.py {'version': '0.36.0', 'full': 'e6bb8d137d922bec8beeb01a237254778759becd'}
    running build_ext
    /usr/bin/python /tmp/pip-install-74oqeiap/llvmlite_f836d5e5fbd4419e91ff5f8f7409e469/ffi/build.py
    LLVM version... Traceback (most recent call last):
      File "/tmp/pip-install-74oqeiap/llvmlite_f836d5e5fbd4419e91ff5f8f7409e469/ffi/build.py", line 220, in <module>
        main()
      File "/tmp/pip-install-74oqeiap/llvmlite_f836d5e5fbd4419e91ff5f8f7409e469/ffi/build.py", line 210, in main
        main_posix('linux', '.so')
      File "/tmp/pip-install-74oqeiap/llvmlite_f836d5e5fbd4419e91ff5f8f7409e469/ffi/build.py", line 134, in main_posix
        raise RuntimeError(msg) from None
    RuntimeError: Could not find a `llvm-config` binary. There are a number of reasons this could occur, please see: https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#using-pip for help.
    error: command '/usr/bin/python' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-74oqeiap/llvmlite_f836d5e5fbd4419e91ff5f8f7409e469/setup.py'"'"'; __file__='"'"'/tmp/pip-install-74oqeiap/llvmlite_f836d5e5fbd4419e91ff5f8f7409e469/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-336lc0w_/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/ubuntu/.local/include/python3.8/llvmlite Check the logs for full command output.
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: jesse in ./.local/lib/python3.8/site-packages (0.20.9)
Requirement already satisfied: arrow in ./.local/lib/python3.8/site-packages (from jesse

Option1: Use docker - most likely not possible as docker images will be x86/X64 so wont run on arm architecture
Option2: Modify script to use conda but python packages are not available.
Option3: Fix llvmlite issue.

Option3 seems the only viable one.

Any help appreciated.

@cyberkryption cyberkryption added the bug Something isn't working label Mar 31, 2021
@cryptocoinserver
Copy link
Collaborator

The install script wasn't tested or intended for raspberry. The error is also not caused by Jesse itself, but one of its dependencies.
It's already discussed on the llvmlite repo:
numba/llvmlite#314
numba/llvmlite#604

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants