Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SOLVED: dev-lang/python-3.12.3-r1 sandbox violation
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
eNca
n00b
n00b


Joined: 16 Jan 2017
Posts: 24
Location: Czech Republic

PostPosted: Thu Jul 18, 2024 4:39 pm    Post subject: SOLVED: dev-lang/python-3.12.3-r1 sandbox violation Reply with quote

I have similar issue as discussed in dev-lang/python-3.12.4 build issues thread.

The solution from that thread does not work for me - I have no PYTHONPATH in my emerge --info.

The build log is here: https://pastebin.com/4sZZ3TAF

My emerge --info: https://pastebin.com/rLeP3CDK

The error appeared during regular system update. I already have python 3.12.3 installed, but the upgrade to 3.12.3-r1 failed.

I'm logged in xorg session as regular user and there in terminal window I used `su` command to become root before I started the install.

Any advice will be highly appreciated.

UPDATE:
The issue disappeared after several (not only one) machine restarts and portage tree updates.
Exactly the same version of python (3.12.3-r1) was installed without issue.
The reason is unknown.


Last edited by eNca on Tue Jul 23, 2024 5:36 am; edited 1 time in total
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2397

PostPosted: Thu Jul 18, 2024 6:02 pm    Post subject: Re: dev-lang/python-3.12.3-r1 sandbox violation Reply with quote

eNca wrote:

I'm logged in xorg session as regular user and there in terminal window I used `su` command to become root before I started the install.


Do you have something python related in your regular user's environment? What's the env output from your elevated shell? Su does not elevate you in a clean environment. You need to use `su -` to start a root session with a clean environment.

Best Regards,
Georgi
Back to top
View user's profile Send private message
eNca
n00b
n00b


Joined: 16 Jan 2017
Posts: 24
Location: Czech Republic

PostPosted: Thu Jul 18, 2024 7:50 pm    Post subject: Re: dev-lang/python-3.12.3-r1 sandbox violation Reply with quote

Quote:

Do you have something python related in your regular user's environment? What's the env output from your elevated shell? Su does not elevate you in a clean environment. You need to use `su -` to start a root session with a clean environment.


Yes, I'm working on several projects written in python, but I'm trying to keep this work in virtual environments.

Anyway I tried to use `su -` to create root session for installation - with the same result (sanbox violation).
Then I rebooted the computer and used text console (ctrl+alt+F1) to login directly as root and then tried to run update - still with the same result - sanbox violation.
[/quote]
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2397

PostPosted: Fri Jul 19, 2024 4:47 am    Post subject: Reply with quote

What does

Code:
which python


say?

I'm sorry, I'm not a pythoneer, I hope somebody with more knowledge steps in.

Best Regards,
Georgi
Back to top
View user's profile Send private message
eNca
n00b
n00b


Joined: 16 Jan 2017
Posts: 24
Location: Czech Republic

PostPosted: Fri Jul 19, 2024 5:10 am    Post subject: Reply with quote

logrusx wrote:
What does
Code:
which python

say?


Code:

# which python
/usr/bin/python
# ls -l /usr/bin/python
lrwxrwxrwx 1 root root 13 Mar 24 09:36 /usr/bin/python -> python-exec2c
# equery belongs /usr/bin/python-exec2c
 * Searching for /usr/bin/python-exec2c ...
dev-lang/python-exec-2.4.10 (/usr/bin/python-exec2c)
# python --version
Python 3.12.3


It doesn't seem that I'm using some wrong python. But even if I use some different python - can it cause, that the building process is trying to work outside of sandbox?

Thanks for the effort @logrusx
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2397

PostPosted: Fri Jul 19, 2024 6:55 am    Post subject: Reply with quote

eNca wrote:
But even if I use some different python - can it cause, that the building process is trying to work outside of sandbox?


Portage sets certain environment variables so that it makes sure everything is called inside the sandbox. I'm not sure but I think it uses wrappers too.

And when I'm mentioning environment variables, there's also an environment file next to the build.log, can you upload that too? I'm not sure what the name was, it's either environment something or ends in .env.

Best Regards,
Georgi
Back to top
View user's profile Send private message
eNca
n00b
n00b


Joined: 16 Jan 2017
Posts: 24
Location: Czech Republic

PostPosted: Fri Jul 19, 2024 7:09 am    Post subject: Reply with quote

logrusx wrote:

And when I'm mentioning environment variables, there's also an environment file next to the build.log, can you upload that too? I'm not sure what the name was, it's either environment something or ends in .env.


Here is the content of the environment file: https://pastebin.com/Ki7Z0Vy4
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2397

PostPosted: Fri Jul 19, 2024 10:43 am    Post subject: Reply with quote

eNca wrote:
logrusx wrote:

And when I'm mentioning environment variables, there's also an environment file next to the build.log, can you upload that too? I'm not sure what the name was, it's either environment something or ends in .env.


Here is the content of the environment file: https://pastebin.com/Ki7Z0Vy4


I didn't find anything in particular. I'm pretty certain your portage environment is contaminated somehow, but I don't know which way to find out how. I really hope someone with more knowledge steps int, but my experience here on the forums is most of those people appear hear at least 3-4 hours from now.

p.s. maybe it would be useful to share make.conf, .profile, .bashrc et.c. both for your regular user and root.

Best Regards,
Georgi
Back to top
View user's profile Send private message
eNca
n00b
n00b


Joined: 16 Jan 2017
Posts: 24
Location: Czech Republic

PostPosted: Mon Jul 22, 2024 3:15 pm    Post subject: Reply with quote

logrusx wrote:

I didn't find anything in particular. I'm pretty certain your portage environment is contaminated somehow, but I don't know which way to find out how. I really hope someone with more knowledge steps int, but my experience here on the forums is most of those people appear hear at least 3-4 hours from now.

p.s. maybe it would be useful to share make.conf, .profile, .bashrc et.c. both for your regular user and root.


After several restarts and portage tree updates the issue disappeared. I have no idea why.
Anyway, thanks for your effort.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2397

PostPosted: Mon Jul 22, 2024 4:56 pm    Post subject: Reply with quote

I'm glad you were able to solve the problem. You can now edit your first post and add "solved" in it.

Best Regards,
Georgi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum