Skip to content

Cannot install 3.4.10: "error: static declaration of ‘sinpi’ follows non-static declaration" #3409

Closed

Description

@dodancs

Prerequisites

  • Make sure your problem is not listed in the common build problems.
  • Make sure no duplicated issue has already been reported in the pyenv issues. For build errors, a reported issue typically mentions a key error message. This key error message is often not in the 10 last build log lines reported to the console but is rather earlier in the build log -- typically, it's the first error message encountered in the log.
  • Make sure you are reporting a problem in Pyenv and not seeking consultation with Pyenv usage.
  • Make sure your problem is not derived from packaging (e.g. Homebrew).
    • Please refer to the package documentation for the installation issues, etc.
  • Make sure your problem is not derived from plugins.
    • This repository is maintaining pyenv and the default python-build plugin only. Please refrain from reporting issues of other plugins here.

Describe the bug

$ pyenv install 3.4
Downloading Python-3.4.10.tar.xz...
-> https://www.python.org/ftp/python/3.4.10/Python-3.4.10.tar.xz
Installing Python-3.4.10...

BUILD FAILED (Arch rolling using python-build 2.6.22)

Inspect or clean up the working tree at /tmp/python-build.20260227172023.271368
Results logged to /tmp/python-build.20260227172023.271368.log

Last 10 log lines:
if test "xupgrade" != "xno"  ; then \
	case upgrade in \
		upgrade) ensurepip="--upgrade" ;; \
		install|*) ensurepip="" ;; \
	esac; \
	LD_LIBRARY_PATH=/tmp/python-build.20260227172023.271368/Python-3.4.10 ./python -E -m ensurepip \
		$ensurepip --root=/ ; \
fi
/tmp/python-build.20260227172023.271368/Python-3.4.10/python: Error while finding spec for 'ensurepip.__main__' (<class 'ImportError'>: No module named 'math'); 'ensurepip' is a package and cannot be directly executed
make: *** [Makefile:1004: install] Error 1

Build fails on ensurepip.

Reproduction steps

pyenv install 3.4

Diagnostic details

  • Platform information (e.g. Ubuntu Linux 24.04): Arch Linux 6.18.9-arch1-2
  • OS architecture (e.g. amd64): amd64
  • pyenv version: 2.6.22
  • Python version: 3.14.3
  • C Compiler information (e.g. gcc 7.3): 15.2.1 20260209
  • Please attach the debug trace of the failing command as a gist: https://gist.github.com/dodancs/b375373b77ac2d78d0d375ca02fc2981
    • Run env PYENV_DEBUG=1 <faulty command> 2>&1 | tee trace.log and attach trace.log. E.g. if you have a problem with installing Python, run env PYENV_DEBUG=1 pyenv install -v <version> 2>&1 | tee trace.log (note the -v option to pyenv install).
  • If you have a problem with installing Python, please also attach config.log from the build directory
    • The build directory is reported after the "BUILD FAILED" message and is usually under /tmp.
  • If the build succeeds but the problem is still with the build process (e.g. the resulting Python is missing a feature), please attach
    • the debug trace from reinstalling the faulty version with env PYENV_DEBUG=1 pyenv install -f -k -v <version> 2>&1 | tee trace.log
    • config.log from the build directory. When using pyenv install with -k as per above, the build directory will be under $PYENV_ROOT/sources.
  • If the problem happens in another Pyenv invocation, turn on debug logging by setting PYENV_DEBUG=1, e.g. env PYENV_DEBUG=1 pyenv local 3.6.4, and attach the resulting trace as a gist
  • If the problem happens outside of a Pyenv invocation, get the debug trace like this:
    export PYENV_DEBUG=1
    # for Bash
    export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
    # for Zsh
    export PS4='+(%x:%I): %N(%i): '
    
    set -x
    <reproduce the problem>
    set +x
    

Activity

  1. native-api commented on Mar 1, 2026

    @native-api
    Member

    Try with PYTHON_CFLAGS="-std=c99"
    sinpi is new in C23 which is the default since GCC 15.

    building 'math' extension
    gcc -fPIC -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I./Include -I. -IInclude -I/usr/local/include -I/tmp/python-build.20260227175656.351833/Python-3.4.10/Include -I/tmp/python-build.20260227175656.351833/Python-3.4.10 -c /tmp/python-build.20260227175656.351833/Python-3.4.10/Modules/mathmodule.c -o build/temp.linux-x86_64-3.4/tmp/python-build.20260227175656.351833/Python-3.4.10/Modules/mathmodule.o
    /tmp/python-build.20260227175656.351833/Python-3.4.10/Modules/mathmodule.c:70:1: error: static declaration of ‘sinpi’ follows non-static declaration
    70 | sinpi(double x)
    | ^~~~~
    In file included from /usr/include/features.h:540,
    from /usr/include/bits/libc-header-start.h:33,
    from /usr/include/limits.h:26,
    from /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/limits.h:210,
    from /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/syslimits.h:9,
    from /usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/include/limits.h:34,
    from ./Include/Python.h:11,
    from /tmp/python-build.20260227175656.351833/Python-3.4.10/Modules/mathmodule.c:55:
    /usr/include/bits/mathcalls.h:85:1: note: previous declaration of ‘sinpi’ with type ‘double(double)’
    85 | __MATHCALL_VEC (sinpi,, (Mdouble __x));
    | ^~~~~~~~~~~~~~
    <...>
    /tmp/python-build.20260227175656.351833/Python-3.4.10/python: Error while finding spec for 'ensurepip.main' (<class 'ImportError'>: No module named 'math'); 'ensurepip' is a package and cannot be directly executed

  2. github-actions commented on Apr 1, 2026

    @github-actions
    Contributor

    This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

  3. changed the title [-]Cannot install 3.4.10[/-] [+]Cannot install 3.4.10: "error: static declaration of ‘sinpi’ follows non-static declaration"[/+] on Apr 1, 2026
  4. vsa77 commented on Jun 4, 2026

    @vsa77

    I'll pick up where y'all left off.

    Diagnostic details

    • Platform information: Kali Linux 2026.1 via WSL2 on Windows 11 Home 25H2
    • OS architecture (e.g. amd64): x64
    • pyenv version: 2.6.31
    • Python version: 3.13.12
    • C Compiler information: gcc 15.2.0
    • Please attach the debug trace of the failing command as a gist: Three install attempts were made. The following bullets note the command used to install followed by numbers inside ( ). The numbers are the last 5 numbers of the build directories /tmp.
      - [x] Build log for pyenv install 3.4.10 (65399) and pyenv install 3.4.10 PYTHON_CFLAGS="-std=c99" (79187) in this gist.
      - [x] Build log for env PYENV_DEBUG=1 pyenv install -v 3.4 2>&1 | tee trace.log (93130) in this gist.
      - [x] Config logs for all three install attempts are in this gist.
      - [x] trace.log (93130) is in this gist.
  5. native-api commented on Jun 4, 2026

    @native-api
    Member
  6. native-api commented on Jun 4, 2026

    @native-api
    Member

    @vsa77 FYI in "pyenv install 3.4.10 PYTHON_CFLAGS="-std=c99"", the "variable assignment" is actually interpreted as an extra command line argument.
    The proper Bash syntax for a variable assignment for a specific command is PYTHON_CFLAGS="-std=c99" pyenv install 3.4.10.

  7. vsa77 commented on Jun 4, 2026

    @vsa77

    @vsa77 This issue has been addressed in 2.6.32.

    I updated/upgraded pyenv to the latest version (2.7.1) and tried installing 3.4.10 again and received the same error.

    Having said that, I might have discovered the underlying issue:

    I mentioned above that my pyenv --version was 2.6.31, which I'm assuming was what was upgraded to 2.7.1.

    • Decided to uninstall pyenv. Used rm -rf $(pyenv root) from the home directory. Also removed it from $PATH and any references to it in bashrc, etc.
    • Tested whether it was gone by using pyenv and the response was a command not found.
    • Restarted the shell. Used pyenv and the pyenv help message displayed. Used pyenv --version and the response was pyenv 2.6.8
    • Navigated to /tmp and rm -rf python-build*
    • Navigated back to home directory. pyenv which pyenv showed pyenv was also in /usr/share/pyenv/libexec/pyenv. sudo rm -rf /usr/share/pyenv removed 2.6.8
    • Next I used apt remove pyenv which removed pyenv 2.6.8-1
    • Checked if pyenv was still installed with pyenv and the response was "No such file or directory."

    Multiple versions of pyenv were installed, and I'm hypothesizing that the latest version (with the fix) was not the version that was being invoked when I was trying to install 3.4.10.

    I don't have time to do a reinstall at the moment, but when I do I will come back and verify whether the newest version worked.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions