1 |
hi peter! |
2 |
|
3 |
Am Fri, 14 Oct 2011 13:14:51 +0200 |
4 |
schrieb czernitko <czernitko@×××××.com>: |
5 |
|
6 |
> Hello! |
7 |
> I started playing a little bit with cross compilation for ARM |
8 |
> architecture. Using crossdev I created a toolchain for |
9 |
> arm-none-linux-gnueabi tuple. Now I'd like to emerge some more |
10 |
> packages, but perl constantly refuses to emerge and it is needed by |
11 |
> many packages. For example when running |
12 |
> |
13 |
> # arm-none-linux-gnueabi-emerge -av1 perl |
14 |
> |
15 |
> [ebuild N ] dev-lang/perl-5.12.4-r1 |
16 |
> to /usr/arm-none-linux-gnueabi/ USE="berkdb gdbm -build -debug -doc |
17 |
> -ithreads" 0 kB [ebuild N ] app-admin/perl-cleaner-2.10 |
18 |
> to /usr/arm-none-linux-gnueabi/ 0 kB |
19 |
> |
20 |
> it fails right in configure phase. |
21 |
> Relevant logs are attached, except for configure log which I couldn't |
22 |
> find. |
23 |
> |
24 |
> When I've read through |
25 |
> /usr/arm-none-linux-gnueabi/tmp/portage/dev-lang/perl-5.12.4-r1/work/perl-5.12.4/Cross/README |
26 |
> which is aimed to give more instructions for cross compiling, |
27 |
> I've found out that I should run "make patch && make" from Cross |
28 |
> directory. Unfortunately, I've got no clue how to combine that with |
29 |
> the whole emerge process? |
30 |
|
31 |
there is probably a better way to do this, but it should be possible to |
32 |
make a local overlay and modify the ebuild's src_compile to do emake in |
33 |
the Cross directory. |
34 |
|
35 |
http://devmanual.gentoo.org/ebuild-writing/index.html |
36 |
|
37 |
> I know I could compile it by hand, but then |
38 |
> portage would not know that perl is already installed and it would |
39 |
> try to install it anyway... |
40 |
|
41 |
there are some ways around that, but its still ugly. |
42 |
|
43 |
a lot of the things you are finding out now might be *very* interesting |
44 |
to me in a few months, i am also planning a small project that might |
45 |
include cross compiling to arm. |
46 |
are you documenting your progress somewhere? can you please point me to |
47 |
the documents that helped you put together the cross compilation |
48 |
toolchain? |
49 |
|
50 |
|
51 |
from looking at build.log: |
52 |
|
53 |
> Checking your choice of C compiler and flags for coherency... |
54 |
> I've tried to compile and run the following simple program: |
55 |
> |
56 |
> #include <stdio.h> |
57 |
> int main() { printf("Ok\n"); return(0); } |
58 |
> |
59 |
> I used the command: |
60 |
> |
61 |
> arm-none-linux-gnueabi-gcc -o try -O2 -pipe |
62 |
> -fomit-frame-pointer -I/usr/arm-none-linux-gnueabi/usr/include/ |
63 |
> -I/usr/arm-none-linux-gnueabi/include/ -DOVR_DBL_DIG=14 |
64 |
> -L/usr/arm-none-linux-gnueabi/lib |
65 |
> -L/usr/arm-none-linux-gnueabi/usr/lib -L/usr/local/lib try.c -lnsl |
66 |
> -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat ./try |
67 |
> |
68 |
> and I got the following output: |
69 |
> |
70 |
> /bin/sh: ./try: cannot execute binary file |
71 |
> The program compiled OK, but exited with status 126. |
72 |
|
73 |
that actually sounds like it successfully cross-compiled try.c, but |
74 |
*of course* it does not run on your host platform! that check is |
75 |
probably omitted in Cross/Makefile which might why they are telling you |
76 |
to run that one. |
77 |
|
78 |
> |
79 |
> Any help would be highly appreciated! |
80 |
> Peter |