1 |
On 2017-07-20 06:33, Danny YUE <sheepduke@×××××.com> wrote: |
2 |
> On 2017-07-20 06:25, R0b0t1 <r030t1@×××××.com> wrote: |
3 |
>> On Thu, Jul 20, 2017 at 1:20 AM, Danny YUE <sheepduke@×××××.com> wrote: |
4 |
>>> |
5 |
>>> On 2017-07-20 05:59, R0b0t1 <r030t1@×××××.com> wrote: |
6 |
>>>> On Thu, Jul 20, 2017 at 12:42 AM, Danny YUE <sheepduke@×××××.com> wrote: |
7 |
>>>>> Hi guys, |
8 |
>>>>> |
9 |
>>>>> I am setting up cross compiling environment for my newly bought |
10 |
>>>>> Raspberry Pi 3, under the guide of: |
11 |
>>>>> https://wiki.gentoo.org/wiki/Raspberry_Pi |
12 |
>>>>> https://wiki.gentoo.org/wiki/Raspberry_Pi/Quick_Install_Guide |
13 |
>>>>> |
14 |
>>>>> My original idea was to use crossdev to cross compile packages on my PC |
15 |
>>>>> and install binaries on RPI. |
16 |
>>>>> However I found it really nasty because it kept giving me the error |
17 |
>>>>> message about "libintl: no such file or directory" during compilation of |
18 |
>>>>> packages such as attr, python etc. |
19 |
>>>>> |
20 |
>>>>> And if some (even very few) packages fail to build on the PC, it is |
21 |
>>>>> hardly possible to keep PC and RPI 'consistent'. |
22 |
>>>>> (Yes, I did setup the 'make.profile' symlink to the right place.) |
23 |
>>>>> |
24 |
>>>>> So my question is: |
25 |
>>>>> 1) If some packages are *doomed* to fail, how do you keep the |
26 |
>>>>> emerge world environment consistency between PC and RPI? |
27 |
>>>>> Or is my understanding of this method incorrect? |
28 |
>>>>> |
29 |
>>>> |
30 |
>>>> Match compilation and USE flags. |
31 |
>>>> |
32 |
>>>>> 2) If it is not really a good idea to use crossdev, which one do you |
33 |
>>>>> recommend between distcc and chroot method? |
34 |
>>>>> (I googled but did not really get one answer about compilation speed.) |
35 |
>>>>> |
36 |
>>>> |
37 |
>>>> You should be able to mix crossdev compiled packages freely with |
38 |
>>>> device compiled ones. Incompatible packages will be ignored and it |
39 |
>>>> will try to recompile a package with matching flags, so pay attention. |
40 |
>>>> If you need to compile something on device then I suspect you want to |
41 |
>>>> use distcc if at all possible. |
42 |
>>>> |
43 |
>>> Thanks for your reply. :-) |
44 |
>>> |
45 |
>>> Well, yes. But do you know how is distcc compared with chroot referring |
46 |
>>> to compilation speed? |
47 |
>>> |
48 |
>> |
49 |
>> Using qemu-user to emulate the target architecture and hosting the |
50 |
>> system in a chroot is generally slower than compiling on device, if |
51 |
>> that is what you are referring to. I've read of people who tested this |
52 |
>> with the RPi3 and some Hardkernel devices. |
53 |
> |
54 |
> Oops, really? |
55 |
> I have read of this point of view, too. |
56 |
> But the Wiki page says that it is faster than native compilation on RPI. |
57 |
> |
58 |
> To be honest, I prefer to compile using crossdev... |
59 |
> |
60 |
> Ok then, I will try re-setup crossdev on my PC and see if everything |
61 |
> compiles well. If not, I will post the error message here. |
62 |
> |
63 |
> Thanks. |
64 |
|
65 |
Ok, I am back. |
66 |
|
67 |
This time I purged cross toolchain for Raspberry Pi and started it over |
68 |
again. |
69 |
|
70 |
I ran: |
71 |
$ crossdev -S -v -t armv7a-hardfloat-linux-gnueabi |
72 |
$ cd /usr/aarch64-unknown-linux-gnu/etc/portage |
73 |
$ rm make.profile |
74 |
$ ln -s /usr/portage/profiles/default/linux/arm64/13.0/armv7a make.profile |
75 |
|
76 |
Then I did `armv7a-hardfloat-linux-gnueabi-emerge -auDNU @world`. |
77 |
Most packages succedded to build, but 'util-linux-2.30' failed and gave |
78 |
following messages: |
79 |
|
80 |
--- BEGIN --- |
81 |
/usr/libexec/gcc/armv7a-hardfloat-linux-gnueabi/ld: skipping incompatible /usr/lib64/libncursesw.so when searching for -lncursesw |
82 |
/usr/libexec/gcc/armv7a-hardfloat-linux-gnueabi/ld: skipping incompatible /usr/lib64/libc.so when searching for -lc |
83 |
/usr/lib64/libc.a: error adding symbols: File format not recognized |
84 |
collect2: error: ld returned 1 exit status |
85 |
make[2]: *** [Makefile:7070: ul] Error 1 |
86 |
make[2]: *** Waiting for unfinished jobs.... |
87 |
libtool: link: armv7a-hardfloat-linux-gnueabi-gcc -fsigned-char -fno-common -Wall -Werror=sequence-point -Wextra -Wmissing-declarations -Wmissing-parameter-type -Wmissing-prototypes -Wno-missing-field-initializers -Wredundant-decls -Wsign-compare -Wtype-limits -Wuninitialized -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-parameter -Wunused-result -Wunused-variable -Wnested-externs -Wpointer-arith -Wstrict-prototypes -Wformat-security -Wimplicit-function-declaration -O2 -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -Wl,-O1 -o setsid sys-utils/setsid.o -Wl,--as-needed |
88 |
libtool: link: armv7a-hardfloat-linux-gnueabi-gcc -fsigned-char -fno-common -Wall -Werror=sequence-point -Wextra -Wmissing-declarations -Wmissing-parameter-type -Wmissing-prototypes -Wno-missing-field-initializers -Wredundant-decls -Wsign-compare -Wtype-limits -Wuninitialized -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-parameter -Wunused-result -Wunused-variable -Wnested-externs -Wpointer-arith -Wstrict-prototypes -Wformat-security -Wimplicit-function-declaration -O2 -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -Wl,-O1 -o setarch sys-utils/setarch.o -Wl,--as-needed |
89 |
make[2]: Leaving directory '/usr/armv7a-hardfloat-linux-gnueabi/tmp/portage/sys-apps/util-linux-2.30/work/util-linux-2.30-.arm' |
90 |
make[1]: *** [Makefile:11718: all-recursive] Error 1 |
91 |
make[1]: Leaving directory '/usr/armv7a-hardfloat-linux-gnueabi/tmp/portage/sys-apps/util-linux-2.30/work/util-linux-2.30-.arm' |
92 |
make: *** [Makefile:4913: all] Error 2 |
93 |
--- END --- |
94 |
|
95 |
Did I do anything wrong? |
96 |
|
97 |
Please let me know if any further information is needed. |
98 |
|
99 |
Thanks. |
100 |
|
101 |
Danny |