[OE-core] sdk path problem

Khem Raj raj.khem at gmail.com
Fri Oct 21 02:27:18 UTC 2011


On Thu, Oct 20, 2011 at 6:57 PM, James Limbouris
<james at digitalmatter.com.au> wrote:
>> -----Original Message-----
>> From: openembedded-core-bounces at lists.openembedded.org
>> [mailto:openembedded-core-bounces at lists.openembedded.org] On Behalf Of
>> Khem Raj
>> Sent: Friday, 21 October 2011 6:49 AM
>> To: Patches and discussions about the oe-core layer
>> Subject: Re: [OE-core] sdk path problem
>>
>> On Thu, Oct 20, 2011 at 3:08 PM, Richard Purdie
>> <richard.purdie at linuxfoundation.org> wrote:
>> > On Thu, 2011-10-20 at 13:24 -0700, Tom Rini wrote:
>> >> On Thu, Oct 20, 2011 at 9:54 AM, Richard Purdie
>> >> <richard.purdie at linuxfoundation.org> wrote:
>> >> > On Thu, 2011-10-20 at 08:22 +0000, James Limbouris wrote:
>> >> >> Hi,
>> >> >>
>> >> >> I have been using meta-toolchain-qte in the past to cross compile a Qt
>> app, and the Linux kernel.
>> >> >> Recently I replaced my old SDK image with a fresh one, and found that I
>> could not link vmlinux anymore.
>> >> >>
>> >> >> When building the kernel, I use the following ('rica' is the distribution
>> name):
>> >> >> export PATH=$PATH:/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-
>> ricasdk-linux/usr/bin/armv5te-rica-linux-gnueabi/
>> >> >> make ARCH=arm CROSS_COMPILE=arm-rica-linux-gnueabi- zImage
>> >> >>
>> >> >> The new error message is:
>> >> >>
>> >> >> Kernel: arch/arm/boot/Image is ready
>> >> >>   AS      arch/arm/boot/compressed/head.o
>> >> >>   GZIP    arch/arm/boot/compressed/piggy.gz
>> >> >>   CC      arch/arm/boot/compressed/misc.o
>> >> >>   AS      arch/arm/boot/compressed/piggy.o
>> >> >>   LD      arch/arm/boot/compressed/vmlinux
>> >> >> arm-rica-linux-gnueabi-ld: cannot find libgcc.a: No such file or directory
>> >> >>
>> >> >> Comparing the build with the old sdk to the build with the new one, I find
>> that the command line for linking has changed from:
>> >> >>
>> >> >> arm-rica-linux-gnueabi-ld -EL --defsym zreladdr=0x80008000 --defsym
>> initrd_phys=0x80800000 --defsym params_phys=0x80000100 -p --no-undefined
>> -X /usr/local/rica-eglibc-i686-armv5te/sysroots/arm-rica-linux-
>> gnueabi/usr/lib/arm-rica-linux-gnueabi/4.5.4/libgcc.a -T
>> arch/arm/boot/compressed/vmlinux.lds arch/arm/boot/compressed/head.o
>> arch/arm/boot/compressed/piggy.o arch/arm/boot/compressed/misc.o -o
>> arch/arm/boot/compressed/vmlinux
>> >> >>
>> >> >> to:
>> >> >>
>> >> >> arm-rica-linux-gnueabi-ld -EL --defsym zreladdr=0x80008000 --defsym
>> initrd_phys=0x80800000 --defsym params_phys=0x80000100 -p --no-undefined
>> -X libgcc.a -T arch/arm/boot/compressed/vmlinux.lds
>> arch/arm/boot/compressed/head.o arch/arm/boot/compressed/piggy.o
>> arch/arm/boot/compressed/misc.o -o arch/arm/boot/compressed/vmlinux
>> >> >>
>> >> >> So libgcc.a has lost its path qualification.
>> >> >> I also straced the two linker commands, and found that they differed in
>> one sequence.
>> >> >>
>> >> >> Old:
>> >> >> lstat64("/usr/local/rica-eglibc-i686-armv5te", {st_mode=S_IFDIR|0755,
>> st_size=4096, ...}) = 0
>> >> >> lstat64("/usr/local/rica-eglibc-i686-armv5te/sysroots",
>> {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
>> >> >> lstat64("/usr/local/rica-eglibc-i686-armv5te/sysroots/arm-rica-linux-
>> gnueabi", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
>> >> >>
>> >> >> New:
>> >> >> lstat64("/usr/local/rica-eglibc-i686-armv5te", {st_mode=S_IFDIR|0755,
>> st_size=4096, ...}) = 0
>> >> >> lstat64("/usr/local/rica-eglibc-i686-armv5te/sysroots",
>> {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
>> >> >> lstat64("/usr/local/rica-eglibc-i686-armv5te/sysroots/arm-rica-linux-
>> gnueabi", 0xbffe67cc) = -1 ENOENT (No such file or directory)
>> >> >>
>> >> >> Both toolchains are looking for a sysroot at 'arm-rica-linux-gnueabi', but
>> the new toolchain should be looking at 'armv5te-rica-linux-gnueabi', as the
>> names have changed.
>> >> >> I'm not yet acquainted with the darker arts of toolchain generation. Can
>> anyone help with this?
>> >> >
>> >> > There should be a --sysroot option being passed to the compiler/linker
>> >> > to tell which sysroot to look at. We did recently change the sysroot
>> >> > location to reflect the target architecture it was optimized for but
>> >> > this does mean the compiler and other tools need the correct sysroot
>> >> > path to be specified. The environment script that ships with the
>> >> > toolchain should do this?
>> >>
>> >> At least not for things like u-boot and the kernel, no, this isn't
>> >> enough.  Just re-confirmed.
>> >
>> > The place I'd start looking is how to ensure the tools get called with
>> > the right flags.
>> >
>> > The end result may be we need to create separate cross bin directories
>> > for each target sysroot with wrapper scripts for the tools to ensure the
>> > right flags get passed. Rather nasty and I'd prefer not to but I don't
>> > see easy alternatives if getting the flags to the tools is a problem.
>>
>> linker also has its own notion of sysroot when invoked bare and I suspect thats
>> coming into play here thats why I asked for build logs.
>
> Hi,
>
> Logs are attached.
> Here are two interesting bits from the configuration:
>
> + gnu-configize
> configure.ac:32: error: Please use exactly Autoconf 2.64 instead of 2.68.
> config/override.m4:12: _GCC_AUTOCONF_VERSION_CHECK is expanded from...
> configure.ac:32: the top level
> autom4te: m4 failed with exit status: 1
>
> Not relevant to the current problem, but I hope it's harmless...

yes it is


>
> And:
> + /home/james/oe/build/tmp-eglibc/work/i686-nativesdk-ricasdk-linux/binutils-cross-canadian-arm-2.21.1a-r1/binutils-2.21.1/configure --build=i686-linux --host=i686-ricasdk-linux --target=arm-rica-linux-gnueabi --prefix=/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/usr --exec_prefix=/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/usr --bindir=/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/usr/bin/armv5te-rica-linux-gnueabi --sbindir=/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/usr/bin/armv5te-rica-linux-gnueabi --libexecdir=/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/usr/libexec/armv5te-rica-linux-gnueabi --datadir=/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/usr/share --sysconfdir=/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/etc --sharedstatedir=/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/com --localstatedir=/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/var --libdir=/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/usr/lib/armv5te-rica-linux-gnueabi --includedir=/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/usr/include --oldincludedir=/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/usr/include --infodir=/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/usr/share/info --mandir=/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/home/james/oe/build/tmp-eglibc/sysroots/i686-ricasdk-linux-nativesdk --with-sysroot=/usr/local/rica-eglibc-i686-armv5te/sysroots/arm-rica-linux-gnueabi --program-prefix=arm-rica-linux-gnueabi- --disable-werror --enable-nls
>
> Where we see that the arm sysroot is misconfigured. (--with-sysroot=/usr/local/rica-eglibc-i686-armv5te/sysroots/arm-rica-linux-gnueabi instead of --with-sysroot=/usr/local/rica-eglibc-i686-armv5te/sysroots/armv5te-rica-linux-gnueabi)
>

correct thats what I expected to be the problem. Can you try this patch
http://paste.ubuntu.com/714780/

and see if it helps ?

> Regards,
> James
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>




More information about the Openembedded-core mailing list