[yocto] Trying to cross compile Mono - glib link error

autif khan autif.mlist at gmail.com
Sun Nov 13 17:07:46 PST 2011


I bitbaked core-image-sato-sdk

It did not produce a tar.gz of the file system

I improvised and (-o loop) mounted the
core-image-sato-sdk-atom-pc.ext3 at
/home/autif/data/dev/projects/yocto/sysroot

autif at hp8440w:~/data/dev/projects/yocto/sysroot$ ls
bin   dev  home  lost+found  mnt   sbin  tmp  var
boot  etc  lib   media       proc  sys   usr

I changed the environment file as follows (notice how sysroot is
updated for all variables):

export PATH=/opt/poky/1.1/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/poky/1.1/sysroots/x86_64-pokysdk-linux/usr/bin/i586-poky-linux:$PATH
export PKG_CONFIG_SYSROOT_DIR=/home/autif/data/dev/projects/yocto/sysroot
export PKG_CONFIG_PATH=/home/autif/data/dev/projects/yocto/sysroot/usr/lib/pkgconfig
export CONFIG_SITE=/opt/poky/1.1/site-config-i586-poky-linux
export CC=i586-poky-linux-gcc
export CXX=i586-poky-linux-g++
export GDB=i586-poky-linux-gdb
export TARGET_PREFIX=i586-poky-linux-
export CONFIGURE_FLAGS="--target=i586-poky-linux
--host=i586-poky-linux --build=x86_64-linux
--with-libtool-sysroot=/home/autif/data/dev/projects/yocto/sysroot"
export CFLAGS=" -m32   -march=i586
--sysroot=/home/autif/data/dev/projects/yocto/sysroot"
export CXXFLAGS=" -m32   -march=i586
--sysroot=/home/autif/data/dev/projects/yocto/sysroot"
export LDFLAGS="  --sysroot=/home/autif/data/dev/projects/yocto/sysroot"
export CPPFLAGS=" -m32   -march=i586
--sysroot=/home/autif/data/dev/projects/yocto/sysroot"
export OECORE_NATIVE_SYSROOT="/opt/poky/1.1/sysroots/x86_64-pokysdk-linux"
export OECORE_TARGET_SYSROOT="/home/autif/data/dev/projects/yocto/sysroot"
export OECORE_ACLOCAL_OPTS="-I
/opt/poky/1.1/sysroots/x86_64-pokysdk-linux/usr/share/aclocal"
export OECORE_DISTRO_VERSION="1.1"
export OECORE_SDK_VERSION="1.1"

And I am still getting the same error.

LD	test-glib
libtool: link: warning: library
`/opt/poky/1.1/sysroots/i586-poky-linux/usr/lib/libgmodule-2.0.la' was
moved.
libtool: link: cannot find the library `=/usr/lib/libglib-2.0.la' or
unhandled argument `=/usr/lib/libglib-2.0.la'
make[4]: *** [test-glib] Error 1
make[4]: Leaving directory
`/home/autif/data/dev/projects/yocto/mono-2.10.6/eglib/test'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/home/autif/data/dev/projects/yocto/mono-2.10.6/eglib'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/home/autif/data/dev/projects/yocto/mono-2.10.6/eglib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/autif/data/dev/projects/yocto/mono-2.10.6'
make: *** [all] Error 2
Command exited with non-zero status 2
7.05user 1.36system 0:12.62elapsed 66%CPU (0avgtext+0avgdata 60832maxresident)k
0inputs+37504outputs (0major+1185664minor)pagefaults 0swaps
autif at hp8440w:~/data/dev/projects/yocto/mono-2.10.6$ set | grep FLAGS
CFLAGS=' -m32   -march=i586
--sysroot=/home/autif/data/dev/projects/yocto/sysroot'
CONFIGURE_FLAGS='--target=i586-poky-linux --host=i586-poky-linux
--build=x86_64-linux
--with-libtool-sysroot=/home/autif/data/dev/projects/yocto/sysroot'
CPPFLAGS=' -m32   -march=i586
--sysroot=/home/autif/data/dev/projects/yocto/sysroot'
CXXFLAGS=' -m32   -march=i586
--sysroot=/home/autif/data/dev/projects/yocto/sysroot'
LDFLAGS='  --sysroot=/home/autif/data/dev/projects/yocto/sysroot'
autif at hp8440w:~/data/dev/projects/yocto/mono-2.10.6$ set | grep CXX
CXX=i586-poky-linux-g++
CXXFLAGS=' -m32   -march=i586
--sysroot=/home/autif/data/dev/projects/yocto/sysroot'
autif at hp8440w:~/data/dev/projects/yocto/mono-2.10.6$ set | grep CC
CC=i586-poky-linux-gcc
                        SLAVE NONE ACCEPT' -- "$cur" ));
                COMPREPLY=($( compgen -W 'ACCEPT DROP LOG ULOG REJECT \
                    COMPREPLY=($( compgen -W 'ACCEPT DROP LOG ULOG REJECT \
                        COMPREPLY=($( compgen -W 'ACCEPT DROP LOG ULOG REJECT \
autif at hp8440w:~/data/dev/projects/yocto/mono-2.10.6$ ls
/home/autif/data/dev/projects/yocto/sysroot


Please advise. Did I set the environment correctly?

Thanks

Autif


On Thu, Nov 10, 2011 at 11:24 PM, Zhang, Jessica
<jessica.zhang at intel.com> wrote:
> Hi Autif,
>
> It seems the libgmodule-2.0.la is missing from the 1.1 tarball sysroot but I've checked it does exist under the sysroot that extracted from the core-image-sato-sdk image.  So, you have to do the following steps:
> 1. bitbake core-image-sato-sdk
> 2. source the environment-setup script under /opt/poky/1.1
> 3. Run runqemu-extract-sdk against the built out image file, it should be under your .../build/tmp/deploy/image/core-image-sato-sdk.tar.bz2 and the directory you want the sysroot to be extracted to e.g. $HOME/qemux86
> 4. change your sysroot setting to point to the newly created sysroot directory.
>
> Or, you can following the ADT manual and using the part that use adt-installer to setup your cross development environment.
>
> Hope these can get you going.
>
> Jessica
>
> -----Original Message-----
> From: yocto-bounces at yoctoproject.org [mailto:yocto-bounces at yoctoproject.org] On Behalf Of autif khan
> Sent: Thursday, November 10, 2011 6:44 PM
> To: yocto at yoctoproject.org
> Subject: [yocto] Trying to cross compile Mono - glib link error
>
> I followed the instructions and installed the ADT from the 1.1 tarball
> as outlined in documentation. And tested a few simple GTK apps.
> Everything worked well.
>
> After that I am trying to cross compile mono and I am getting the
> following error:
>
> LD      test-glib
> libtool: link: warning: library
> `/opt/poky/1.1/sysroots/i586-poky-linux/usr/lib/libgmodule-2.0.la' was
> moved.
> libtool: link: cannot find the library `=/usr/lib/libglib-2.0.la' or
> unhandled argument `=/usr/lib/libglib-2.0.la'
> make[4]: *** [test-glib] Error 1
> make[4]: Leaving directory
> `/home/autif/data/dev/projects/yocto/mono-2.10.6/eglib/test'
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory
> `/home/autif/data/dev/projects/yocto/mono-2.10.6/eglib'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory
> `/home/autif/data/dev/projects/yocto/mono-2.10.6/eglib'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/autif/data/dev/projects/yocto/mono-2.10.6'
> make: *** [all] Error 2
>
> compiler flags seem to look fine
>
> autif at hp8440w:~/data/dev/projects/yocto/mono-2.10.6$ set | grep LD
> BUILDDIR=/home/autif/data/dev/projects/yocto/poky-edison-6.0/build
> LDFLAGS='  --sysroot=/opt/poky/1.1/sysroots/i586-poky-linux'
> OLDPWD=/home/autif/data/dev/projects/yocto
>
> autif at hp8440w:~/data/dev/projects/yocto/mono-2.10.6$ set | grep CPP
> CPPFLAGS=' -m32   -march=i586 --sysroot=/opt/poky/1.1/sysroots/i586-poky-linux'
>
> autif at hp8440w:~/data/dev/projects/yocto/mono-2.10.6$ set | grep CXX
> CXX=i586-poky-linux-g++
> CXXFLAGS=' -m32   -march=i586 --sysroot=/opt/poky/1.1/sysroots/i586-poky-linux'
>
> autif at hp8440w:~/data/dev/projects/yocto/mono-2.10.6$ set | grep FLAGS
> CFLAGS=' -m32   -march=i586 --sysroot=/opt/poky/1.1/sysroots/i586-poky-linux'
> CONFIGURE_FLAGS='--target=i586-poky-linux --host=i586-poky-linux
> --build=x86_64-linux
> --with-libtool-sysroot=/opt/poky/1.1/sysroots/i586-poky-linux'
> CPPFLAGS=' -m32   -march=i586 --sysroot=/opt/poky/1.1/sysroots/i586-poky-linux'
> CXXFLAGS=' -m32   -march=i586 --sysroot=/opt/poky/1.1/sysroots/i586-poky-linux'
> LDFLAGS='  --sysroot=/opt/poky/1.1/sysroots/i586-poky-linux'
>
> Please advise.
>
> Thanks!
>
> Autif
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>



More information about the yocto mailing list