Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing phase of emerge fails
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 544
Location: Germany

PostPosted: Sun Oct 21, 2018 3:16 pm    Post subject: Installing phase of emerge fails Reply with quote

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
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22695

PostPosted: Sun Oct 21, 2018 5:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 544
Location: Germany

PostPosted: Mon Oct 22, 2018 9:53 am    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22695

PostPosted: Tue Oct 23, 2018 2:03 am    Post subject: Reply with quote

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
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 544
Location: Germany

PostPosted: Sat Nov 03, 2018 4:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
torrunes
n00b
n00b


Joined: 03 Jan 2013
Posts: 7

PostPosted: Fri Dec 21, 2018 2:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM 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