Gentoo Archives: gentoo-user

From: Michael Mair-Keimberger <m.mairkeimberger@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] unable to compile kdelibs in arm chroot
Date: Mon, 23 Mar 2015 17:13:18
Message-Id: 20150323171304.GA6140@asterix
In Reply to: Re: [gentoo-user] unable to compile kdelibs in arm chroot by Fernando Rodriguez
1 On Fri, Mar 20, 2015 at 01:17:12PM -0400, Fernando Rodriguez wrote:
2 > On Friday, March 20, 2015 10:15:03 AM Michael Mair-Keimberger wrote:
3 > > On Thu, Mar 19, 2015 at 04:44:55PM -0400, Fernando Rodriguez wrote:
4 > > > On Thursday, March 19, 2015 9:11:02 PM Michael Mair-Keimberger wrote:
5 > > > > Hi List,
6 > > > >
7 > > > > For the last few weeks i was playing around with my newly acquired
8 > > > > raspberry pi 2. While it was pretty easy to setup a working gentoo
9 > > > > stage3 system i failed installing anything below the basic packages.
10 > > > > Generally my idea was building the arm packages on any system and
11 > > > > provide them as binary packages for other raspberry pi's (yeah, i
12 > > > > already bought my second rpi :D)
13 > > > >
14 > > > > At first, my idea was to build all the packages directly on the rpi.
15 > (with
16 > > > > /var/tmp & /usr/portage on a external harddisk). However, the compile
17 > > > > times are worse than i expected so i abandoned the idea.
18 > > > >
19 > > > > Next i've played around with crossdev. It sort of worked, but i never
20 > > > > could finish compiling xorg-server. (or basic system packages) Even
21 > > > > though i've started over and over with different settings, there were
22 > > > > always packages which failed to compile thus doesn't let me finish
23 > > > > xorg-server. I might look into it some other day but now i just wanted
24 > > > > something working.
25 > > > >
26 > > > > Now i'm playing with using qemu-arm [1][2] in order to compile the
27 > > > > packages inside a chroot. This is - so far - the most promising method
28 > > > > building packages, even though the compile times are worse than with
29 > > > > crossdev, but still better than directly on the rpi.
30 > > > >
31 > > > > So far i finally could compile xorg-server and also updated the whole
32 > > > > system, which, at this point, wasn't much anyway. My next goal was kde.
33 > > > > I've compiled about half of all packages which are required for
34 > > > > kdebase-meta, but now i'm stuck at kdelibs and i have no idea what's
35 > > > > wrong.
36 > > > >
37 > > > > The problem:
38 > > > >
39 > > > > The problem is, the compile doesn't fail - it just hangs/stops. At some
40 > > > > point (which seems to be random - it can stop anywhere between 1% and
41 > > > > 100% of the compile) the compile stops and does nothing. I've waited
42 > > > > hours, but nothing happened.
43 > > > > So far i tried lots of things, for example:
44 > > > > * MAKEOPTS="-j1" and/or FEATURES="-sandbox"
45 > > > > * also tried without building binary packages (-buildpkg)
46 > > > > * /var/tmp on tmpfs
47 > > > > * using: ebuild /usr/portage/kde-base/..../kdelibs....ebuild compile
48 > > > > * using python3.3 instead of default 2.7
49 > > > > * moved it on a different system and tried building it there (again with
50 > > > > many different settings)
51 > > > >
52 > > > > Nothing worked, even though the build moved until 100% two times (-_-)
53 > > > >
54 > > > > I have no idea what the problem is. Even qtwebkit, which took way longer
55 > > > > to compile (about 3 hours) compiled on the first try. (which should
56 > > > > exclude temperate and/or resource problems)
57 > > > > I also don't think it's a problem with a use flag as the build stops
58 > > > > anywhere - i couldn't find a pattern. It seems to be completely random.
59 > > > >
60 > > > > Any ideas whats wrong or how to fix this? Any help would be much
61 > > > > appreciated as i'm out of ideas :(
62 > > > >
63 > > > > Thx
64 > > > >
65 > > > > [1] https://www.gentoo.org/proj/en/base/embedded/handbook/?part=1&chap=5
66 > > > > [2] http://wiki.gentoo.org/wiki/Crossdev_qemu-static-user-chroot
67 > > >
68 > > > One possibility is swap trashing (running so low in RAM that every
69 > instruction
70 > > > takes several swaps to execute), especially with /var/tmp on tmpfs! This
71 > can
72 > > > happen even if you don't have a swap partition. Try with either more RAM
73 > or
74 > > > /var/tmp on a physical filesystem.
75 > > >
76 > > Usually /var/tmp is on the physical filesystem anyway. I've tried it
77 > > just once or twice because i though about a performance problem. RAM
78 > > shouldn't be a problem too as i'm having 16GB of RAM available.
79 > > >
80 >
81 > I would tell you to attach a debugger and see if you can tell why it's hanging
82 > but that may not be worth the trouble (since it'll be a child process that's
83 > hanging it'll be tricky to start qemu with the gdb stub just for that
84 > process). If you want to try it see: http://tinkering-is-fun.blogspot.com/2009/12/debugging-non-native-programs-with-qemu.html and
85 > search QEMU_GDB for the tricky part.
86
87 Thanks for the link. I might have a look someday whats happening here as
88 i'm really curious and i really would like to build it over an chroot. I
89 already played around with stracing the "dead" pids but couldn't find any
90 useful information so far.
91 However after being tired of testing around i've decided to take the
92 easy way and compiled kdelibs on the raspberry pi directly. It took me
93 about 3 hours. Thats nothing compared for the hours playing around
94 already :) Interestingly i found that kdelibs isn't the only package
95 which hangs at some point.
96 I've installed kdelibs at my chroot as binary package and tried to
97 continue merging kdebase-meta. But after emerging about 20 other
98 packages, the compile stucked again. This time at kfind. I did the same
99 again (compile on rpi and installed it at my chroot as binary package)
100 and tried to continue again. Next package which stucked was kephal. At
101 this point i decided to merge the rest via the raspberry pi.
102
103
104 >
105 > Have you tried a different qemu version?
106
107 Yep, tried following version:
108
109 app-emulation/qemu-2.1.2
110 app-emulation/qemu-2.2.0
111 app-emulation/qemu-2.2.1
112
113 No differences...
114 >
115 > --
116 > Fernando Rodriguez
117 >
118
119 --
120 greetings
121 Michael

Attachments

File name MIME type
signature.asc application/pgp-signature