You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure no duplicated issue has already been reported in the pyenv issues. You should look for closed issues, too.
Make sure you are not asking us to help solving your specific issue.
GitHub issues is opened mainly for development purposes. If you want to ask someone to help solving your problem, go to some community site like Gitter, StackOverflow, etc.
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.
Description
Platform information (e.g. Ubuntu Linux 16.04): Arch
OS architecture (e.g. amd64): x86_64
pyenv version: 2.4.17
Python version: any version CPython I tried to install failed, this example is about v3.10.15
C Compiler information (e.g. gcc 7.3): gcc 14.2.1 20240910
Please attach the debug trace of the failing command as a gist:
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.
Hi,
After many hours trying to fix my problem without success, I hope you will be able to help me.
$ pyenv install 3.10
Downloading Python-3.10.15.tar.xz...
-> https://www.python.org/ftp/python/3.10.15/Python-3.10.15.tar.xz
Installing Python-3.10.15...
BUILD FAILED (Arch Linux using python-build 20180424)
Inspect or clean up the working tree at /tmp/python-build.20241101205203.9933
Results logged to /tmp/python-build.20241101205203.9933.log
Last 10 log lines:
./configure: line 3936: 5: Bad file descriptor
./configure: line 3936: 5: Bad file descriptor
./configure: line 3936: 5: Bad file descriptor
./configure: line 3936: 5: Bad file descriptor
checking whether the C compiler works... ./configure: line 3983: 5: Bad file descriptor
no
./configure: line 4026: 5: Bad file descriptor
configure: error: in`/tmp/python-build.20241101205203.9933/Python-3.10.15':configure: error: C compiler cannot create executablesSee `config.log'for more details
tried to run ./configure directly from the folder (it works)
reinstall the relevant packages, tried to increase the limit of opened files, tried with a different compiler (GCC 13, clang) -> no change
I never use gcc myself, so it's quite unlikely I messed with its config or so
Conclusions:
I'm sorry to bother you with that issue that is probably not linked to pyenv directly, but I would be very grateful if you can help me, or guide me to investigate further, as I must admit I'm a bit lost...
Thanks in advance for help.
The text was updated successfully, but these errors were encountered:
I forgot to mention: my user is a Samba user. Just to see, I tried to set the flags described for OpenSSL, with not luck.
But I just did a test by running pyenv with root, and this time it works!
So I still have no clue on how to perform pyenv install with my normal user, but I wonder: as a workaround, could I just:
copy/chown the files from my root pyenv folder to my normal user?
I see that the shims files contain export PYENV_ROOT="/root/.pyenv", so would it be just a matter of replacing that value in all of those?
or even simpler: just set the same PYENV_ROOT for both users, and perform install/uninstall with root only? After all, the files in the pyenv folder are just meant to be read, and not write will happen after install?
pterrien
changed the title
Build errors (Bad file Descriptor + C compiler cannot create executables) on Arch
Build errors using a Samba user (Bad file Descriptor + C compiler cannot create executables) on Arch
Nov 1, 2024
The problem is definitely with the descriptor 5. The compiler problem seems to be a corollary.
I suggest to run the entire thing with strace -f and see the system calls related to that file descriptor, and, for the compiler's process, with standard descriptors.
I also suggest to save the following patch:
diff --git a/configure b/configure
index 4b71c4e00f8..6c108a8c9d5 100755
--- a/configure+++ b/configure@@ -1,4 +1,6 @@-#! /bin/sh+#! /bin/bash+export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'+set -x
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for python 3.10.
#
and run the installation like pyenv install -p -k -f 3.10.15 <path_to_patch and seeing the build log. It should contain the trace of configure execution, showing where exactly the "bad file descriptor" errors occur.
Too many issues will kill our team's development velocity, drastically.
Make sure you have checked all steps below.
Prerequisite
pyenv
and the defaultpython-build
plugin only. Please refrain from reporting issues of other plugins here.Description
env PYENV_DEBUG=1 <faulty command> 2>&1 | tee trace.log
and attachtrace.log
. E.g. if you have a problem with installing Python, runenv PYENV_DEBUG=1 pyenv install -v <version> 2>&1 | tee trace.log
(note the-v
option topyenv install
).config.log
from the build directory/tmp
.env PYENV_DEBUG=1 pyenv install -f -k -v <version> 2>&1 | tee trace.log
config.log
from the build directory. When usingpyenv install
with-k
as per above, the build directory will be under$PYENV_ROOT/sources
.Hi,
After many hours trying to fix my problem without success, I hope you will be able to help me.
Overview:
More details in this gist
Basically, I encounter this error:
What I tried:
$HOME/<user>/.pyenv
, as well as a custom one (mnt/cache/apps/pyenv
)Reading these 2 comments (1 and 2), I fully understand my issue is linked to the compiler so I also:
./configure
directly from the folder (it works)gcc
myself, so it's quite unlikely I messed with its config or soConclusions:
I'm sorry to bother you with that issue that is probably not linked to
pyenv
directly, but I would be very grateful if you can help me, or guide me to investigate further, as I must admit I'm a bit lost...Thanks in advance for help.
The text was updated successfully, but these errors were encountered: