Bug 11669

Summary: musl package doesn't provide "libc-staticdev"
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Maxin B. John <maxin.john>
Component: devtools / tool chainAssignee: Maxin B. John (inactive) <maxin.baby.john>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: Medium CC: meta.mr.watcher, meta.watcher, raj.khem, randy.macleod, richard.purdie
Version: 2.3   
Target Milestone: 2.4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Maxin B. John 2017-06-15 08:09:38 UTC
When we try to build libc-staticdev (glibc):
# bitbake libc-staticdev

ERROR: Nothing PROVIDES 'libc-staticdev'. Close matches:
  glibc RPROVIDES libc-staticdev

For musl:
# bitbake libc-staticdev
ERROR: Nothing PROVIDES 'libc-staticdev'

musl libc also should provide staticdev package.

This will help "musl" based SDKs to build applications using static libraries.
Comment 1 Maxin B. John 2017-06-15 08:10:54 UTC
Adding Khem in CC List
Comment 2 Richard Purdie 2017-06-15 14:58:48 UTC
bitbake <package> is not a supported syntax, it needs to be a recipe target.

Also, we disable static libraries by default now. We can't stop glibc building some of them so we package those but musl is probably honouring the global settings more. We may therefore need more info here.
Comment 3 Richard Purdie 2017-06-15 15:01:48 UTC
See question above
Comment 4 Khem Raj 2017-06-15 15:55:16 UTC
(In reply to comment #2)
> bitbake <package> is not a supported syntax, it needs to be a recipe target.
> 
> Also, we disable static libraries by default now. We can't stop glibc
> building some of them so we package those but musl is probably honouring the
> global settings more. We may therefore need more info here.

musl does build .a files and puts them into musl-staticdev we probably just
need a PROVIDES directive but you could also use

${TCLIBC}-staticdev to be libc agnostic then we dont need PROVIDES
Comment 5 Maxin B. John 2017-06-16 10:19:05 UTC
Hi RP, Khem,

Thanks for commenting on this. This bug was created as part of a suggestion from this thread:
https://lists.yoctoproject.org/pipermail/yocto/2017-June/036632.html

"
That should perhaps be "libc-staticdev" so the same instructions work
for musl (although it looks like currently musl doesn't rprovide
libc-staticdev so that would need to be fixed too).

"

As RP mentioned, we are disabling static libraries by default these days. So, we don't have to add PROVIDES in musl recipe.

Instead, as Khem mentioned, add this line in local.conf :
"TOOLCHAIN_TARGET_TASK += "${TCLIBC}-staticdev"

and we will get  required ".a" files for the libc (glibc or musl) in SDK.


(In reply to comment #4)
> (In reply to comment #2)
> > bitbake <package> is not a supported syntax, it needs to be a recipe target.
> > 
> > Also, we disable static libraries by default now. We can't stop glibc
> > building some of them so we package those but musl is probably honouring the
> > global settings more. We may therefore need more info here.
> 
> musl does build .a files and puts them into musl-staticdev we probably just
> need a PROVIDES directive but you could also use
> 
> ${TCLIBC}-staticdev to be libc agnostic then we dont need PROVIDES