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

ninja on ARM processor #28

Closed
tobigithub opened this issue Mar 21, 2020 · 7 comments
Closed

ninja on ARM processor #28

tobigithub opened this issue Mar 21, 2020 · 7 comments

Comments

@tobigithub
Copy link

tried to install ninja on a AWS ARM instance (a1.4xlarge). meson works fine, pip3 works fine, ninja fails. OS is ubuntu16. Probably also related to #27 also loading scikit-build and cmake before did not work. tnx.

sudo -H pip3 install scikit-build
sudo -H pip3 install "cmake==3.6.3"
sudo -H  pip3 install meson
Requirement already satisfied: meson in /usr/local/lib/python3.5/dist-packages (0.53.2)
---


 sudo -H pip3 install ninja
Collecting ninja
  Using cached ninja-1.9.0.post1.tar.gz (25 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qwm9exys/ninja/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qwm9exys/ninja/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-qwm9exys/ninja/pip-egg-info
         cwd: /tmp/pip-install-qwm9exys/ninja/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-qwm9exys/ninja/setup.py", line 7, in <module>
        from skbuild import setup
    ImportError: No module named 'skbuild'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.


----
sudo  pip3 install ninja
WARNING: The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting ninja
  Downloading ninja-1.9.0.post1.tar.gz (25 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-szjzp_04/ninja/setup.py'"'"'; __file__='"'"'/tmp/pip-install-szjzp_04/ninja/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-szjzp_04/ninja/pip-egg-info
         cwd: /tmp/pip-install-szjzp_04/ninja/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-szjzp_04/ninja/setup.py", line 7, in <module>
        from skbuild import setup
    ImportError: No module named 'skbuild'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
----
 pip3 install ninja
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Defaulting to user installation because normal site-packages is not writeable
Collecting ninja
  Downloading ninja-1.9.0.post1.tar.gz (25 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-l7j_g1jq/ninja/setup.py'"'"'; __file__='"'"'/tmp/pip-install-l7j_g1jq/ninja/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-l7j_g1jq/ninja/pip-egg-info
         cwd: /tmp/pip-install-l7j_g1jq/ninja/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-l7j_g1jq/ninja/setup.py", line 7, in <module>
        from skbuild import setup
    ImportError: No module named 'skbuild'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

---
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.6 LTS
Release:        16.04
Codename:       xenial
---
 lscpu
Architecture:          aarch64
Byte Order:            Little Endian
CPU(s):                16
On-line CPU(s) list:   0-15
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             4
NUMA node(s):          1
L1d cache:             32K
L1i cache:             48K
L2 cache:              2048K
NUMA node0 CPU(s):     0-15
---

after install of scikit-build

sudo -H pip3 install scikit-build

 sudo -H  pip3 install ninja
Collecting ninja
  Using cached ninja-1.9.0.post1.tar.gz (25 kB)
Building wheels for collected packages: ninja
  Building wheel for ninja (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-likc8w01/ninja/setup.py'"'"'; __file__='"'"'/tmp/pip-install-likc8w01/ninja/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-n6jnxwz2
       cwd: /tmp/pip-install-likc8w01/ninja/
  Complete output (82 lines):


  --------------------------------------------------------------------------------
  -- Trying "Ninja" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  Not searching for unused variables given on the command line.
  CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
  -- Configuring incomplete, errors occurred!
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Ninja" generator - failure
  --------------------------------------------------------------------------------



  --------------------------------------------------------------------------------
  -- Trying "Unix Makefiles" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  Not searching for unused variables given on the command line.
  -- The C compiler identification is GNU 5.4.0
  -- Check for working C compiler: /usr/bin/cc
  -- Check for working C compiler: /usr/bin/cc -- works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- The CXX compiler identification is GNU 5.4.0
  -- Check for working CXX compiler: /usr/bin/c++
  -- Check for working CXX compiler: /usr/bin/c++ -- works
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /tmp/pip-install-likc8w01/ninja/_cmake_test_compile/build
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Unix Makefiles" generator - success
  --------------------------------------------------------------------------------

  CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
    CMake 3.6 or higher is required.  You are running version 3.5.1


  -- Configuring incomplete, errors occurred!
  Traceback (most recent call last):
    File "/usr/local/lib/python3.5/dist-packages/skbuild/setuptools_wrap.py", line 574, in setup
      languages=cmake_languages
    File "/usr/local/lib/python3.5/dist-packages/skbuild/cmaker.py", line 232, in configure
      os.path.abspath(CMAKE_BUILD_DIR())))

  An error occurred while configuring with CMake.
    Command:
      "cmake" "/tmp/pip-install-likc8w01/ninja" "-G" "Unix Makefiles" "-DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-likc8w01/ninja/_skbuild/linux-aarch64-3.5/cmake-install" "-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3" "-DPYTHON_VERSION_STRING:STRING=3.5.2" "-DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.5m" "-DPYTHON_LIBRARY:FILEPATH=/usr/lib/aarch64-linux-gnu/libpython3.5m.so" "-DSKBUILD:BOOL=TRUE" "-DCMAKE_MODULE_PATH:PATH=/usr/local/lib/python3.5/dist-packages/skbuild/resources/cmake" "-DCMAKE_BUILD_TYPE:STRING=Release"
    Source directory:
      /tmp/pip-install-likc8w01/ninja
    Working directory:
      /tmp/pip-install-likc8w01/ninja/_skbuild/linux-aarch64-3.5/cmake-build
  Please see CMake's output for more information.
  ----------------------------------------
  ERROR: Failed building wheel for ninja
  Running setup.py clean for ninja
Failed to build ninja
Installing collected packages: ninja
    Running setup.py install for ninja ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-likc8w01/ninja/setup.py'"'"'; __file__='"'"'/tmp/pip-install-likc8w01/ninja/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-ewi052c5/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.5/ninja
         cwd: /tmp/pip-install-likc8w01/ninja/
    Complete output (82 lines):


    --------------------------------------------------------------------------------
    -- Trying "Ninja" generator
    --------------------------------
    ---------------------------
    ----------------------
    -----------------
    ------------
    -------
    --
    Not searching for unused variables given on the command line.
    CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
    -- Configuring incomplete, errors occurred!
    --
    -------
    ------------
    -----------------
    ----------------------
    ---------------------------
    --------------------------------
    -- Trying "Ninja" generator - failure
    --------------------------------------------------------------------------------



    --------------------------------------------------------------------------------
    -- Trying "Unix Makefiles" generator
    --------------------------------
    ---------------------------
    ----------------------
    -----------------
    ------------
    -------
    --
    Not searching for unused variables given on the command line.
    -- The C compiler identification is GNU 5.4.0
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- The CXX compiler identification is GNU 5.4.0
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /tmp/pip-install-likc8w01/ninja/_cmake_test_compile/build
    --
    -------
    ------------
    -----------------
    ----------------------
    ---------------------------
    --------------------------------
    -- Trying "Unix Makefiles" generator - success
    --------------------------------------------------------------------------------

    CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
      CMake 3.6 or higher is required.  You are running version 3.5.1


    -- Configuring incomplete, errors occurred!
    Traceback (most recent call last):
      File "/usr/local/lib/python3.5/dist-packages/skbuild/setuptools_wrap.py", line 574, in setup
        languages=cmake_languages
      File "/usr/local/lib/python3.5/dist-packages/skbuild/cmaker.py", line 232, in configure
        os.path.abspath(CMAKE_BUILD_DIR())))

    An error occurred while configuring with CMake.
      Command:
        "cmake" "/tmp/pip-install-likc8w01/ninja" "-G" "Unix Makefiles" "-DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-likc8w01/ninja/_skbuild/linux-aarch64-3.5/cmake-install" "-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3" "-DPYTHON_VERSION_STRING:STRING=3.5.2" "-DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.5m" "-DPYTHON_LIBRARY:FILEPATH=/usr/lib/aarch64-linux-gnu/libpython3.5m.so" "-DSKBUILD:BOOL=TRUE" "-DCMAKE_MODULE_PATH:PATH=/usr/local/lib/python3.5/dist-packages/skbuild/resources/cmake" "-DCMAKE_BUILD_TYPE:STRING=Release"
      Source directory:
        /tmp/pip-install-likc8w01/ninja
      Working directory:
        /tmp/pip-install-likc8w01/ninja/_skbuild/linux-aarch64-3.5/cmake-build
    Please see CMake's output for more information.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-likc8w01/ninja/setup.py'"'"'; __file__='"'"'/tmp/pip-install-likc8w01/ninja/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-ewi052c5/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.5/ninja Check the logs for full command output.
@thewtex
Copy link
Member

thewtex commented Mar 23, 2020

CMake 3.6 or higher is required. You are running version 3.5.1

This indicates a newer version of CMake is required.

@tobigithub
Copy link
Author

@thewtex
tnx, I included the initial command for install: sudo -H pip3 install "cmake==3.6.3"
not sure what the latest version is for ARM, but they both failed I guess. So its the good old
merry go round, basically have to find out if cmake can be installed and then check ninja for
python again.

My simple solution was to install ninja directly onto the OS, no python, that actually worked.

@thewtex
Copy link
Member

thewtex commented Mar 23, 2020

My simple solution was to install ninja directly onto the OS, no python, that actually worked.

Makes sense. CMake could also be installed outside of pip. The ninja and cmake PyPI packages are convenience packages for when they are not available.

@thewtex
Copy link
Member

thewtex commented Oct 26, 2020

In #39 @AWSjswinney added ARM builds

@AWSjswinney
Copy link
Contributor

@thewtex @jcfr Thanks for finishing up my pull request #40 to get Arm support squared away. Any chance you could do a post3 release in order to publish the Arm wheels? Thanks!

@AWSjswinney
Copy link
Contributor

@thewtex @jcfr Sorry to bug you again. Any chance you could do a post3 release in order to publish the Arm wheels? Thanks!

@mayeut
Copy link
Contributor

mayeut commented Jul 17, 2021

Available in 1.10.0.post3

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

4 participants