Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Errors while building the curtin part of the snap #566

Open
jpnurmi opened this issue Dec 13, 2021 · 2 comments
Open

Errors while building the curtin part of the snap #566

jpnurmi opened this issue Dec 13, 2021 · 2 comments

Comments

@jpnurmi
Copy link
Contributor

jpnurmi commented Dec 13, 2021

Building curtin 
+ snapcraftctl build
+ python3 -m venv /root/parts/curtin/install
+ SNAPCRAFT_PYTHON_VENV_INTERP_PATH=/root/parts/curtin/install/bin/python3
+ pip install -U pyyaml==5.3.1 oauthlib jsonschema pyrsistent wheel setuptools pip bson urwid requests requests-unixsocket
Collecting pyyaml==5.3.1
  Downloading PyYAML-5.3.1.tar.gz (269 kB)
     |████████████████████████████████| 269 kB 4.3 MB/s 
Collecting oauthlib
  Downloading oauthlib-3.1.1-py2.py3-none-any.whl (146 kB)
     |████████████████████████████████| 146 kB 63.3 MB/s 
Collecting jsonschema
  Downloading jsonschema-4.2.1-py3-none-any.whl (69 kB)
     |████████████████████████████████| 69 kB 23.5 MB/s 
Collecting pyrsistent
  Downloading pyrsistent-0.18.0-cp38-cp38-manylinux1_x86_64.whl (118 kB)
     |████████████████████████████████| 118 kB 141.8 MB/s 
Collecting wheel
  Downloading wheel-0.37.0-py2.py3-none-any.whl (35 kB)
Collecting setuptools
  Downloading setuptools-59.6.0-py3-none-any.whl (952 kB)
     |████████████████████████████████| 952 kB 144.7 MB/s 
Collecting pip
  Downloading pip-21.3.1-py3-none-any.whl (1.7 MB)
     |████████████████████████████████| 1.7 MB 81.0 MB/s 
Collecting bson
  Downloading bson-0.5.10.tar.gz (10 kB)
Collecting urwid
  Downloading urwid-2.1.2.tar.gz (634 kB)
     |████████████████████████████████| 634 kB 88.8 MB/s 
Collecting requests
  Downloading requests-2.26.0-py2.py3-none-any.whl (62 kB)
     |████████████████████████████████| 62 kB 3.4 MB/s 
Collecting requests-unixsocket
  Downloading requests_unixsocket-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting importlib-resources>=1.4.0; python_version < "3.9"
  Downloading importlib_resources-5.4.0-py3-none-any.whl (28 kB)
Collecting attrs>=17.4.0
  Downloading attrs-21.2.0-py2.py3-none-any.whl (53 kB)
     |████████████████████████████████| 53 kB 7.1 MB/s 
Collecting python-dateutil>=2.4.0
  Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
     |████████████████████████████████| 247 kB 34.5 MB/s 
Collecting six>=1.9.0
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting certifi>=2017.4.17
  Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
     |████████████████████████████████| 149 kB 115.8 MB/s 
Collecting urllib3<1.27,>=1.21.1
  Downloading urllib3-1.26.7-py2.py3-none-any.whl (138 kB)
     |████████████████████████████████| 138 kB 27.5 MB/s 
Collecting idna<4,>=2.5; python_version >= "3"
  Downloading idna-3.3-py3-none-any.whl (61 kB)
     |████████████████████████████████| 61 kB 29.8 MB/s 
Collecting charset-normalizer~=2.0.0; python_version >= "3"
  Downloading charset_normalizer-2.0.9-py3-none-any.whl (39 kB)
Collecting zipp>=3.1.0; python_version < "3.10"
  Downloading zipp-3.6.0-py3-none-any.whl (5.3 kB)
Building wheels for collected packages: pyyaml, bson, urwid
  Building wheel for pyyaml (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /root/parts/curtin/install/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-y6_z4v3p/pyyaml/setup.py'"'"'; __file__='"'"'/tmp/pip-install-y6_z4v3p/pyyaml/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-kx6ce6u2
       cwd: /tmp/pip-install-y6_z4v3p/pyyaml/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for pyyaml
  Running setup.py clean for pyyaml
  Building wheel for bson (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /root/parts/curtin/install/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-y6_z4v3p/bson/setup.py'"'"'; __file__='"'"'/tmp/pip-install-y6_z4v3p/bson/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-81ld3711
       cwd: /tmp/pip-install-y6_z4v3p/bson/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for bson
  Running setup.py clean for bson
  Building wheel for urwid (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /root/parts/curtin/install/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-y6_z4v3p/urwid/setup.py'"'"'; __file__='"'"'/tmp/pip-install-y6_z4v3p/urwid/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-4nec84mc
       cwd: /tmp/pip-install-y6_z4v3p/urwid/
  Complete output (46 lines):
  Traceback (most recent call last):
    File "/usr/lib/python3.8/distutils/dist.py", line 539, in _parse_command_opts
      cmd_class = self.get_command_class(command)
    File "/root/parts/curtin/install/lib/python3.8/site-packages/setuptools/dist.py", line 837, in get_command_class
      return _Distribution.get_command_class(self, command)
    File "/usr/lib/python3.8/distutils/dist.py", line 843, in get_command_class
      raise DistutilsModuleError("invalid command '%s'" % command)
  distutils.errors.DistutilsModuleError: invalid command 'bdist_wheel'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/usr/lib/python3.8/distutils/core.py", line 134, in setup
      ok = dist.parse_command_line()
    File "/root/parts/curtin/install/lib/python3.8/site-packages/setuptools/dist.py", line 707, in parse_command_line
      result = _Distribution.parse_command_line(self)
    File "/usr/lib/python3.8/distutils/dist.py", line 483, in parse_command_line
      args = self._parse_command_opts(parser, args)
    File "/root/parts/curtin/install/lib/python3.8/site-packages/setuptools/dist.py", line 1014, in _parse_command_opts
      nargs = _Distribution._parse_command_opts(self, parser, args)
    File "/usr/lib/python3.8/distutils/dist.py", line 541, in _parse_command_opts
      raise DistutilsArgError(msg)
  distutils.errors.DistutilsArgError: invalid command 'bdist_wheel'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/tmp/pip-install-y6_z4v3p/urwid/setup.py", line 82, in <module>
      setup(**setup_d)
    File "/root/parts/curtin/install/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3.8/distutils/core.py", line 136, in setup
      raise SystemExit(gen_usage(dist.script_name) + "\nerror: %s" % msg)
  SystemExit: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  Couldn't build the extension module, trying without it...
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for urwid
  Running setup.py clean for urwid
Failed to build pyyaml bson urwid
Installing collected packages: pyyaml, oauthlib, zipp, importlib-resources, pyrsistent, attrs, jsonschema, wheel, setuptools, pip, six, python-dateutil, bson, urwid, certifi, urllib3, idna, charset-normalizer, requests, requests-unixsocket
    Running setup.py install for pyyaml ... done
  Attempting uninstall: setuptools
    Found existing installation: setuptools 44.0.0
    Uninstalling setuptools-44.0.0:
      Successfully uninstalled setuptools-44.0.0
  Attempting uninstall: pip
    Found existing installation: pip 20.0.2
    Uninstalling pip-20.0.2:
      Successfully uninstalled pip-20.0.2
    Running setup.py install for bson ... done
    Running setup.py install for urwid ... done
Successfully installed attrs-21.2.0 bson-0.5.10 certifi-2021.10.8 charset-normalizer-2.0.9 idna-3.3 importlib-resources-5.4.0 jsonschema-4.2.1 oauthlib-3.1.1 pip-21.3.1 pyrsistent-0.18.0 python-dateutil-2.8.2 pyyaml-5.3.1 requests-2.26.0 requests-unixsocket-0.2.0 setuptools-59.6.0 six-1.16.0 urllib3-1.26.7 urwid-2.1.2 wheel-0.37.0 zipp-3.6.0
+ '[' -f setup.py ']'
+ pip install -U .
Processing /root/parts/curtin/build
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: curtin
  Building wheel for curtin (setup.py) ... done
  Created wheel for curtin: filename=curtin-21.2-py3-none-any.whl size=250630 sha256=f63475eea0ab392c10dbf7e54a252bdc0f7692159b896b62892a7b8b7fce3fa2
  Stored in directory: /tmp/pip-ephem-wheel-cache-zho8heqf/wheels/40/6d/9a/e47c41012d1ef2754eb4fb4e75d16f57451af4e15e04af1bcd
Successfully built curtin
Installing collected packages: curtin
Successfully installed curtin-21.2
+ find /root/parts/curtin/install -type f -executable -print0
+ xargs -0 sed -i '1 s|^#\!/root/parts/curtin/install/bin/python3.*$|#\!/usr/bin/env python3|'
++ determine_link_target
+++ set +o +x
+++ grep xtrace
++ opts_state='set -o xtrace'
+++ dirname /root/parts/curtin/install/bin/python3
++ interp_dir=/root/parts/curtin/install/bin
+++ which python3
++ python_path=/root/parts/curtin/install/bin/python3
+++ readlink -e /root/parts/curtin/install/bin/python3
++ python_path=/usr/bin/python3.8
++ for dir in "${SNAPCRAFT_PART_INSTALL}" "${SNAPCRAFT_STAGE}"
++ grep -q /root/parts/curtin/install
++ echo /usr/bin/python3.8
++ for dir in "${SNAPCRAFT_PART_INSTALL}" "${SNAPCRAFT_STAGE}"
++ echo /usr/bin/python3.8
++ grep -q /root/stage
++ echo /usr/bin/python3.8
++ eval 'set -o xtrace'
+++ set -o xtrace
+ python_path=/usr/bin/python3.8
+ ln -sf /usr/bin/python3.8 /root/parts/curtin/install/bin/python3
@dbungert
Copy link
Collaborator

I'm a fan of fixing warnings, so I want to fix this. To understand the severity, is this blocking the build or just a warning that uses the term error?

@jpnurmi
Copy link
Contributor Author

jpnurmi commented Dec 14, 2021

It's not blocking the build so it doesn't seem critical considering that things are working today. It's easy to notice the error while building the installer snap because there's a big blob of highlighted red text during the build.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants