Gentoo Archives: gentoo-embedded

From: Jason <gentoo@××××××××××.net>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] asm/page.h: No such file or directory - Link error
Date: Fri, 02 Nov 2007 19:59:08
Message-Id: 472B814A.6090207@lakedaemon.net
In Reply to: Re: [gentoo-embedded] asm/page.h: No such file or directory - Link error by Jean-Claude Gervais
1 Jean-Claude Gervais wrote:
2 > On Thu, 2007-11-01 at 07:25 -0400, Jason wrote:
3 >> Jean-Claude Gervais wrote:
4 >>> On Wed, 2007-10-31 at 20:43 +0100, Pal Szasz wrote:
5 >>>> Just a little addition: there is another flag which might be involved:
6 >>>>
7 >>>> -mfloat-abi=softfp
8 >>>>
9 >>> How do I pass those flags to the compiler by using crossedev?
10 >>>
11 >>> Here's the shell script I am currently using.
12 >>> I changed it to go with Jason's recommended toolset versions but I am
13 >>> still getting the same linking errors about floating-point
14 >>> incompatibilities...
15 >>>
16 >>> .-.-.-.-.-.-.-
17 >>>
18 >>> #!/bin/bash
19 >>>
20 >>> CBUILD="i686-pc-linux-gnu"
21 >>>
22 >>> CHOST=$CBUILD
23 >>>
24 >>> CTARGET="arm-softfloat-linux-uclibc"
25 >>>
26 >>> #export ROOT="/usr/arm-softfloat-linux-uclibc"
27 >>>
28 >>> PORTAGE_CONFIGROOT="/usr/arm-softfloat-linux-uclibc"
29 >>>
30 >>> UCLIBC_CPU="ARM920T" USE="-*" crossdev -v --binutils 2.17 --gcc 3.4.6-r2
31 >>> --kernel 2.6.19-r2 --libc 0.9.28.3 --ex-gdb --target
32 >>> arm-softfloat-linux-uclibc
33 >> before you tried this command, did you delete the old attempt? eg
34 >>
35 >> crossdev -C arm-softfloat-linux-uclibc
36 >>
37 >> Chances are you have stale uclibc files installed from a previous
38 >> attempt that are conflicting with the current attempt.
39 >
40 > You are correct, unmerging the gcc did the trick.
41 >
42 >> Also, make sure you unset PORTAGE_CONFIGROOT, CTARGET, CHOST, and
43 >> CBUILD. Those may foul up crossdev (You're not cross-compiling a
44 >> cross-compiling toolchain are you?). Those variable assignments are for
45 >> _after_ the toolchain is built when you want to use it.
46 >
47 > I'm a bit confused. I had those defined while crossdev was running. It
48 > might explain some of the problems I've had.
49 > From your description, it appears generating the toolset is SIMPLER than
50 > I thought.
51
52 Well, once you figure out the correct version numbers for everything,
53 yes. ;-)
54
55 >
56 > Just to be clear; I am executing the following, is it OK?
57 >
58 > -.-.-.-.-.-.-.-.-.-.-.-.-
59 > SYSROOT="/usr/arm-softfloat-linux-uclibc"
60 > UCLIBC_CPU="ARM920T" USE="-*" crossdev -v -S --gcc 3.4.6-r2 --ex-gdb
61 > --target arm-softfloat-linux-uclibc
62 >
63 > -.-.-.-.-.-.-.-.-.-.-.-.-
64
65 To my knowledge, crossdev doesn't use $SYSROOT. It creates it. So, the
66 SYSROOT is unnecessary, and most likely harmless.
67
68 You probably want to force the version numbers on your binutils, kernel
69 headers, and uclibc. Just because the newest version compiles and
70 installs doesn't means the authors have tested it how you're going to
71 use it. :-)
72
73 > Apart from having to create an empty
74 > $SYSROOT/usr/include/asm/page.h
75 > the toolchain builds.
76 >
77 > I came to a erroneous conclusion of setting CBUILD, CHOST, CTARGET and
78 > PORTAGE_CONFIGROOT during crossdev execution from (mis)reading this
79 > documentation:
80 > http://www.gentoo.org/proj/en/base/embedded/cross-development.xml
81 >
82 > Is this document out of date? It mentions setting the ROOT variable, but
83 > crossdev complained that ROOT was not supported... Maybe ROOT is not
84 > intended to be used with crossedev, in which case it's another
85 > misunderstanding on my part.
86
87 It's not really out of date, it's just difficult to create one set of
88 instructions that work for everybody's unique projects.
89
90 Using crossdev to create a toolchain and cross-compiling are two
91 _totally_ different events. crossdev is creating executables installed
92 to your host's root filesystem designed to run on your host. Therefore,
93 you _don't_ want to set ROOT because then portage would install it
94 someplace else and it wouldn't be in your PATH. Use the variables with
95 xmerge.
96
97 > Is there a document I should read that might help?
98
99 I've found having and expendable box, nightly backups, and a thick skull
100 (for the brick walls) works best. ;-)
101
102
103 > Thank you very much for your help, Jason.
104
105 No problem.
106
107 Jason.
108 --
109 gentoo-embedded@g.o mailing list

Replies

Subject Author
Re: [gentoo-embedded] asm/page.h: No such file or directory - Link error Christopher Friedt <cfriedt@××××××××××××××.com>