All of lore.kernel.org
 help / color / mirror / Atom feed
* Issue of Yocto multilib sdk
@ 2013-06-19  9:02 Kumita Bruce
  2013-07-26 12:36 ` Alexandru-Cezar Sardan
  0 siblings, 1 reply; 5+ messages in thread
From: Kumita Bruce @ 2013-06-19  9:02 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 3986 bytes --]

Hi experts,

I use Yocto to generate multilib sdk, I append following content in my
local.conf.
    require conf/multilib.conf
    MULTILIBS = "multilib:lib64"
    DEFAULTTUNE_virtclass-multilib-lib64 = "x86-64"

    IMAGE_INSTALL_append = " \
        ${@multilib_pkg_extend(d, "binutils")} \
        ${@multilib_pkg_extend(d, "eglibc")} \
        ${@multilib_pkg_extend(d, "eglibc-dev")} \
        ${@multilib_pkg_extend(d, "eglibc-staticdev")} \
        ${@multilib_pkg_extend(d, "gcc")} \
        ${@multilib_pkg_extend(d, "glib-2.0")} \
        ${@multilib_pkg_extend(d, "glib-2.0-dev")} \
        ${@multilib_pkg_extend(d, "libgcc-dev")} \
        ${@multilib_pkg_extend(d, "libstdc++")} \
        ${@multilib_pkg_extend(d, "libstdc++-dev")} \
        ${@multilib_pkg_extend(d, "libstdc++-staticdev")} \
    "

The sdk is generated successfully, I
installed poky-eglibc-x86_64-i586-toolchain-gmae-1.4+snapshot-20130619.sh
in the default path(/opt/poky/1.4+snapshot/).
1. 32bit build for my test C program, it passed,
    $ source /opt/poky/1.4+snapshot/environment-setup-i586-poky-linux
    $ $CC mytest.c -o mytest.c
2. 64bit build for the same test C program, it failed.
    $
source /opt/poky/1.4+snapshot/environment-setup-x86_64-pokymllib64-linux
    $ $CC mytest.c -o mytest
/opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld:
cannot find crtbegin.o: No such file or directory
/opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld:
cannot find -lgcc
/opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld:
skipping incompatible
/opt/poky/1.4+snapshot/sysroots/i586-poky-linux/lib/libgcc_s.so when
searching for -lgcc_s
/opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld:
skipping incompatible
/opt/poky/1.4+snapshot/sysroots/i586-poky-linux/lib/libgcc_s.so when
searching for -lgcc_s
/opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld:
cannot find -lgcc_s
/opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld:
skipping incompatible
/opt/poky/1.4+snapshot/sysroots/i586-poky-linux/usr/lib/libc.so when
searching for -lc
/opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld:
skipping incompatible
/opt/poky/1.4+snapshot/sysroots/i586-poky-linux/usr/lib/libc.so when
searching for -lc
/opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld:
cannot find -lc
/opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld:
cannot find -lgcc
/opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld:
skipping incompatible
/opt/poky/1.4+snapshot/sysroots/i586-poky-linux/lib/libgcc_s.so when
searching for -lgcc_s
/opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld:
skipping incompatible
/opt/poky/1.4+snapshot/sysroots/i586-poky-linux/lib/libgcc_s.so when
searching for -lgcc_s
/opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld:
cannot find -lgcc_s
/opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld:
cannot find crtend.o: No such file or directory
collect2: error: ld returned 1 exit status

Am I missing something?


Cheers,

Bruce

[-- Attachment #2: Type: text/html, Size: 4765 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Issue of Yocto multilib sdk
  2013-06-19  9:02 Issue of Yocto multilib sdk Kumita Bruce
@ 2013-07-26 12:36 ` Alexandru-Cezar Sardan
  2013-07-26 13:56   ` Laurentiu Palcu
  0 siblings, 1 reply; 5+ messages in thread
From: Alexandru-Cezar Sardan @ 2013-07-26 12:36 UTC (permalink / raw)
  To: openembedded-core

 
> Hi experts, 
> 
> I use Yocto to generate multilib sdk, I append following content in my 
local.conf. 
> 
>     require conf/multilib.conf
>     MULTILIBS = "multilib:lib64"
>     DEFAULTTUNE_virtclass-multilib-lib64 = "x86-64"
> 
>     IMAGE_INSTALL_append = " \
>         ${ <at> multilib_pkg_extend(d, "binutils")} \
> 
> 
>         ${ <at> multilib_pkg_extend(d, "eglibc")} \
> 
>         ${ <at> multilib_pkg_extend(d, "eglibc-dev")} \
>         ${ <at> multilib_pkg_extend(d, "eglibc-staticdev")} \
> 
>         ${ <at> multilib_pkg_extend(d, "gcc")} \
> 
>         ${ <at> multilib_pkg_extend(d, "glib-2.0")} \
>         ${ <at> multilib_pkg_extend(d, "glib-2.0-dev")} \
> 
>         ${ <at> multilib_pkg_extend(d, "libgcc-dev")} \
>         ${ <at> multilib_pkg_extend(d, "libstdc++")} \
> 
>         ${ <at> multilib_pkg_extend(d, "libstdc++-dev")} \
>         ${ <at> multilib_pkg_extend(d, "libstdc++-staticdev")} \
>     "
> 
> 
> 
> The sdk is generated successfully, I installed poky-eglibc-x86_64-i586-
toolchain-gmae-1.4+snapshot-20130619.sh in the default 
path(/opt/poky/1.4+snapshot/). 
> 
> 1. 32bit build for my test C program, it passed,
>     $ source /opt/poky/1.4+snapshot/environment-setup-i586-poky-linux
>     $ $CC mytest.c -o mytest.c
> 2. 64bit build for the same test C program, it failed.
>     $ source /opt/poky/1.4+snapshot/environment-setup-x86_64-pokymllib64-
linux
>     $ $CC mytest.c -o mytest
> /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: cannot find 
crtbegin.o: No such file or directory
> /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: cannot find -lgcc
> /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: skipping 
incompatible /opt/poky/1.4+snapshot/sysroots/i586-poky-linux/lib/libgcc_s.so 
when searching for -lgcc_s
> /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: skipping 
incompatible /opt/poky/1.4+snapshot/sysroots/i586-poky-linux/lib/libgcc_s.so 
when searching for -lgcc_s
> /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: cannot find -lgcc_s
> /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: skipping 
incompatible /opt/poky/1.4+snapshot/sysroots/i586-poky-linux/usr/lib/libc.so 
when searching for -lc
> /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: skipping 
incompatible /opt/poky/1.4+snapshot/sysroots/i586-poky-linux/usr/lib/libc.so 
when searching for -lc
> /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: cannot find -lc
> /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: cannot find -lgcc
> /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: skipping 
incompatible /opt/poky/1.4+snapshot/sysroots/i586-poky-linux/lib/libgcc_s.so 
when searching for -lgcc_s
> /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: skipping 
incompatible /opt/poky/1.4+snapshot/sysroots/i586-poky-linux/lib/libgcc_s.so 
when searching for -lgcc_s
> /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: cannot find -lgcc_s
> /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: cannot find 
crtend.o: No such file or directory
> collect2: error: ld returned 1 exit status
> 
> Am I missing something? 
> 
> 
> Cheers, 
> 
> Bruce
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@...
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
> 

I am experiencing the same issue with poky-dylan-9.0.0.
Can someone please help with this problem?

Kind regards,
Alex



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Issue of Yocto multilib sdk
  2013-07-26 12:36 ` Alexandru-Cezar Sardan
@ 2013-07-26 13:56   ` Laurentiu Palcu
  2013-08-02 10:10     ` Sardan Alexandru Cezar-B41700
  0 siblings, 1 reply; 5+ messages in thread
From: Laurentiu Palcu @ 2013-07-26 13:56 UTC (permalink / raw)
  To: Alexandru-Cezar Sardan; +Cc: openembedded-core

On Fri, Jul 26, 2013 at 12:36:21PM +0000, Alexandru-Cezar Sardan wrote:
>  
> > Hi experts, 
> > 
> > I use Yocto to generate multilib sdk, I append following content in my 
> local.conf. 
> > 
> >     require conf/multilib.conf
> >     MULTILIBS = "multilib:lib64"
> >     DEFAULTTUNE_virtclass-multilib-lib64 = "x86-64"
> > 
> >     IMAGE_INSTALL_append = " \
> >         ${ <at> multilib_pkg_extend(d, "binutils")} \
> > 
> > 
> >         ${ <at> multilib_pkg_extend(d, "eglibc")} \
> > 
> >         ${ <at> multilib_pkg_extend(d, "eglibc-dev")} \
> >         ${ <at> multilib_pkg_extend(d, "eglibc-staticdev")} \
> > 
> >         ${ <at> multilib_pkg_extend(d, "gcc")} \
> > 
> >         ${ <at> multilib_pkg_extend(d, "glib-2.0")} \
> >         ${ <at> multilib_pkg_extend(d, "glib-2.0-dev")} \
> > 
> >         ${ <at> multilib_pkg_extend(d, "libgcc-dev")} \
> >         ${ <at> multilib_pkg_extend(d, "libstdc++")} \
> > 
> >         ${ <at> multilib_pkg_extend(d, "libstdc++-dev")} \
> >         ${ <at> multilib_pkg_extend(d, "libstdc++-staticdev")} \
> >     "
> > 
> > 
> > 
> > The sdk is generated successfully, I installed poky-eglibc-x86_64-i586-
> toolchain-gmae-1.4+snapshot-20130619.sh in the default 
> path(/opt/poky/1.4+snapshot/). 
> > 
> > 1. 32bit build for my test C program, it passed,
> >     $ source /opt/poky/1.4+snapshot/environment-setup-i586-poky-linux
> >     $ $CC mytest.c -o mytest.c
> > 2. 64bit build for the same test C program, it failed.
> >     $ source /opt/poky/1.4+snapshot/environment-setup-x86_64-pokymllib64-
> linux
> >     $ $CC mytest.c -o mytest
> > /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
> pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: cannot find 
> crtbegin.o: No such file or directory
> > /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
> pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: cannot find -lgcc
> > /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
> pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: skipping 
> incompatible /opt/poky/1.4+snapshot/sysroots/i586-poky-linux/lib/libgcc_s.so 
> when searching for -lgcc_s
> > /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
> pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: skipping 
> incompatible /opt/poky/1.4+snapshot/sysroots/i586-poky-linux/lib/libgcc_s.so 
> when searching for -lgcc_s
> > /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
> pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: cannot find -lgcc_s
> > /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
> pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: skipping 
> incompatible /opt/poky/1.4+snapshot/sysroots/i586-poky-linux/usr/lib/libc.so 
> when searching for -lc
> > /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
> pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: skipping 
> incompatible /opt/poky/1.4+snapshot/sysroots/i586-poky-linux/usr/lib/libc.so 
> when searching for -lc
> > /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
> pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: cannot find -lc
> > /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
> pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: cannot find -lgcc
> > /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
> pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: skipping 
> incompatible /opt/poky/1.4+snapshot/sysroots/i586-poky-linux/lib/libgcc_s.so 
> when searching for -lgcc_s
> > /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
> pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: skipping 
> incompatible /opt/poky/1.4+snapshot/sysroots/i586-poky-linux/lib/libgcc_s.so 
> when searching for -lgcc_s
> > /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
> pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: cannot find -lgcc_s
> > /opt/poky/1.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-
> pokymllib64-linux/gcc/x86_64-pokymllib64-linux/4.7.2/ld: cannot find 
> crtend.o: No such file or directory
> > collect2: error: ld returned 1 exit status
> > 
> > Am I missing something?

There could be several issues here:
1. default library path for 64bit is wrong... You can inspect it by
looking at SEARCH_DIR in the linker script. Just run:

$CC -o mytest -Wl,-verbose mytest.c

Then you can try to set the library path explicitly with -L. See if it
works.

2. you don't have the 64bit libraries and it falls back to looking into
/lib or /usr/lib which contain the 32bit libraries...

Do you have any lib64/ usr/lib64/ in your target sysroot?

Thanks,
Laurentiu
 
> > 
> > 
> > Cheers, 
> > 
> > Bruce
> > 
> > 
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@...
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
> > 
> 
> I am experiencing the same issue with poky-dylan-9.0.0.
> Can someone please help with this problem?
> 
> Kind regards,
> Alex
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Issue of Yocto multilib sdk
  2013-07-26 13:56   ` Laurentiu Palcu
@ 2013-08-02 10:10     ` Sardan Alexandru Cezar-B41700
  2013-08-02 15:47       ` Mark Hatle
  0 siblings, 1 reply; 5+ messages in thread
From: Sardan Alexandru Cezar-B41700 @ 2013-08-02 10:10 UTC (permalink / raw)
  To: Laurentiu Palcu; +Cc: openembedded-core

> 
> There could be several issues here:
> 1. default library path for 64bit is wrong... You can inspect it by
> looking at SEARCH_DIR in the linker script. Just run:
> 
> $CC -o mytest -Wl,-verbose mytest.c
> 
> Then you can try to set the library path explicitly with -L. See if it
> works.
> 
> 2. you don't have the 64bit libraries and it falls back to looking into
> /lib or /usr/lib which contain the 32bit libraries...
> 
> Do you have any lib64/ usr/lib64/ in your target sysroot?
> 

[Alex Sardan] Yes, it seems that the 64bit libraries are not being 
installed in the sysroot.
What is the right way of adding them? I tried adding libgcc to 
MULTILIB_IMAGE_INSTALL but it doesn't do the trick.

Thanks,
Alex



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Issue of Yocto multilib sdk
  2013-08-02 10:10     ` Sardan Alexandru Cezar-B41700
@ 2013-08-02 15:47       ` Mark Hatle
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Hatle @ 2013-08-02 15:47 UTC (permalink / raw)
  To: openembedded-core

On 8/2/13 5:10 AM, Sardan Alexandru Cezar-B41700 wrote:
>>
>> There could be several issues here:
>> 1. default library path for 64bit is wrong... You can inspect it by
>> looking at SEARCH_DIR in the linker script. Just run:
>>
>> $CC -o mytest -Wl,-verbose mytest.c
>>
>> Then you can try to set the library path explicitly with -L. See if it
>> works.
>>
>> 2. you don't have the 64bit libraries and it falls back to looking into
>> /lib or /usr/lib which contain the 32bit libraries...
>>
>> Do you have any lib64/ usr/lib64/ in your target sysroot?
>>
>
> [Alex Sardan] Yes, it seems that the 64bit libraries are not being
> installed in the sysroot.
> What is the right way of adding them? I tried adding libgcc to
> MULTILIB_IMAGE_INSTALL but it doesn't do the trick.

By default all libraries end up in 'lib' (no suffix).  When you enable the 
multilib support, the lib directory depends on the multilib you are compiling 
(and installing).

i.e.:
MACHINE = "<some 64bit ppc capable machine>"

require conf/multilib.conf
DEFAULTTUNE = "ppc"
MULTILIBS = "multilib:lib64"
DEFAULTTUNE_virtclass-multilib-lib64 = "ppc64"


If you enable the multilib support, and then build with:

bitbake lib64-core-image-minimal  -- you should see an all 'lib64' 
core-image-minimal (assuming lib64 is your alternative library name)

IMAGE_INSTALL_append = " lib64-bash"

Should switch bash to being the 64-bit version, and install all of the necessary 
libraries -- in addition to the 32-bit items being default.

--Mark

> Thanks,
> Alex
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-08-02 15:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-19  9:02 Issue of Yocto multilib sdk Kumita Bruce
2013-07-26 12:36 ` Alexandru-Cezar Sardan
2013-07-26 13:56   ` Laurentiu Palcu
2013-08-02 10:10     ` Sardan Alexandru Cezar-B41700
2013-08-02 15:47       ` Mark Hatle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.