All of lore.kernel.org
 help / color / mirror / Atom feed
* Image lacks libraries needed by SDK
@ 2017-06-13 23:24 Paul D. DeRocco
  2017-06-14  1:01 ` Andre McCurdy
  2017-06-14  8:22 ` Maxin B. John
  0 siblings, 2 replies; 10+ messages in thread
From: Paul D. DeRocco @ 2017-06-13 23:24 UTC (permalink / raw)
  To: yocto

I have a working system image for my 32-bit Atom-based hardware, based on
Morty. My application is a C++ program that runs as a systemd service.
I've always built the application outside Yocto, using the Eclipse CDT and
whatever GCC was on my Ubuntu system. It gets installed into my hardware
on a separate partition, but runs fine because my build host and target
are both x86 machines.

In order to try out the much more recent compiler in the Yocto SDK (and to
prepare for converting to a different architecture in the future), I built
a standard SDK by using do_populate_sdk on my image. I managed to modify
my project to use the toolchain and libraries in the sysroot in the SDK,
and it successfully produces an executable. But when I copy this into my
system, it barfs because there is no libstdc++.o (and perhaps other
libraries) on my system. And there is no libstdc++.a in the SDK.

Why would the SDK, built against a particular image, not include the same
shared libraries as that image? I noticed that when I built an SDK under
core-image-minimal, it didn't include libasound, but that was included
when I built it under my own image which includes ALSA. So it's obviously
paying attention to what's in the image. So is there some package I need
to include in my image to complete the set of libraries to match what's in
the SDK?

-- 

Ciao,               Paul D. DeRocco
Paul                mailto:pderocco@ix.netcom.com



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

* Re: Image lacks libraries needed by SDK
  2017-06-13 23:24 Image lacks libraries needed by SDK Paul D. DeRocco
@ 2017-06-14  1:01 ` Andre McCurdy
  2017-06-14  1:17   ` Paul D. DeRocco
  2017-06-14  8:22 ` Maxin B. John
  1 sibling, 1 reply; 10+ messages in thread
From: Andre McCurdy @ 2017-06-14  1:01 UTC (permalink / raw)
  To: Paul D. DeRocco; +Cc: Yocto discussion list

On Tue, Jun 13, 2017 at 4:24 PM, Paul D. DeRocco <pderocco@ix.netcom.com> wrote:
> I have a working system image for my 32-bit Atom-based hardware, based on
> Morty. My application is a C++ program that runs as a systemd service.
> I've always built the application outside Yocto, using the Eclipse CDT and
> whatever GCC was on my Ubuntu system. It gets installed into my hardware
> on a separate partition, but runs fine because my build host and target
> are both x86 machines.
>
> In order to try out the much more recent compiler in the Yocto SDK (and to
> prepare for converting to a different architecture in the future), I built
> a standard SDK by using do_populate_sdk on my image. I managed to modify
> my project to use the toolchain and libraries in the sysroot in the SDK,
> and it successfully produces an executable. But when I copy this into my
> system, it barfs because there is no libstdc++.o (and perhaps other
> libraries) on my system. And there is no libstdc++.a in the SDK.
>
> Why would the SDK, built against a particular image, not include the same
> shared libraries as that image?

The SDK explicitly includes various gcc-runtime packages (including
libstdc++) via packagegroup-core-standalone-sdk-target, whereas an
image will only include libstdc++ if something else in the image has a
runtime dependency on it (e.g. a c++ application, etc).

> I noticed that when I built an SDK under
> core-image-minimal, it didn't include libasound, but that was included
> when I built it under my own image which includes ALSA. So it's obviously
> paying attention to what's in the image. So is there some package I need
> to include in my image to complete the set of libraries to match what's in
> the SDK?

Not directly. You could add packagegroup-core-standalone-sdk-target to
the image, but then you'd get the corresponding -dev packages too
(header files, etc). Your best bet may be to add libstdc++ plus any
other individual packages to the image as you find you need them.

>
> --
>
> Ciao,               Paul D. DeRocco
> Paul                mailto:pderocco@ix.netcom.com
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


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

* Re: Image lacks libraries needed by SDK
  2017-06-14  1:01 ` Andre McCurdy
@ 2017-06-14  1:17   ` Paul D. DeRocco
  0 siblings, 0 replies; 10+ messages in thread
From: Paul D. DeRocco @ 2017-06-14  1:17 UTC (permalink / raw)
  To: 'Andre McCurdy'; +Cc: 'Yocto discussion list'

> From: Andre McCurdy [mailto:armccurdy@gmail.com] 
> 
> > I noticed that when I built an SDK under
> > core-image-minimal, it didn't include libasound, but that 
> > was included
> > when I built it under my own image which includes ALSA. So 
> > it's obviously
> > paying attention to what's in the image. So is there some 
> > package I need
> > to include in my image to complete the set of libraries to 
> > match what's in
> > the SDK?
> 
> Not directly. You could add packagegroup-core-standalone-sdk-target to
> the image, but then you'd get the corresponding -dev packages too
> (header files, etc). Your best bet may be to add libstdc++ plus any
> other individual packages to the image as you find you need them.

That was pretty painless. It turned out that was the only missing library. Thanks.

-- 

Ciao,               Paul D. DeRocco
Paul                mailto:pderocco@ix.netcom.com



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

* Re: Image lacks libraries needed by SDK
  2017-06-13 23:24 Image lacks libraries needed by SDK Paul D. DeRocco
  2017-06-14  1:01 ` Andre McCurdy
@ 2017-06-14  8:22 ` Maxin B. John
  2017-06-14  8:34   ` Paul D. DeRocco
  2017-06-14  9:20   ` Anders Darander
  1 sibling, 2 replies; 10+ messages in thread
From: Maxin B. John @ 2017-06-14  8:22 UTC (permalink / raw)
  To: Paul D. DeRocco; +Cc: yocto

Hi Paul,

On Tue, Jun 13, 2017 at 04:24:38PM -0700, Paul D. DeRocco wrote:
> I have a working system image for my 32-bit Atom-based hardware, based on
> Morty. My application is a C++ program that runs as a systemd service.
> I've always built the application outside Yocto, using the Eclipse CDT and
> whatever GCC was on my Ubuntu system. It gets installed into my hardware
> on a separate partition, but runs fine because my build host and target
> are both x86 machines.
> 
> In order to try out the much more recent compiler in the Yocto SDK (and to
> prepare for converting to a different architecture in the future), I built
> a standard SDK by using do_populate_sdk on my image. I managed to modify
> my project to use the toolchain and libraries in the sysroot in the SDK,
> and it successfully produces an executable. But when I copy this into my
> system, it barfs because there is no libstdc++.o (and perhaps other
> libraries) on my system. And there is no libstdc++.a in the SDK.

Had a similar experience with respect to the availability of static libraries
in the SDK.

https://bugzilla.yoctoproject.org/show_bug.cgi?id=5347

One way to fix this will be to include required static libraries in the image
before building SDK - eg: for glibc static development libraries:

IMAGE_INSTALL_append = " glibc-staticdev"

http://www.yoctoproject.org/docs/2.3/mega-manual/mega-manual.html#sdk-building-an-sdk-installer

> Why would the SDK, built against a particular image, not include the same
> shared libraries as that image? I noticed that when I built an SDK under
> core-image-minimal, it didn't include libasound, but that was included
> when I built it under my own image which includes ALSA. So it's obviously
> paying attention to what's in the image. So is there some package I need
> to include in my image to complete the set of libraries to match what's in
> the SDK?
> 
> -- 
> 
> Ciao,               Paul D. DeRocco
> Paul                mailto:pderocco@ix.netcom.com

Best Regards,
Maxin


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

* Re: Image lacks libraries needed by SDK
  2017-06-14  8:22 ` Maxin B. John
@ 2017-06-14  8:34   ` Paul D. DeRocco
  2017-06-14  9:04     ` Maxin B. John
  2017-06-14  9:20   ` Anders Darander
  1 sibling, 1 reply; 10+ messages in thread
From: Paul D. DeRocco @ 2017-06-14  8:34 UTC (permalink / raw)
  To: 'Maxin B. John'; +Cc: yocto

> From: Maxin B. John [mailto:maxin.john@intel.com] 
> 
> Had a similar experience with respect to the availability of 
> static libraries in the SDK.
> 
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=5347
> 
> One way to fix this will be to include required static 
> libraries in the image
> before building SDK - eg: for glibc static development libraries:
> 
> IMAGE_INSTALL_append = " glibc-staticdev"

Does that include the .a files in the image or the SDK or both?

-- 

Ciao,               Paul D. DeRocco
Paul                mailto:pderocco@ix.netcom.com



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

* Re: Image lacks libraries needed by SDK
  2017-06-14  8:34   ` Paul D. DeRocco
@ 2017-06-14  9:04     ` Maxin B. John
  0 siblings, 0 replies; 10+ messages in thread
From: Maxin B. John @ 2017-06-14  9:04 UTC (permalink / raw)
  To: Paul D. DeRocco; +Cc: yocto

Hi,

On Wed, Jun 14, 2017 at 01:34:40AM -0700, Paul D. DeRocco wrote:
> > From: Maxin B. John [mailto:maxin.john@intel.com] 
> > 
> > Had a similar experience with respect to the availability of 
> > static libraries in the SDK.
> > 
> > https://bugzilla.yoctoproject.org/show_bug.cgi?id=5347
> > 
> > One way to fix this will be to include required static 
> > libraries in the image
> > before building SDK - eg: for glibc static development libraries:
> > 
> > IMAGE_INSTALL_append = " glibc-staticdev"
> 
> Does that include the .a files in the image or the SDK or both?
>

The corresponding .a files will be present in the image and SDK.

> 
> Ciao,               Paul D. DeRocco
> Paul                mailto:pderocco@ix.netcom.com
Warm Regards,
Maxin


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

* Re: Image lacks libraries needed by SDK
  2017-06-14  8:22 ` Maxin B. John
  2017-06-14  8:34   ` Paul D. DeRocco
@ 2017-06-14  9:20   ` Anders Darander
  2017-06-14 10:44     ` Maxin B. John
  2017-06-14 10:46     ` do_rootfs failed with message about host system(?) locale Dvorkin Dmitry
  1 sibling, 2 replies; 10+ messages in thread
From: Anders Darander @ 2017-06-14  9:20 UTC (permalink / raw)
  To: yocto

* Maxin B. John <maxin.john@intel.com> [170614 10:24]:

> Hi Paul,

> On Tue, Jun 13, 2017 at 04:24:38PM -0700, Paul D. DeRocco wrote:
> > In order to try out the much more recent compiler in the Yocto SDK (and to
> > prepare for converting to a different architecture in the future), I built
> > a standard SDK by using do_populate_sdk on my image. I managed to modify
> > my project to use the toolchain and libraries in the sysroot in the SDK,
> > and it successfully produces an executable. But when I copy this into my
> > system, it barfs because there is no libstdc++.o (and perhaps other
> > libraries) on my system. And there is no libstdc++.a in the SDK.

> Had a similar experience with respect to the availability of static libraries
> in the SDK.

> https://bugzilla.yoctoproject.org/show_bug.cgi?id=5347

> One way to fix this will be to include required static libraries in the image
> before building SDK - eg: for glibc static development libraries:

> IMAGE_INSTALL_append = " glibc-staticdev"

Why install it to the image? 

TOOLCHAIN_TARGET_TASK_append = " glibc-staticdev"

would be better, as it'll only add this package to the SDK.

Cheers,
Anders

-- 
Anders Darander, Senior System Architect
ChargeStorm AB / eStorm AB


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

* Re: Image lacks libraries needed by SDK
  2017-06-14  9:20   ` Anders Darander
@ 2017-06-14 10:44     ` Maxin B. John
  2017-06-14 10:46     ` do_rootfs failed with message about host system(?) locale Dvorkin Dmitry
  1 sibling, 0 replies; 10+ messages in thread
From: Maxin B. John @ 2017-06-14 10:44 UTC (permalink / raw)
  To: yocto

Hi Anders,

On Wed, Jun 14, 2017 at 11:20:57AM +0200, Anders Darander wrote:
> * Maxin B. John <maxin.john@intel.com> [170614 10:24]:
> 
> > Hi Paul,
> 
> > On Tue, Jun 13, 2017 at 04:24:38PM -0700, Paul D. DeRocco wrote:
> > > In order to try out the much more recent compiler in the Yocto SDK (and to
> > > prepare for converting to a different architecture in the future), I built
> > > a standard SDK by using do_populate_sdk on my image. I managed to modify
> > > my project to use the toolchain and libraries in the sysroot in the SDK,
> > > and it successfully produces an executable. But when I copy this into my
> > > system, it barfs because there is no libstdc++.o (and perhaps other
> > > libraries) on my system. And there is no libstdc++.a in the SDK.
> 
> > Had a similar experience with respect to the availability of static libraries
> > in the SDK.
> 
> > https://bugzilla.yoctoproject.org/show_bug.cgi?id=5347
> 
> > One way to fix this will be to include required static libraries in the image
> > before building SDK - eg: for glibc static development libraries:
> 
> > IMAGE_INSTALL_append = " glibc-staticdev"
> 
> Why install it to the image? 
> 
> TOOLCHAIN_TARGET_TASK_append = " glibc-staticdev"
> 
> would be better, as it'll only add this package to the SDK.

Thanks for the suggestion. This looks much better. 

Time to update the documentation :) 

> Cheers,
> Anders

Best Regards,
Maxin


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

* do_rootfs failed with message about host system(?) locale
  2017-06-14  9:20   ` Anders Darander
  2017-06-14 10:44     ` Maxin B. John
@ 2017-06-14 10:46     ` Dvorkin Dmitry
  2017-06-14 20:52       ` Khem Raj
  1 sibling, 1 reply; 10+ messages in thread
From: Dvorkin Dmitry @ 2017-06-14 10:46 UTC (permalink / raw)
  To: yocto

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

ERROR: MyIMG-1.0-r1 do_rootfs: [log_check] MyIMG: found 2 error messages 
in the logfile:
[log_check] Failed to set locale, defaulting to C
[log_check] Failed to set locale, defaulting to C

ERROR: MyIMG-1.0-r1 do_rootfs: Function failed: do_rootfs
ERROR: Logfile of failure stored in: 
/home/dv/workspace/tpp.17/poky/x.tpp/tmp/work/tpp-tps-linux-gnueabi/MyIMG/1.0-r1/temp/log.do_rootfs.30451
ERROR: Task 
(/home/dv/workspace/tpp.17/poky/meta-tibbo/recipes-core/images/MyIMG.bb:do_rootfs) 
failed with exit code '1'
NOTE: Tasks Summary: Attempted 5400 tasks of which 5394 didn't need to 
be rerun and 1 failed.

the complete logfile is there:
https://paste.fedoraproject.org/paste/s~SuKagYWMH2wmJLB6ckFQ

I got read of any errors in my image. The only thing is my host PC 
locale. But if I set
export LANG=en_US
export LC_ALL=en_US
before running bitbake it doesn't help.

[-- Attachment #2: dvorkin.vcf --]
[-- Type: text/x-vcard, Size: 315 bytes --]

begin:vcard
fn:Dmitry Dvorkin
n:Dvorkin;Dmitry
org:Tibbo Technology Inc.;Tibbo Engeneering
adr:;;9F-3, No.31, Lane 169, Kang-Ning St., Hsi-Chih, New Taipei City;Taipei;Taipei;22180;Taiwan
email;internet:dvorkin@tibbo.com
title:Embedded Linux System Architect
url:http://tibbo.com/
version:2.1
end:vcard


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

* Re: do_rootfs failed with message about host system(?) locale
  2017-06-14 10:46     ` do_rootfs failed with message about host system(?) locale Dvorkin Dmitry
@ 2017-06-14 20:52       ` Khem Raj
  0 siblings, 0 replies; 10+ messages in thread
From: Khem Raj @ 2017-06-14 20:52 UTC (permalink / raw)
  To: yocto

On 6/14/17 3:46 AM, Dvorkin Dmitry wrote:
> ERROR: MyIMG-1.0-r1 do_rootfs: [log_check] MyIMG: found 2 error messages
> in the logfile:
> [log_check] Failed to set locale, defaulting to C
> [log_check] Failed to set locale, defaulting to C

Do you have locale setup correctly on your build host ?

> 
> ERROR: MyIMG-1.0-r1 do_rootfs: Function failed: do_rootfs
> ERROR: Logfile of failure stored in:
> /home/dv/workspace/tpp.17/poky/x.tpp/tmp/work/tpp-tps-linux-gnueabi/MyIMG/1.0-r1/temp/log.do_rootfs.30451
> 
> ERROR: Task
> (/home/dv/workspace/tpp.17/poky/meta-tibbo/recipes-core/images/MyIMG.bb:do_rootfs)
> failed with exit code '1'
> NOTE: Tasks Summary: Attempted 5400 tasks of which 5394 didn't need to
> be rerun and 1 failed.
> 
> the complete logfile is there:
> https://paste.fedoraproject.org/paste/s~SuKagYWMH2wmJLB6ckFQ
> 
> I got read of any errors in my image. The only thing is my host PC
> locale. But if I set
> export LANG=en_US
> export LC_ALL=en_US
> before running bitbake it doesn't help.
> 
> 



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

end of thread, other threads:[~2017-06-14 20:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-13 23:24 Image lacks libraries needed by SDK Paul D. DeRocco
2017-06-14  1:01 ` Andre McCurdy
2017-06-14  1:17   ` Paul D. DeRocco
2017-06-14  8:22 ` Maxin B. John
2017-06-14  8:34   ` Paul D. DeRocco
2017-06-14  9:04     ` Maxin B. John
2017-06-14  9:20   ` Anders Darander
2017-06-14 10:44     ` Maxin B. John
2017-06-14 10:46     ` do_rootfs failed with message about host system(?) locale Dvorkin Dmitry
2017-06-14 20:52       ` Khem Raj

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.