Skip to content

Build failure for python@3.12.1 on mac with non-system version of ncurses #118873

@s-sajid-ali

Description

@s-sajid-ali

Bug report

Bug description:

Using the spack package manager to install python@3.12.1 on darwin-sonoma-m1 with the following command:

sasyed@MAC-140753 ~> spack install --keep-stage python@3.12.1+optimizations%clang@17.0.6 ^libffi@3.4.6

results in the following build error:

Build error
...
==> Installing python-3.12.1-frh24vuhc6b5eyy346wng65mlwm3h3il [21/21]
==> No binary for python-3.12.1-frh24vuhc6b5eyy346wng65mlwm3h3il found: installing from source
==> Fetching https://www.python.org/ftp/python/3.12.1/Python-3.12.1.tgz
==> Ran patch() for python
==> python: Executing phase: 'configure'
==> python: Executing phase: 'build'
==> python: Executing phase: 'install'
==> Error: ProcessError: Command exited with status 2:
    'make' '-j1' 'install'
...
     1763    ld: warning: reexported library with install name '@rpath/libunwind.1.dylib' found at '/Users/sasyed/Documents/packages/spack/opt/spa
             ck/darwin-sonoma-m1/apple-clang-15.0.0/llvm-17.0.6-uzrfikeehxbzxp3x3twl6wjnh53hpvmr/lib/libunwind.1.0.dylib' couldn't be matched with
              any parent library and will be linked directly
     1764    DYLD_LIBRARY_PATH=/private/var/folders/mb/zd6pgmt100q77s5fhn5xf4jw0000gq/T/sasyed/spack-stage/spack-stage-python-3.12.1-frh24vuhc6b5e
             yy346wng65mlwm3h3il/spack-src ./python.exe -E -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(
             ), *sys.version_info[:2]))' >platform
  >> 1765    [ERROR] _curses failed to import: dlopen(/private/var/folders/mb/zd6pgmt100q77s5fhn5xf4jw0000gq/T/sasyed/spack-stage/spack-stage-pyth
             on-3.12.1-frh24vuhc6b5eyy346wng65mlwm3h3il/spack-src/build/lib.macosx-14.0-arm64-3.12/_curses.cpython-312-darwin.so, 0x0002): symbol 
             not found in flat namespace '_mvwadd_wch'
  >> 1766    [ERROR] _curses_panel failed to import: PyCapsule_Import could not import module "_curses"
  ...

The associated log files with this build error are:

spack-build-01-configure-out.txt
spack-build-02-build-out.txt
spack-build-03-install-out.txt

No build error when building python@3.11.7. The associated log files are:
spack-build-01-configure-out.txt
spack-build-02-build-out.txt
spack-build-03-install-out.txt

Note that the following flags are added by spack when optimizations are turned on:

        if "+optimizations" in spec:
            config_args.append("--enable-optimizations")
            # Prefer thin LTO for faster compilation times.
            if "@3.11.0: %clang@3.9:" in spec or "@3.11.0: %apple-clang@8:" in spec:
                config_args.append("--with-lto=thin")
            else:
                config_args.append("--with-lto")
            config_args.append("--with-computed-gotos")

https://github.com/spack/spack/blob/b79761b7eb5eb2e2d6b8174c3043524462772bf6/var/spack/repos/builtin/packages/python/package.py#L574-L581

CPython versions tested on:

3.12

Operating systems tested on:

macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy