View previous topic :: View next topic |
Author |
Message |
ferdish n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Jun 2024 Posts: 23
|
Posted: Mon Jul 15, 2024 9:29 am Post subject: |
|
|
Haven't gotten to reading ebuild man carefully yet, but straight execution gives:
Code: | # EPYTHON=python3.11 ebuild /usr/portage/dev-lang/python/python-3.12.3-r1.ebuild configure
* Python-3.12.3.tar.xz BLAKE2B SHA512 size ;-) ... [ ok ]
* python-gentoo-patches-3.12.3.tar.xz BLAKE2B SHA512 size ;-) ... [ ok ]
* checking ebuild checksums ;-) ... [ ok ]
* checking auxfile checksums ;-) ... [ ok ]
* checking miscfile checksums ;-) ... [ ok ]
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/portage/process.py", line 1442, in _start_fork
target(*args, **kwargs)
File "/usr/lib/python3.12/site-packages/portage/process.py", line 1184, in _exec2
_configure_loopback_interface()
File "/usr/lib/python3.12/site-packages/portage/process.py", line 812, in _configure_loopback_interface
with RtNetlink() as rtnl:
^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/portage/util/netlink.py", line 67, in __init__
self.sock.bind(self.addr)
^^^^^^^^^^^^^^
AttributeError: 'socket' object has no attribute 'bind'
* The ebuild phase 'unpack' has exited unexpectedly. This type of behavior
* is known to be triggered by things such as failed variable assignments
* (bug #190128) or bad substitution errors (bug #200313). Normally, before
* exiting, bash should have displayed an error message above. If bash did
* not produce an error message above, it's possible that the ebuild has
* called `exit` when it should have called `die` instead. This behavior
* may also be triggered by a corrupt bash binary or a hardware problem
* such as memory or cpu malfunction. If the problem is not reproducible or
* it appears to occur randomly, then it is likely to be triggered by a
* hardware problem. If you suspect a hardware problem then you should try
* some basic hardware diagnostics such as memtest. Please do not report
* this as a bug unless it is consistently reproducible and you are sure
* that your bash binary and hardware are functioning properly.
|
Unless I'm asking to use python 3.11 wrong (man ebuild doesn't mention it at all), it still uses python 3.12 and fails on the same spot |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bstaletic Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 05 Apr 2014 Posts: 310
|
Posted: Mon Jul 15, 2024 10:19 am Post subject: |
|
|
Maybe you need to export EPYTHON=.... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ferdish n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Jun 2024 Posts: 23
|
Posted: Mon Jul 15, 2024 9:09 pm Post subject: |
|
|
Tried that as well - exactly the same result. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bstaletic Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 05 Apr 2014 Posts: 310
|
Posted: Tue Jul 16, 2024 5:59 am Post subject: |
|
|
It looks like you have successfully finished fetch phase, but then failed at unpack phase. Maybe you can do that step manually?
Code: | >>> Unpacking source...
>>> Unpacking Python-3.12.3.tar.xz to /var/tmp/portage/dev-lang/python-3.12.3-r1/work
>>> Unpacking python-gentoo-patches-3.12.3.tar.xz to /var/tmp/portage/dev-lang/python-3.12.3-r1/work
>>> Source unpacked in /var/tmp/portage/dev-lang/python-3.12.3-r1/work |
That's what happens after fetching and verifying checksums.
Then there's the prepare phase:
Code: | >>> Preparing source in /var/tmp/portage/dev-lang/python-3.12.3-r1/work/Python-3.12.3 ...
* Applying patches from /var/tmp/portage/dev-lang/python-3.12.3-r1/work/python-gentoo-patches-3.12.3 ...
* 0001-Blacklist-test_pickletools-from-__all__-test-as-it-i.patch ... [ ok ]
* 0002-Skip-RDS-socket-tests-that-hang-frequently.patch ... [ ok ]
* 0003-ssl-Hard-disable-SSLv3-to-avoid-automagic-deps.patch ... [ ok ]
* 0004-Skip-sched-priority-tests.patch ... [ ok ]
* 0005-Workaround-clang-musl-build-failure.patch ... [ ok ]
* 0006-Skip-tests-which-interact-with-invalid-UTF-8-files.patch ... [ ok ]
* 0007-Prevent-tests-from-detecting-our-fake-tzdata-package.patch ... [ ok ]
* 0008-test_lzma-Skip-tests-requiring-extra-filters.patch ... [ ok ]
* Running eautoreconf in '/var/tmp/portage/dev-lang/python-3.12.3-r1/work/Python-3.12.3' ...
* Running 'aclocal --system-acdir=/var/tmp/portage/dev-lang/python-3.12.3-r1/temp/aclocal' ... [ ok ]
* Running 'autoconf --force' ... [ ok ]
* Running 'autoheader' ... [ ok ]
* Running elibtoolize in: Python-3.12.3/
>>> Source prepared. |
And then comes the configure phase that we are interested in.
Make sure you do everything as portage user. Doing things as root screws up permissions.
Another thing to note is that I avoided messing with EPYTHON.
Here are the steps:
- ebuild /var/db/repos/gentoo/dev-lang/python/python-3.12.3-r1.ebuild pretend
- ebuild /var/db/repos/gentoo/dev-lang/python/python-3.12.3-r1.ebuild setup
- cd /var/tmp/portage/dev-lang/python-3.12.3-r1
- ln -sv /var/db/repos/gentoo/dev-lang/python/files
- mkdir distdir
- cd distdir
- ln -sv /var/cache/distfiles/Python-3.12.3.tar.xz
- ln -sv /var/cache/distfiles/python-gentoo-patches-3.12.3.tar.xz
- cd ../work
- tar -xf ../distdir/Python-3.12.3.tar.xz
- tar -xf ../distdir/python-gentoo-patches-3.12.3.tar.xz
- cd ..
- touch .unpacked
- ebuld /var/db/repos/gentoo/dev-lang/python/python-3.12.3-r1.ebuild prepare
- ebuild /var/db/repos/gentoo/dev-lang/python/python-3.12.3-r1.ebuild configure
If that still does not configure python, we can do the prepare step manually as well.
It just applies gentoo patches and then calls aclocal, autoconf, autoheader and elibtoolize with some arguments. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ferdish n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Jun 2024 Posts: 23
|
Posted: Tue Jul 16, 2024 9:55 am Post subject: |
|
|
Thanks for the detailed instructions.
Made some changes though:
Executing as root as:
Code: | # su portage
su: Authentication service cannot retrieve authentication info
|
When it passes far enough, I'd temporary setup portage user. For now I'm just chown-ing after each step if needed.
Using /usr/portage instead of /var/db/repos/gentoo.
After step 14 got:
Code: | # ebuild /usr/portage/dev-lang/python/python-3.12.3-r1.ebuild prepare
>>> Existing ${T}/environment for 'python-3.12.3-r1' will be sourced. Run
>>> 'clean' to start with a fresh environment.
>>> Checking Python-3.12.3.tar.xz's mtime...
>>> Checking python-gentoo-patches-3.12.3.tar.xz's mtime...
>>> WORKDIR is up-to-date, keeping...
* checking ebuild checksums ;-) ... [ ok ]
* checking auxfile checksums ;-) ... [ ok ]
* checking miscfile checksums ;-) ... [ ok ]
>>> It appears that 'pretend' has already executed for 'python-3.12.3-r1'; skipping.
>>> Remove '/var/tmp/portage/dev-lang/python-3.12.3-r1/.pretended' to force pretend.
>>> It appears that 'setup' has already executed for 'python-3.12.3-r1'; skipping.
>>> Remove '/var/tmp/portage/dev-lang/python-3.12.3-r1/.setuped' to force setup.
>>> It appears that 'unpack' has already executed for 'python-3.12.3-r1'; skipping.
>>> Remove '/var/tmp/portage/dev-lang/python-3.12.3-r1/.unpacked' to force unpack.
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/portage/process.py", line 1442, in _start_fork
target(*args, **kwargs)
File "/usr/lib/python3.12/site-packages/portage/process.py", line 1184, in _exec2
_configure_loopback_interface()
File "/usr/lib/python3.12/site-packages/portage/process.py", line 812, in _configure_loopback_interface
with RtNetlink() as rtnl:
^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/portage/util/netlink.py", line 67, in __init__
self.sock.bind(self.addr)
^^^^^^^^^^^^^^
AttributeError: 'socket' object has no attribute 'bind'
* The ebuild phase 'prepare' has exited unexpectedly. This type of
* behavior is known to be triggered by things such as failed variable
* assignments (bug #190128) or bad substitution errors (bug #200313).
* Normally, before exiting, bash should have displayed an error message
* above. If bash did not produce an error message above, it's possible
* that the ebuild has called `exit` when it should have called `die`
* instead. This behavior may also be triggered by a corrupt bash binary or
* a hardware problem such as memory or cpu malfunction. If the problem is
* not reproducible or it appears to occur randomly, then it is likely to
* be triggered by a hardware problem. If you suspect a hardware problem
* then you should try some basic hardware diagnostics such as memtest.
* Please do not report this as a bug unless it is consistently
* reproducible and you are sure that your bash binary and hardware are
* functioning properly. |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bstaletic Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 05 Apr 2014 Posts: 310
|
Posted: Tue Jul 16, 2024 4:21 pm Post subject: |
|
|
ferdish wrote: | For now I'm just chown-ing after each step if needed. |
The portage user has no password. Normally, you don't actually want to switch to that user, but this is not a normal situation.
You can use sudo -u portage ....
ferdish wrote: | Using /usr/portage instead of /var/db/repos/gentoo. |
I remember when /usr/portage was the default! I'll keep using paths that work on my system. That way, I know the step actually worked.
Slowly getting there...
- The first 13 steps remain the same. I'll start with an assumption that you are in /var/tmp/portage/dev-lang/python-3.12.3-r1/work/Python-3.12.3
- for f in ../python-gentoo-patches-3.12.3/*; do patch -Np1 < ${f}; done
- mkdir ../../temp/aclocal
- echo /usr/share/aclocal > ../../temp/aclocal/dirlist
- aclocal --system-acdir=/var/tmp/portage/dev-lang/python-3.12.3-r1/temp/aclocal
- autoconf --force
- autoheader
- TMPDIR=/tmp ELT_LOGDIR=/var/tmp/portage/dev-lang/python-3.12.3-r1/temp LD=ld eltpatch --force /var/tmp/portage/dev-lang/python-3.12.3-r1/work/Python-3.12.3
- touch ../../.prepared
That only leaves the configure step.
The src_configure() function is messy, but I think this is what it ends up doing on your system:
Code: | cat > Modules/Setup.local <<-EOF
*disabled*
nis
_tkinter
EOF
./configure \
--enable-shared \
--without-static-libpython \
--enable-ipv6 \
--infodir='/usr/share/info' \
--mandir='/usr/share/man' \
--with-computed-gotos \
--with-dbmliborder="gdbm" \
--with-libc= \
--enable-loadable-sqlite-extensions \
--without-ensurepip \
--without-lto \
--with-system-expat \
--with-system-libmpdec \
--with-platlibdir=lib \
--with-pkg-config=yes \
--with-wheel-pkg-dir=/usr/lib/python/ensurepip \
--with-readline
echo EPYTHON='python3.12' > Lib/epython.py |
But maybe you can try running this step with the ebuild command first?
Last edited by bstaletic on Tue Jul 16, 2024 4:50 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ferdish n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Jun 2024 Posts: 23
|
Posted: Tue Jul 16, 2024 4:47 pm Post subject: |
|
|
Code: |
# sudo -u portage ebuild /usr/portage/dev-lang/python/python-3.12.3-r1.ebuild configure
...
checking for bind... yes
...
configure: creating Modules/Setup.local
configure: creating Makefile
maksetup: 'nis' was handled by previous rule.
configure:
If you want a release build with all stable optimizations active (PGO, etc),
please run ./configure --enable-optimizations
>>> Source configured.
|
What a plot twist!
I suspect the next one is sudo -u portage ebuild /usr/portage/dev-lang/python/python-3.12.3-r1.ebuild compile, then test -> install -> preinst -> instprep -> postinst -> qmerge -> merge, but I'll wait for a confirmation. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bstaletic Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 05 Apr 2014 Posts: 310
|
Posted: Tue Jul 16, 2024 5:00 pm Post subject: |
|
|
ferdish wrote: | Code: |
# sudo -u portage ebuild /usr/portage/dev-lang/python/python-3.12.3-r1.ebuild configure
...
checking for bind... yes
...
configure: creating Modules/Setup.local
configure: creating Makefile
maksetup: 'nis' was handled by previous rule.
configure:
If you want a release build with all stable optimizations active (PGO, etc),
please run ./configure --enable-optimizations
>>> Source configured.
|
What a plot twist! |
I was wondering if this would happen...
I guess you can try running the remaining steps with ebuild.
As far as I understand, the remaining steps, in order, are:
- compile
- test (optional)
- instprep
- preinst
- install
- postinst
- qmerge
There's also the merge option that just invokes everything in order.
Also... do you need config for this package? I'm honestly not sure. Read the ebuild man page carefully once again. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ferdish n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Jun 2024 Posts: 23
|
Posted: Tue Jul 16, 2024 5:18 pm Post subject: |
|
|
Well, I was going by man ebuild:
Quote: | By default, portage will execute all the functions in order up to the one actually specified |
I don't think I need a config - I never tuned anything python related. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bstaletic Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 05 Apr 2014 Posts: 310
|
Posted: Tue Jul 16, 2024 5:55 pm Post subject: |
|
|
https://devmanual.gentoo.org/ebuild-writing/functions/index.html
So, I got the order stlightly wrong.
pkg_config does not even exist for the python package.
I believe this is the right order:
- compile - src_compile()
- install - src_install()
- instprep - don't know what that would invoke
- preinst - pkg_preinst()
- postinst - pkg_postinst()
- qmerge - not an ebuild function.
Considering that part of thte man page you quoted, you could skip steps. Just keep in mind that portage is still not fixed. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ferdish n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Jun 2024 Posts: 23
|
Posted: Tue Jul 16, 2024 6:00 pm Post subject: |
|
|
Code: | # sudo -u portage ebuild /usr/portage/dev-lang/python/python-3.12.3-r1.ebuild qmerge
>>> Existing ${T}/environment for 'python-3.12.3-r1' will be sourced. Run
>>> 'clean' to start with a fresh environment.
* checking ebuild checksums ;-) ... [ ok ]
* checking auxfile checksums ;-) ... [ ok ]
* checking miscfile checksums ;-) ... [ ok ]
Permission denied: access('/', W_OK)
# ebuild /usr/portage/dev-lang/python/python-3.12.3-r1.ebuild qmerge
>>> Existing ${T}/environment for 'python-3.12.3-r1' will be sourced. Run
>>> 'clean' to start with a fresh environment.
* checking ebuild checksums ;-) ... [ ok ]
* checking auxfile checksums ;-) ... [ ok ]
* checking miscfile checksums ;-) ... [ ok ]
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/portage/process.py", line 1442, in _start_fork
target(*args, **kwargs)
File "/usr/lib/python3.12/site-packages/portage/process.py", line 1184, in _exec2
_configure_loopback_interface()
File "/usr/lib/python3.12/site-packages/portage/process.py", line 812, in _configure_loopback_interface
with RtNetlink() as rtnl:
^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/portage/util/netlink.py", line 67, in __init__
self.sock.bind(self.addr)
^^^^^^^^^^^^^^
AttributeError: 'socket' object has no attribute 'bind'
* The ebuild phase 'instprep' has exited unexpectedly. This type of
* behavior is known to be triggered by things such as failed variable
* assignments (bug #190128) or bad substitution errors (bug #200313).
* Normally, before exiting, bash should have displayed an error message
* above. If bash did not produce an error message above, it's possible
* that the ebuild has called `exit` when it should have called `die`
* instead. This behavior may also be triggered by a corrupt bash binary or
* a hardware problem such as memory or cpu malfunction. If the problem is
* not reproducible or it appears to occur randomly, then it is likely to
* be triggered by a hardware problem. If you suspect a hardware problem
* then you should try some basic hardware diagnostics such as memtest.
* Please do not report this as a bug unless it is consistently
* reproducible and you are sure that your bash binary and hardware are
* functioning properly.
!!! instprep failed
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bstaletic Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 05 Apr 2014 Posts: 310
|
Posted: Tue Jul 16, 2024 6:50 pm Post subject: |
|
|
I assume everything before qmerge went fine?
Perhaps you could make that python a binary package, then install it that way.
ebuild /path/to/ebuild package will create a binary package in your $PKGDIR.
Then you can try with telling emerge to install from the binary archive.
Alternatively, use qmerge for the same. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ferdish n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Jun 2024 Posts: 23
|
Posted: Tue Jul 16, 2024 9:33 pm Post subject: |
|
|
Yep, everything up to qmerge went well (except one test failed - about wheel group).
Code: | # ebuild /usr/portage/dev-lang/python/python-3.12.3-r1.ebuild package
>>> Existing ${T}/environment for 'python-3.12.3-r1' will be sourced. Run
>>> 'clean' to start with a fresh environment.
>>> Checking Python-3.12.3.tar.xz's mtime...
>>> Checking python-gentoo-patches-3.12.3.tar.xz's mtime...
>>> WORKDIR is up-to-date, keeping...
* checking ebuild checksums ;-) ... [ ok ]
* checking auxfile checksums ;-) ... [ ok ]
* checking miscfile checksums ;-) ... [ ok ]
>>> It appears that 'pretend' has already executed for 'python-3.12.3-r1'; skipping.
>>> Remove '/var/tmp/portage/dev-lang/python-3.12.3-r1/.pretended' to force pretend.
>>> It appears that 'setup' has already executed for 'python-3.12.3-r1'; skipping.
>>> Remove '/var/tmp/portage/dev-lang/python-3.12.3-r1/.setuped' to force setup.
>>> It appears that 'unpack' has already executed for 'python-3.12.3-r1'; skipping.
>>> Remove '/var/tmp/portage/dev-lang/python-3.12.3-r1/.unpacked' to force unpack.
>>> It appears that 'prepare' has already executed for 'python-3.12.3-r1'; skipping.
>>> Remove '/var/tmp/portage/dev-lang/python-3.12.3-r1/.prepared' to force prepare.
>>> It appears that 'configure' has already executed for 'python-3.12.3-r1'; skipping.
>>> Remove '/var/tmp/portage/dev-lang/python-3.12.3-r1/.configured' to force configure.
>>> It appears that 'compile' has already executed for 'python-3.12.3-r1'; skipping.
>>> Remove '/var/tmp/portage/dev-lang/python-3.12.3-r1/.compiled' to force compile.
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/portage/process.py", line 1442, in _start_fork
target(*args, **kwargs)
File "/usr/lib/python3.12/site-packages/portage/process.py", line 1184, in _exec2
_configure_loopback_interface()
File "/usr/lib/python3.12/site-packages/portage/process.py", line 812, in _configure_loopback_interface
with RtNetlink() as rtnl:
^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/portage/util/netlink.py", line 67, in __init__
self.sock.bind(self.addr)
^^^^^^^^^^^^^^
AttributeError: 'socket' object has no attribute 'bind'
* The ebuild phase 'test' has exited unexpectedly. This type of behavior
* is known to be triggered by things such as failed variable assignments
* (bug #190128) or bad substitution errors (bug #200313). Normally, before
* exiting, bash should have displayed an error message above. If bash did
* not produce an error message above, it's possible that the ebuild has
* called `exit` when it should have called `die` instead. This behavior
* may also be triggered by a corrupt bash binary or a hardware problem
* such as memory or cpu malfunction. If the problem is not reproducible or
* it appears to occur randomly, then it is likely to be triggered by a
* hardware problem. If you suspect a hardware problem then you should try
* some basic hardware diagnostics such as memtest. Please do not report
* this as a bug unless it is consistently reproducible and you are sure
* that your bash binary and hardware are functioning properly.
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ferdish n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Jun 2024 Posts: 23
|
Posted: Tue Jul 16, 2024 11:48 pm Post subject: |
|
|
Looks like I have portage-utils installed.
Everything succeeded up to:
Code: | # emerge --usepkg -a1 python
!!! Your current profile is deprecated and not supported anymore.
!!! Use eselect profile to update your profile.
!!! Please upgrade to the following profile if possible:
default/linux/amd64/23.0/split-usr
...
Calculating dependencies ... done!
Dependency resolution took 8.65 s (backtrack: 0/20).
[ebuild R ] dev-lang/python-3.12.3-r1
Would you like to merge these packages? [Yes/No] Yes
>>> Verifying ebuild manifests
>>> Running pre-merge checks for dev-lang/python-3.12.3-r1
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/portage/process.py", line 1442, in _start_fork
target(*args, **kwargs)
File "/usr/lib/python3.12/site-packages/portage/process.py", line 1184, in _exec2
_configure_loopback_interface()
File "/usr/lib/python3.12/site-packages/portage/process.py", line 812, in _configure_loopback_interface
with RtNetlink() as rtnl:
^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/portage/util/netlink.py", line 67, in __init__
self.sock.bind(self.addr)
^^^^^^^^^^^^^^
AttributeError: 'socket' object has no attribute 'bind'
>>> It appears that 'python-3.12.3-r1' is already pretended; skipping.
>>> Remove '/var/tmp/portage/dev-lang/python-3.12.3-r1/.pretended' to force pretend.
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/portage/process.py", line 1442, in _start_fork
target(*args, **kwargs)
File "/usr/lib/python3.12/site-packages/portage/process.py", line 1184, in _exec2
_configure_loopback_interface()
File "/usr/lib/python3.12/site-packages/portage/process.py", line 812, in _configure_loopback_interface
with RtNetlink() as rtnl:
^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/portage/util/netlink.py", line 67, in __init__
self.sock.bind(self.addr)
^^^^^^^^^^^^^^
AttributeError: 'socket' object has no attribute 'bind'
>>> Emerging (1 of 1) dev-lang/python-3.12.3-r1::gentoo
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/portage/process.py", line 1442, in _start_fork
target(*args, **kwargs)
File "/usr/lib/python3.12/site-packages/portage/process.py", line 1184, in _exec2
_configure_loopback_interface()
File "/usr/lib/python3.12/site-packages/portage/process.py", line 812, in _configure_loopback_interface
with RtNetlink() as rtnl:
^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/portage/util/netlink.py", line 67, in __init__
self.sock.bind(self.addr)
^^^^^^^^^^^^^^
AttributeError: 'socket' object has no attribute 'bind'
>>> Failed to emerge dev-lang/python-3.12.3-r1
|
In your description
Code: | [binary R ] dev-lang/python-3.12.3-r1 |
but for me it shows
Code: | [ebuild R ] dev-lang/python-3.12.3-r1 |
Archive /var/cache/binpkgs/dev-lang/python-3.12.3-r1.tbz2 exists. I don't have PKGDIR defined in make.conf |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bstaletic Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 05 Apr 2014 Posts: 310
|
Posted: Tue Jul 16, 2024 11:56 pm Post subject: |
|
|
ferdish wrote: | Looks like I have portage-utils installed.
In your description
Code: | [binary R ] dev-lang/python-3.12.3-r1 |
but for me it shows
Code: | [ebuild R ] dev-lang/python-3.12.3-r1 |
|
That difference between binary and ebuild is important. If it says ebuild, portage will try to compile, which we know does not work.
Try using --usepkgonly instead.
Also what is the output of file /var/cache/binpkgs/dev-lang/python-3.12.3-r1.tbz2?
It should be Code: | /var/cache/binpkgs/dev-lang/python-3.12.3-r1.tbz2: Gentoo binary package (XPAK) | . |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ferdish n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Jun 2024 Posts: 23
|
Posted: Wed Jul 17, 2024 12:08 am Post subject: |
|
|
Code: | # file /var/cache/binpkgs/dev-lang/python-3.12.3-r1.tbz2
/var/cache/binpkgs/dev-lang/python-3.12.3-r1.tbz2: Gentoo binary package (XPAK)
# emerge --usepkgonly -a1 python
...
These are the packages that would be merged, in order:
Calculating dependencies ... done!
Dependency resolution took 4.62 s (backtrack: 0/20).
emerge: there are no binary packages to satisfy "python". |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bstaletic Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 05 Apr 2014 Posts: 310
|
Posted: Wed Jul 17, 2024 4:13 am Post subject: |
|
|
Your portage tree is still in the old location. Maybe other things are pointed to the old paths as well.
Try copying the package to /usr/portage/packages/dev-lang/. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ferdish n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Jun 2024 Posts: 23
|
Posted: Wed Jul 17, 2024 4:19 am Post subject: |
|
|
Code: | # ls -lA /usr/portage/packages/dev-lang/
total 38012
-rw-r--r-- 1 root root 38922935 Jul 16 16:36 python-3.12.3-r1.tbz2
# emerge --usepkgonly -a1 python
...
These are the packages that would be merged, in order:
Calculating dependencies ... done!
Dependency resolution took 4.62 s (backtrack: 0/20).
emerge: there are no binary packages to satisfy "python". |
I copied, so python-3.12.3-r1.tbz2 is in both places. Tried /usr/portage/packages/dev-lang/python and defining PKGDIR in make.conf - same result |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bstaletic Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 05 Apr 2014 Posts: 310
|
Posted: Wed Jul 17, 2024 4:40 am Post subject: |
|
|
You can check where your PKGDIR is with Code: | emerge --info | grep PKGDIR |
But if you can't get that working... options are (in no particular order):
- Try installing the binary with qmerge -KO python:3.12.
- Replace your current _socket.cpython*.so with the one that was compiled, then use ebuild /path/to/ebuild qmerge.
- Just manually copy the files where appropriate - image/* into / and build-info/* into... wherever your portage metadata is located.
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ferdish n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Jun 2024 Posts: 23
|
Posted: Wed Jul 17, 2024 4:53 am Post subject: |
|
|
Code: | # emerge --info | grep PKGDIR
PKGDIR="/var/cache/binpkgs"
# qmerge qmerge -KO python:3.12 # this did the trick!
...
# python -c 'print(__import__("_socket").socket.bind)'
<method 'bind' of '_socket.socket' objects> |
I think the main obstacle is fixed now.
Code: | time emerge --sync && time emerge --update --deep --verbose --with-bdeps=y --newuse --pretend world |
worked. Thank you for your guidance. I would've been lost on my own.
What do I do next? Should I re-emerge portage/python-exec/...? Or is my gentoo completely healed now? (I'm so happy right now) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bstaletic Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 05 Apr 2014 Posts: 310
|
Posted: Wed Jul 17, 2024 5:02 am Post subject: |
|
|
Nice! Everything should be working, but I wouldn't leave it be just yet.
Code: | ebuild /path/to/ebuild configure |
Just to make sure that cpython still can detect bind().
Then, assuming the configure step goes well, consider rebuilding python through emerge.
Shouldn't be necessary, but we have installed the package in a very unusual way and I'm thinking "what if we missed something". |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ferdish n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Jun 2024 Posts: 23
|
Posted: Wed Jul 17, 2024 5:09 am Post subject: |
|
|
Code: |
# rm /var/tmp/portage/dev-lang/python-3.12.3-r1/.configured
# sudo -u portage ebuild /usr/portage/dev-lang/python/python-3.12.3-r1.ebuild configure
...
checking for bind... yes
...
|
worked just fine.
Good idea about re-emerging through emerge. In case it gets broken again it'd be just one last command to fix it. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bstaletic Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 05 Apr 2014 Posts: 310
|
Posted: Wed Jul 17, 2024 1:58 pm Post subject: |
|
|
One more thing. After fixing everything, do emerge -c, to clean up. Also do eclean. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|