View previous topic :: View next topic |
Author |
Message |
v_andal Guru
Joined: 26 Aug 2008 Posts: 544 Location: Germany
|
Posted: Sun Oct 21, 2018 3:16 pm Post subject: Installing phase of emerge fails |
|
|
I have strange problem. I'm trying to run Gentoo in chroot on Synology. Till recently (at least 3 years long) everything was fine, but about one month ago I did an update and since then I can't install any packages.
At first I thought it could be some problem with switching to new CHOST. So, I've downloaded fresh stage3, unpacked it, chrooted and tried to build simple package. The compilation itself goes without problem, but installation fails again with the same error. Here it is:
Code: |
make[1]: Leaving directory '/var/tmp/portage/dev-libs/libevent-2.1.8/work/libevent-2.1.8-stable-.arm'
ERROR:root:Failed to copy file: _parsed_options=Namespace(group=-1, mode=420, owner=-1, preserve_timestamps=False), source=b'ChangeLog', dest_dir=b'/var/tmp/portage/dev-libs/libevent-2.1.8/image/usr/share/doc/libevent-2.1.8'
Traceback (most recent call last):
File "/usr/lib/portage/python3.6/doins.py", line 209, in run
copyfile(source, dest)
File "/usr/lib/python3.6/site-packages/portage/util/file_copy/__init__.py", line 30, in _optimized_copyfile
_file_copy(src_file.fileno(), dst_file.fileno())
OSError: [Errno 22] Invalid argument
ERROR:root:Failed to copy file: _parsed_options=Namespace(group=-1, mode=420, owner=-1, preserve_timestamps=False), source=b'ChangeLog-1.4', dest_dir=b'/var/tmp/portage/dev-libs/libevent-2.1.8/image/usr/share/doc/libevent-2.1.8'
Traceback (most recent call last):
File "/usr/lib/portage/python3.6/doins.py", line 209, in run
copyfile(source, dest)
File "/usr/lib/python3.6/site-packages/portage/util/file_copy/__init__.py", line 30, in _optimized_copyfile
_file_copy(src_file.fileno(), dst_file.fileno())
OSError: [Errno 22] Invalid argument
ERROR:root:Failed to copy file: _parsed_options=Namespace(group=-1, mode=420, owner=-1, preserve_timestamps=False), source=b'ChangeLog-2.0', dest_dir=b'/var/tmp/portage/dev-libs/libevent-2.1.8/image/usr/share/doc/libevent-2.1.8'
Traceback (most recent call last):
File "/usr/lib/portage/python3.6/doins.py", line 209, in run
copyfile(source, dest)
File "/usr/lib/python3.6/site-packages/portage/util/file_copy/__init__.py", line 30, in _optimized_copyfile
_file_copy(src_file.fileno(), dst_file.fileno())
OSError: [Errno 22] Invalid argument
* ERROR: dev-libs/libevent-2.1.8::gentoo failed (install phase):
* dodoc failed
|
I can only guess, that new portage uses some kernel calls that are not supported by kernel provided by Synology. It runs kernel 3.2.40. So, my question, is there any way to work around this conflict? |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22695
|
Posted: Sun Oct 21, 2018 5:44 pm Post subject: |
|
|
Update to a newer kernel. v3.2.40 was released in March 2013. The v3.2 line is still at least somewhat maintained, with v3.2.102 released June 2018. However, for this purpose, I would suggest updating at least to a kernel whose major version was current when Python 3.6 was released. Preferably, update to a kernel that is still supported upstream.
You could also try using Python2.7 and hope that the dependency was not backported. |
|
Back to top |
|
|
v_andal Guru
Joined: 26 Aug 2008 Posts: 544 Location: Germany
|
Posted: Mon Oct 22, 2018 9:53 am Post subject: |
|
|
I wish I could. Updating Synology kernel is out of my options. They use Linux, but they customize it heavily, so there's no (easy) way to install custom packages. That is why I was using Gentoo in chroot. Well, seems like this option is also a "no-go" now. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22695
|
Posted: Tue Oct 23, 2018 2:03 am Post subject: |
|
|
The core kernel has a strong policy against breaking userspace on upgrades, even when userspace was wrong. Unless the Synology kernel has been badly hacked on, you can probably switch to a newer kernel. If it has been mangled, you should bug your vendor for a kernel update. There have been many security fixes since the version currently installed on that system, so an upgrade is advisable independent of whether it helps here. |
|
Back to top |
|
|
v_andal Guru
Joined: 26 Aug 2008 Posts: 544 Location: Germany
|
Posted: Sat Nov 03, 2018 4:24 pm Post subject: |
|
|
Well, for the time of waiting till Synology updates kernel I've found work-around. It is not perfect since may raise issues when python library is updated, but for the time being it is simple and acceptable.
I've opened file /usr/lib/python3.6/site-packages/portage/util/file_copy/__init__.py and replaced
Code: |
try:
from portage.util.file_copy.reflink_linux import file_copy as _file_copy
except ImportError:
_file_copy = None
|
with
Code: |
#try:
# from portage.util.file_copy.reflink_linux import file_copy as _file_copy
#except ImportError:
_file_copy = None
|
Now I can install packages again. |
|
Back to top |
|
|
torrunes n00b
Joined: 03 Jan 2013 Posts: 7
|
Posted: Fri Dec 21, 2018 2:29 pm Post subject: |
|
|
Just to confirm, I experience the same problem on a 4.9 kernel on a standard Intel Atom x86 machine. This is a 32-bit system, and I get the exact same error on some packages. However it is not always consistent.
I have tested all these portage version: 2.3.8, 2.3.40-r1, 2.3.49, 2.3.51-r1 (default) and 2.3.52-r1.
The only one that works well without a fix is 2.3.8. But that one has other issues like not understanding EAPI7.
Your patch to the python file works also. |
|
Back to top |
|
|
|
|
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
|
|