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

Support building on AIX #195

Open
bhuntsman opened this issue May 31, 2023 · 1 comment
Open

Support building on AIX #195

bhuntsman opened this issue May 31, 2023 · 1 comment

Comments

@bhuntsman
Copy link

Attempting to build a ninja wheel on AIX using ninja-python-distributions fails:

(PyDevenv) $ pip -install . -vvv --no-build-isolation

Usage:   
  pip <command> [options]

no such option: -i
(PyDevenv) $ pip install . -vvv --no-build-isolation 
Using pip 23.1.2 from /home/ben/PyDevenv/lib/python3.9/site-packages/pip (python 3.9)
Non-user install because user site-packages disabled
Created temporary directory: /tmp/pip-build-tracker-d81mqio_
Initialized build tracking at /tmp/pip-build-tracker-d81mqio_
Created build tracker: /tmp/pip-build-tracker-d81mqio_
Entered build tracker: /tmp/pip-build-tracker-d81mqio_
Created temporary directory: /tmp/pip-install-2w9q21_w
Created temporary directory: /tmp/pip-ephem-wheel-cache-bomz0y6m
Processing /home/ben/ninja-python-distributions
  Added file:///home/ben/ninja-python-distributions to build tracker '/tmp/pip-build-tracker-d81mqio_'
  Created temporary directory: /tmp/pip-modern-metadata-hzo9m60v
  Running command Preparing metadata (pyproject.toml)
  running dist_info
  creating /tmp/pip-modern-metadata-hzo9m60v/ninja.egg-info
  writing /tmp/pip-modern-metadata-hzo9m60v/ninja.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-modern-metadata-hzo9m60v/ninja.egg-info/dependency_links.txt
  writing entry points to /tmp/pip-modern-metadata-hzo9m60v/ninja.egg-info/entry_points.txt
  writing requirements to /tmp/pip-modern-metadata-hzo9m60v/ninja.egg-info/requires.txt
  writing top-level names to /tmp/pip-modern-metadata-hzo9m60v/ninja.egg-info/top_level.txt
  writing manifest file '/tmp/pip-modern-metadata-hzo9m60v/ninja.egg-info/SOURCES.txt'
  reading manifest file '/tmp/pip-modern-metadata-hzo9m60v/ninja.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no previously-included files matching '*' found under directory '_skbuild'
  warning: no previously-included files matching '*' found under directory 'Ninja-src'
  warning: no files found matching 'versioneer.py'
  adding license file 'LICENSE_Apache_20'
  adding license file 'AUTHORS.rst'
  writing manifest file '/tmp/pip-modern-metadata-hzo9m60v/ninja.egg-info/SOURCES.txt'
  creating '/tmp/pip-modern-metadata-hzo9m60v/ninja.dist-info'
  Preparing metadata (pyproject.toml) ... done
  Source in /home/ben/ninja-python-distributions has version 0.0.0, which satisfies requirement ninja==0.0.0 from file:///home/ben/ninja-python-distributions
  Removed ninja==0.0.0 from file:///home/ben/ninja-python-distributions from build tracker '/tmp/pip-build-tracker-d81mqio_'
Created temporary directory: /tmp/pip-unpack-570005ka
Building wheels for collected packages: ninja
  Created temporary directory: /tmp/pip-wheel-qjukbymy
  Destination directory: /tmp/pip-wheel-qjukbymy
  Running command Building wheel for ninja (pyproject.toml)
  Target "CMakeFiles/download_ninja_source.dir/build" is up to date.
  [ 44%] Built target download_ninja_source
  [ 50%] Performing build step for 'build_ninja'
  Target "CMakeFiles/libninja-re2c.dir/build" is up to date.
  [  2%] Built target libninja-re2c
  [  4%] Building CXX object CMakeFiles/libninja.dir/src/build_log.cc.o
  "/home/ben/ninja-python-distributions/Ninja-src/src/hash_map.h", line 94.10: 1540-0836 (S) The #include file <ext/hash_map> is not found.
  make: 1254-004 The error code from the last command is 1.


  Stop.
  make: 1254-004 The error code from the last command is 2.


  Stop.
  make: 1254-004 The error code from the last command is 2.


  Stop.
  make: 1254-004 The error code from the last command is 2.


  Stop.
  make: 1254-004 The error code from the last command is 2.


  Stop.
  make: 1254-004 The error code from the last command is 2.


  Stop.
  Traceback (most recent call last):
    File "/home/ben/PyDevenv/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 674, in setup
      cmkr.make(make_args, install_target=cmake_install_target, env=env)
    File "/home/ben/PyDevenv/lib/python3.9/site-packages/skbuild/cmaker.py", line 697, in make
      self.make_impl(clargs=clargs, config=config, source_dir=source_dir, install_target=install_target, env=env)
    File "/home/ben/PyDevenv/lib/python3.9/site-packages/skbuild/cmaker.py", line 742, in make_impl
      raise SKBuildError(msg)

  An error occurred while building with CMake.
    Command:
      /usr/local/bin/cmake --build . --target install --config Release --
    Install target:
      install
    Source directory:
      /home/ben/ninja-python-distributions
    Working directory:
      /home/ben/ninja-python-distributions/_skbuild/aix-7301-9988-64-3.9/cmake-build
  Please check the install target is valid and see CMake's output for more information.

  error: subprocess-exited-with-error
  
  Building wheel for ninja (pyproject.toml) did not run successfully.
  exit code: 1
  
  See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /home/ben/PyDevenv/bin/python3 /home/ben/PyDevenv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmpxukan2jt
  cwd: /home/ben/ninja-python-distributions
  Building wheel for ninja (pyproject.toml) ... error
  ERROR: Failed building wheel for ninja
Failed to build ninja
ERROR: Could not build wheels for ninja, which is required to install pyproject.toml-based projects
Exception information:
Traceback (most recent call last):
  File "/home/ben/PyDevenv/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 169, in exc_logging_wrapper
    status = run_func(*args)
  File "/home/ben/PyDevenv/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 248, in wrapper
    return func(self, options, args)
  File "/home/ben/PyDevenv/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 426, in run
    raise InstallationError(
pip._internal.exceptions.InstallationError: Could not build wheels for ninja, which is required to install pyproject.toml-based projects
Remote version of pip: 23.1.2
Local version of pip:  23.1.2
Was pip installed by pip? True
Removed build tracker: '/tmp/pip-build-tracker-d81mqio_'

Some details:

  • Patches have been merged to scikit-build to enable this.
  • This is AIX 7.3 (7300-01-01).
  • The compiler in use is XL C 16.1, but I also have 17.1 as an option.
  • CMake is version 3.26.4
  • The header ext/hash_map is available in /opt/IBM/xlC/16.1.0/include2/c++/ext/hash_map

I could use a little help in determining, is this a problem with ninja-python-distributions, ninja itself, or CMake?

@henryiii
Copy link
Contributor

henryiii commented Oct 9, 2023

Does this still happen? Latest scikit-build's should support this.

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