The build command does not work on bionic
Metadata
Current evaluation
Fixed on Bionic by merged PR #124 (merge 681d1722, implementation aabf060e), adding pip --system to override its implicit --user setting and avoid conflicting with --target.
Resolution: closed resolved
Reason: PR #124 was merged to fix this issue. Its implementation passes pip's --system option, disabling Bionic's default --user behavior so dependency installation with --target succeeds.
Evaluated by: mr-cal-bot
No scores available.
Issue body
`charmcraft build` fails when ran on bionic.
The error traceback:
2020-07-30 20:59:03,438 charmcraft.commands.build DEBUG :: Collecting PyYAML (from ops->-r /home/ubuntu/charm-iscsi-connector/requirements.txt (line 2))
2020-07-30 20:59:03,442 charmcraft.commands.build DEBUG :: Cache entry deserialization failed, entry ignored
2020-07-30 20:59:03,527 charmcraft.commands.build DEBUG :: Installing collected packages: MarkupSafe, jinja2, PyYAML, ops
2020-07-30 20:59:03,580 charmcraft.commands.build DEBUG :: Exception:
2020-07-30 20:59:03,580 charmcraft.commands.build DEBUG :: Traceback (most recent call last):
2020-07-30 20:59:03,580 charmcraft.commands.build DEBUG :: File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
2020-07-30 20:59:03,581 charmcraft.commands.build DEBUG :: status = self.run(options, args)
2020-07-30 20:59:03,581 charmcraft.commands.build DEBUG :: File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 360, in run
2020-07-30 20:59:03,581 charmcraft.commands.build DEBUG :: prefix=options.prefix_path,
2020-07-30 20:59:03,581 charmcraft.commands.build DEBUG :: File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 784, in install
2020-07-30 20:59:03,581 charmcraft.commands.build DEBUG :: **kwargs
2020-07-30 20:59:03,581 charmcraft.commands.build DEBUG :: File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 851, in install
2020-07-30 20:59:03,581 charmcraft.commands.build DEBUG :: self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
2020-07-30 20:59:03,581 charmcraft.commands.build DEBUG :: File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 1064, in move_wheel_files
2020-07-30 20:59:03,581 charmcraft.commands.build DEBUG :: isolated=self.isolated,
2020-07-30 20:59:03,581 charmcraft.commands.build DEBUG :: File "/usr/lib/python3/dist-packages/pip/wheel.py", line 247, in move_wheel_files
2020-07-30 20:59:03,581 charmcraft.commands.build DEBUG :: prefix=prefix,
2020-07-30 20:59:03,582 charmcraft.commands.build DEBUG :: File "/usr/lib/python3/dist-packages/pip/locations.py", line 153, in distutils_scheme
2020-07-30 20:59:03,582 charmcraft.commands.build DEBUG :: i.finalize_options()
2020-07-30 20:59:03,582 charmcraft.commands.build DEBUG :: File "/usr/lib/python3.6/distutils/command/install.py", line 274, in finalize_options
2020-07-30 20:59:03,582 charmcraft.commands.build DEBUG :: raise DistutilsOptionError("can't combine user with prefix, "
2020-07-30 20:59:03,582 charmcraft.commands.build DEBUG :: distutils.errors.DistutilsOptionError: can't combine user with prefix, exec_prefix/home, or install_(plat)base
2020-07-30 20:59:03,639 charmcraft.commands.build ERROR Executing ['pip3', 'install', '--target=/home/ubuntu/charm-iscsi-connector/build/venv', '--requirement=/home/ubuntu/charm-iscsi-connector/requirements.txt'] failed with return code 2
2020-07-30 20:59:03,640 charmcraft ERROR problems installing dependencies (full execution logs in /tmp/charmcraft-log-8036vrqs)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed on Bionic by merged PR #124 (merge 681d1722, implementation aabf060e), adding pip --system to override its implicit --user setting and avoid conflicting with --target. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed in canonical/charmcraft#124 by adding pip's --system option on Bionic, overriding its incompatible default --user behavior. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by canonical/charmcraft#124 (merge 681d1722, implementation aabf060e), adding pip's --system option to override Bionic's default --user and avoid conflicting with --target. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed with a workaround: Bionic's pip defaults to --user, conflicting with --target. Adding --system to pip disables --user and resolves the build failure. | |
| qwen/qwen3.6-35b-a3b | — | — | charmcraft build failed on Ubuntu Bionic due to pip's default --user flag conflicting with --target. Resolved by passing --system to pip to disable --user on Bionic. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed after providing a workaround for Ubuntu Bionic. The charmcraft build command fails due to a pip --user and --target conflict, resolved by passing the --system flag to disable Bionic's default --user behavior. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Resolved by passing --system to pip, disabling Bionic's default --user flag that conflicted with --target during dependency installation. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/charmcraft#124
(confidence 100%)
Merged PR explicitly fixes issue #102; merge commit 681d1722 contains implementation commit aabf060e.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #124 cope with bionic's slightly broken pip3 command | charmcraft | merged | Merged PR #124 (681d1722, implementation aabf060e) fixed Bionic builds by passing pip --system to override its implicit --user and avoid a --target conflict; fixes #102. |