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 — --with-system-libmpdec / --with-system-expat still uses the vendored headers · Issue #98707 · python/cpython

--with-system-libmpdec / --with-system-expat still uses the vendored headers #98707

New issue
Copy link
New issue
Copy link
Closed
#98711
Closed
--with-system-libmpdec / --with-system-expat still uses the vendored headers#98707
#98711
Copy link
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixesbuildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@hroncok
hroncok
opened on Oct 26, 2022
Issue body actions

Bug report

Python 3.12.0a1 or the main branch. Run:

$ sudo dnf install mpdecimal-devel expat-devel  # or similar for your OS
...
$ git clean -fdx
$ rm -r Modules/_decimal/libmpdec
$ rm -r Modules/expat
$ ./configure --config-cache --enable-shared --with-system-libmpdec --with-system-expat
$ make
...
make: *** No rule to make target 'Modules/_decimal/libmpdec/basearith.h', needed by 'Modules/_decimal/_decimal.o'.  Stop.

$ git restore Modules/_decimal/libmpdec
$ make
...
make: *** No rule to make target 'Modules/expat/ascii.h', needed by 'Modules/pyexpat.o'.  Stop.

This works fine with Python 3.11.0. I suspect somewhere along #94474 or a similar change, this has changed behavior, but I have not tried bisecting yet.

Your environment

  • CPython versions tested on: 3.12.0a1 or the main branch
  • Operating system and architecture: Fedora Linux x86_64
  • PR: gh-98707: Don't let --with-system-libmpdec / --with-system-expat use the vendored headers #98711
  • PR: [3.11] gh-98707: configure --with-system-libmpdec and --with-system-expat no longer include vendored headers (GH-98711) #99391
Reacted by Tomáš Hrnčiar

Activity

  1. hroncok
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Oct 26, 2022
  2. hroncok commented on Oct 26, 2022

    @hroncok
    hroncok
    on Oct 26, 2022
    ContributorAuthor
    More actions

    Bisecting with only Modules/_decimal/libmpdec removed, because I got some other failures with removed Modules/expat on the way.

    EDIT: Apparently, that's what you get when you spell expat as expact.

  3. hroncok commented on Oct 26, 2022

    @hroncok
    hroncok
    on Oct 26, 2022
    ContributorAuthor
    More actions

    Indeed, my gut feeling was correct:

    81dca70 is the first new commit
    commit 81dca70
    Author: Christian Heimes @tiran
    Date: Thu Jul 14 09:51:49 2022 +0200

    gh-93939: Build C extensions without setup.py (GH-94474)
    
  4. hroncok commented on Oct 26, 2022

    @hroncok
    hroncok
    on Oct 26, 2022
    ContributorAuthor
    More actions

    I am really really bad at autotools, but my best guess is that this is caused by:

    cpython/Makefile.pre.in

    Line 2584 in de69816

    MODULE_PYEXPAT_DEPS=$(LIBEXPAT_HEADERS) @LIBEXPAT_INTERNAL@

    As LIBEXPAT_HEADERS contains a list that starts with Modules/expat/ascii.h.

    cpython/Makefile.pre.in

    Line 2589 in de69816

    MODULE__DECIMAL_DEPS=$(srcdir)/Modules/_decimal/docstrings.h $(LIBMPDEC_HEADERS) @LIBMPDEC_INTERNAL@

    As LIBMPDEC_HEADERS contains a list that starts with Modules/_decimal/libmpdec/basearith.h.

    In both cases, the dependency needs to be made conditional on the relevant --with-system-xxx option.

  5. hroncok commented on Oct 26, 2022

    @hroncok
    hroncok
    on Oct 26, 2022
    ContributorAuthor
    More actions

    Testing a possible fix.

  6. hroncok
    changed the title [-]--with-system-libmpdec / --with-system-expact still uses the vendored headers[/-] [+]--with-system-libmpdec / --with-system-expat still uses the vendored headers[/+] on Oct 26, 2022
  7. hroncok
    added 2 commits that reference this issue on Oct 26, 2022

    Don't let --with-system-libmpdec / --with-system-expat use the vendor…

    0017bdc

    pythongh-98707: Don't let --with-system-libmpdec / --with-system-expa…

    803285d
  8. hroncok commented on Oct 26, 2022

    @hroncok
    hroncok
    on Oct 26, 2022
    ContributorAuthor
    More actions

    FTR this was a problem on older Pythons as well, but it was not exposed. #94474 did not introduce it, but it exposed it. Another problem this will most likely fix is:

    --- STDERR ---
    /tmp/tmpt5xmo3n_/cpython/Objects/obmalloc.c:1449:1: warning: ‘always_inline’ function might not be inlinable [-Wattributes]
     1449 | arena_map_get(block *p, int create)
          | ^~~~~~~~~~~~~
    make: *** No rule to make target '/tmp/tmpt5xmo3n_/cpython/Modules/_decimal/libmpdec/basearith.c', needed by 'Modules/_decimal/libmpdec/basearith.o'.  Stop.
    make: *** Waiting for unfinished jobs....
    ---- END ----
    ERROR
    ======================================================================
    ERROR: test_freeze_simple_script (test.test_tools.test_freeze.TestFreeze.test_freeze_simple_script)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/builddir/build/BUILD/Python-3.11.0/Lib/test/test_tools/test_freeze.py", line 27, in test_freeze_simple_script
        outdir, scriptfile, python = helper.prepare(script, outdir)
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/builddir/build/BUILD/Python-3.11.0/Tools/freeze/test/freeze.py", line 159, in prepare
        _run_quiet([MAKE, '-C', builddir, '-j8'])
      File "/builddir/build/BUILD/Python-3.11.0/Tools/freeze/test/freeze.py", line 25, in _run_quiet
        return subprocess.run(
               ^^^^^^^^^^^^^^^
      File "/builddir/build/BUILD/Python-3.11.0/Lib/subprocess.py", line 569, in run
        raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['/usr/bin/make', '-C', '/tmp/tmpt5xmo3n_/python-build', '-j8']' returned non-zero exit status 2.
    ----------------------------------------------------------------------
    Ran 1 test in 70.677s
    FAILED (errors=1)
    

    EDIT: It does not fix it.

  9. erlend-aasland
    added
    buildThe build process and cross-buildThe build process and cross-build
    on Oct 26, 2022
  10. hroncok
    added a commit that references this issue on Oct 27, 2022

    pythongh-98707: Don't let --with-system-libmpdec / --with-system-expa…

    a1e927c
  11. hrnciar
    added 2 commits that reference this issue on Oct 27, 2022

    00389: Don't let --with-system-libmpdec / --with-system-expat use the…

    This issue will close once commit 3f3d7c1 is merged into the 'fedora-3.14' branch.
    3f3d7c1

    00389: Don't let --with-system-libmpdec / --with-system-expat use the…

    This issue will close once commit b031b7b is merged into the 'fedora-3.14' branch.
    b031b7b
  12. gpshead
    assigned
    tiran
    on Nov 7, 2022
  13. gpshead
    added
    3.12only security fixesonly security fixes
    on Nov 7, 2022
  14. erlend-aasland
    closed this as completedin #98711on Nov 11, 2022
  15. erlend-aasland
    added 2 commits that reference this issue on Nov 11, 2022

    gh-98707: configure --with-system-libmpdec and --with-system-expat no…

    6abec1c

    [3.11] pythongh-98707: configure --with-system-libmpdec and --with-sy…

    d97137c
  16. erlend-aasland
    added
    3.11only security fixesonly security fixes
    on Nov 11, 2022
  17. erlend-aasland
    unassigned
    tiran
    on Nov 11, 2022
  18. ethanfurman
    added a commit that references this issue on Nov 12, 2022

    pythongh-98707: configure --with-system-libmpdec and --with-system-ex…

    16bd877
  19. erlend-aasland
    added a commit that references this issue on Nov 13, 2022

    [3.11] gh-98707: configure --with-system-libmpdec and --with-system-e…

    eac1a63
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

    3.11only security fixesonly security fixes3.12only security fixesonly security fixesbuildThe 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.