Comments (12)
Adding declarations of functions that should be in system headers in a certain no-go -- that'll break the build in other environments where those functions are defined differently.
Strictly speaking, you are installing deb packages into an environment that they were not designed for.
Nobody guarantees you that they will work properly.
- Is using the system compiler not an option? That should be the easiest way to proceed
- You can provide a custom patch to apply to the source code with the
-p
option topyenv install
- A "good" solution I have in mind is to pinpoint the place in your specific compiler toolchain where it goes wrong and fix that -- perhaps possible by defining an envvar or preprocessor symbol.
For that, I need to be able to reproduce the issue -- which I'm having trouble with, so your help in that would be very welcome.
from pyenv.
Thank you so much. Seems patch is only option (but I already did it manually faster than I would figure out how to apply it - I am not using it in development).
I'll gladly provide any information which can help.
How did you install the gcc-11 package? Deepin has a "package installer" to install 3rd-party deb's, but it requires all the package's dependencies, too. Is there a way easier than discovering and downloading them all manually?
Is using the system compiler not an option? That should be the easiest way to proceed
I did not install it. It was available out of box just after OS installation, and no *deb packages were manually installed. For installation of all required packages (like libreadline-dev), I only used sudo apt install with default repos.
For that, I need to be able to reproduce the issue -- which I'm having trouble with, so your help in that would be very welcome.
My OS is Deepin linux, installed from deepin-desktop-community-23-Beta2-amd64.iso available from official site - in case you have time and resources for reproducing it in virtual machine
from pyenv.
I found this post https://bbs.deepin.org/zh/post/260319, edited file Python/fileutils.c, updated checksum in pyenv script, and all almost compiled, but at very end build fails with
File "/home/youjin/.pyenv/sources/3.11.7/Python-3.11.7/Lib/ensurepip/init.py", line 4, in
import subprocess
File "/home/youjin/.pyenv/sources/3.11.7/Python-3.11.7/Lib/subprocess.py", line 104, in
from _posixsubprocess import fork_exec as _fork_exec
ModuleNotFoundError: No module named '_posixsubprocess'
make: *** [Makefile:1883:install] 错误 1
????
from pyenv.
Turns out _posixsubprocess module was not compiled because of same reason - error: implicit declaration of function ‘close_range’. After fix from link above 3.11.7 can be compiled.
Please fix the issue by applying patch to all places containing calls of close_range function in python code - I am not sure I can do it myself and pull request.
from pyenv.
Looks like a problem with either the compiler toolchain or CPython build logic. The function close_range
is found by Configure but somehow not found during actual compilation.
I'll try to reproduce the problem and examine the details when I'm back home.
from pyenv.
I remember that gcc-12 on another linux distribution was compiling successfully, I got this problem only with gcc-11.2 mentioned above.
(I didn't want to mess with system compiler, so I just used workaround with declaring extern function.)
from pyenv.
How did you install the gcc-11 package? Deepin has a "package installer" to install 3rd-party deb's, but it requires all the package's dependencies, too. Is there a way easier than discovering and downloading them all manually?
from pyenv.
Okay, I've installed Deepin 13 Beta2 into a VM.
When I installed Pyenv build dependencies as per https://github.com/pyenv/pyenv/wiki#suggested-build-environment , it installed GCC 13 as a dependency, so there isn't an obvious reason to use GCC 11.
Regardless, then I installed GCC 11, and it installed gcc-11 11.4.0-3
.
Neither of those had a build problem with 3.11.7
.
So I suggest you just upgrade the compiler package and/or the Pyenv dependency packages. (Note: only upgrade those. The distro doesn't seem to be very stable, a full apt upgrade
bricked my system; Apt also suggested some packages for autoremove, I didn't do that, either.)
from pyenv.
I upgraded system gcc to 13.2.0 which is also available, and python compiles without problems
from pyenv.
I'm having a similar problem, but my gcc version is 13.2, is there any solution? @native-api @Youjin1985
Here are some of my dependencies:
➜ ~ pyenv --version
pyenv 2.4.3
➜ ~ uname -a
Linux so1n-PC 6.6.25-amd64-desktop-hwe #23.01.00.25 SMP PREEMPT_DYNAMIC Wed Apr 10 21:20:25 CST 2024 x86_64 GNU/Linux
➜ ~ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/13/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Deepin 13.2.0-3deepin2' --with-bugurl=file:///usr/share/doc/gcc-13/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-13 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/usr/src/packages/BUILD/debian/tmp-nvptx/usr,amdgcn-amdhsa=/usr/src/packages/BUILD/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=8
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.0 (Deepin 13.2.0-3deepin2)
from pyenv.
@so1n Can't say anything without the necessary diagnostic details as per the issue template.
from pyenv.
@native-api I'm so sorry and I created an issue (#2988) according to the issue template.
from pyenv.
Related Issues (20)
- pyenv version HOT 1
- pyenv-prefix is slow when many virtual environments exist.
- Can you add pyenv completions HOT 1
- brew upgrade pyenv *** FAIL for v2.4.5.tar.gz *** HOT 2
- Cannot install 3.13t-dev with --debug HOT 1
- Internal: rework pyenv-latest -q into -f/-b
- [Question] Are the builds/results of pyenv install portable? HOT 3
- Having two identical executables for free-threaded version is misleading HOT 6
- curl: (60) SSL certificate problem using pyenv install HOT 4
- pyenv uninstall fails with version that is listed by pyenv version HOT 6
- PyEnv should offer a "latest" tag HOT 3
- Stuck while installing Python 3.12.2 using pyenv on WSL2 HOT 3
- `pip install` behaves differently from `python -m pip install`
- Better quickstart guide/opening picture HOT 8
- pyenv macOS `No module named '_curses'` (bogus header files in `/usr/local/include` and MATLAB's `ldd` disrupting `setup.py`) HOT 4
- Add /usr/etc/pyenv.d as additional directory for hooks HOT 5
- I made a wrong blockchain transfer (Help me)
- Unable to include tkinter in python 3.12.5 (or 3.11.9) on MacOS Sonoma HOT 5
- Compilation error while installing Python: "ModuleNotFoundError: No module named '_curses', 'readline' and '_sqlite3'" HOT 1
- “ld: symbol(s) not found for architecture x86_64” when installing 3.14t-dev over a previous snapshot HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyenv.