GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — `make sharedinstall` does not return failure if install commands fail · Issue #100220 · python/cpython

make sharedinstall does not return failure if install commands fail #100220

New issue
Copy link
New issue
Copy link
Closed
Closed
make sharedinstall does not return failure if install commands fail#100220
Copy link
Labels
buildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@mgorny
mgorny
opened on Dec 13, 2022
Issue body actions

Bug report

If make sharedinstall fails to install some Python extensions, the make target wrongly succeeds. For example, I'm seeing:

/usr/bin/install -c -m 755 Modules/array.cpython-312-x86_64-linux-gnu.so /usr/lib/python3.12/lib-dynload/array.cpython-312-x86_64-linux-gnu.so
/usr/bin/install: cannot create regular file '/var/tmp/portage/dev-lang/python-3.12.0_alpha3/image/usr/lib/python3.12/lib-dynload/array.cpython-312-x86_64-linux-gnu.so': No such file or directory
/usr/bin/install -c -m 755 Modules/_asyncio.cpython-312-x86_64-linux-gnu.so /usr/lib/python3.12/lib-dynload/_asyncio.cpython-312-x86_64-linux-gnu.so
/usr/bin/install: cannot create regular file '/var/tmp/portage/dev-lang/python-3.12.0_alpha3/image/usr/lib/python3.12/lib-dynload/_asyncio.cpython-312-x86_64-linux-gnu.so': No such file or directory
/usr/bin/install -c -m 755 Modules/_bisect.cpython-312-x86_64-linux-gnu.so /usr/lib/python3.12/lib-dynload/_bisect.cpython-312-x86_64-linux-gnu.so
[...]

Nevertheless, make install returns successfully in this case. This causes major problems for automated builds since they end up with broken Python installs when the make target should have failed.

I need to investigate why it's failing but that's a separate issue.

Complete build log (1.2M): dev-lang:python-3.12.0_alpha3:20221207-142002.log

The problem seems to be that the sharedinstall targets runs a single shell command and make doesn't check the exit status until its very end.

I suspect the same problem may apply to other install rules.

Your environment

  • CPython versions tested on: 3.12.0a3
  • Operating system and architecture: Gentoo Linux/amd64

Linked PRs

  • gh-100220: Fix error handling in make rules #100328

Activity

  1. mgorny
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Dec 13, 2022
  2. mgorny
    changed the title [-]`make sharedinstall` no longer returns failure if install commands fail[/-] [+]`make sharedinstall` does not retrn failure if install commands fail[/+] on Dec 13, 2022
  3. mgorny
    changed the title [-]`make sharedinstall` does not retrn failure if install commands fail[/-] [+]`make sharedinstall` does not return failure if install commands fail[/+] on Dec 13, 2022
  4. mgorny
    added a commit that references this issue on Dec 18, 2022

    pythongh-100220: Fix error handling in make rules

    65d6cdb
  5. erlend-aasland
    added
    buildThe build process and cross-buildThe build process and cross-build
    on Jan 11, 2023
  6. mgorny
    added a commit that references this issue on Feb 9, 2023

    pythongh-100220: Fix error handling in make rules

    6c05684
  7. zware
    added a commit that references this issue on Apr 7, 2023

    gh-100220: Fix error handling in make rules (GH-100328)

    a90863c
  8. zware commented on Apr 7, 2023

    @zware
    zware
    on Apr 7, 2023
    Member
    More actions

    GH-100328 merged, thanks for the report and patch!

    I think we'll pass on backporting this; there haven't been reported problems in this vein before (though the recipes haven't changed much, so the underlying issue does exist in older branches), and there could be some lesser-used recipes that shouldn't use -e that we missed.

  9. zware
    closed this as completedon Apr 7, 2023
  10. mgorny commented on Apr 8, 2023

    @mgorny
    mgorny
    on Apr 8, 2023
    ContributorAuthor
    More actions

    Yeah, I suppose the risk is relatively small, as it affects only a few less frequently used rules.

  11. warsaw
    added a commit that references this issue on Apr 11, 2023

    pythongh-100220: Fix error handling in make rules (pythonGH-100328)

    d68d292
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.