Re: [OE-core] [PATCH] glibc: package the stub .a libaries into glibc-dev

2021-08-18 Thread Richard Purdie
On Wed, 2021-08-18 at 06:42 -0700, Khem Raj wrote:
> 
> 
> On Wed, Aug 18, 2021 at 12:00 AM Richard Purdie 
>  wrote:
> > On Tue, 2021-08-17 at 17:40 -0700, Khem Raj wrote:
> > > hmm I am seeing pseudo build failures on master-next on all arches see
> > > [1].  I wonder if this is related
> > > 
> > > https://errors.yoctoproject.org/Errors/Details/601473/
> > 
> > I think that would be an issue with my patch in master-next to try and fix
> > other pseudo issues with 2.34 hosts.
> > 
> > Basically we need pseudo to work with older glibc where the 
> > dlsym/dlvsym/dlerror
> > functions are in libdl. This is because libpseudo may be loaded against 
> > host binaries
> > which were not linked with glibc 2.34 but something older.
> > 
> > To do that, we need to inject older versioning but the version to use is 
> > arch 
> > specific. I have a patch covering 32/64 bit x86 and arm but I haven't got 
> > further
> > than that:
> > 
> > 
> > ++#if defined (__aarch64__)
> > ++#define DLSYMVER "2.17"
> > ++#define DLSYMVER2 "2.17"
> > ++#elif defined(__i386__)
> > ++#define DLSYMVER "2.0"
> > ++#define DLSYMVER2 "2.1"
> > ++#else
> > ++#define DLSYMVER "2.2.5"
> > ++#define DLSYMVER2 "2.2.5"
> > ++#endif
> > ++
> > ++__asm__(".symver dlerror,dlerror@GLIBC_" DLSYMVER);
> > ++__asm__(".symver dlvsym,dlvsym@GLIBC_" DLSYMVER2);
> > ++__asm__(".symver dlsym,dlsym@GLIBC_" DLSYMVER);
> > 
> > 
> > I may need help finishing this off for other arches people are building it 
> > for. So far
> > I was using this as a test to see if this would even work!
> > 
> 
> 
> I think we should disable building pseudo for targets which are not used as 
> build hosts so essentially your
> patch is good with another addition of compatible host string 

I've improved the patch a bit and I think it should work in most places we 
build 
things now. Patch is on the list.

Cheers,

Richard



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154936): 
https://lists.openembedded.org/g/openembedded-core/message/154936
Mute This Topic: https://lists.openembedded.org/mt/84960232/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] glibc: package the stub .a libaries into glibc-dev

2021-08-18 Thread Khem Raj
On Wed, Aug 18, 2021 at 12:00 AM Richard Purdie <
richard.pur...@linuxfoundation.org> wrote:

> On Tue, 2021-08-17 at 17:40 -0700, Khem Raj wrote:
> > hmm I am seeing pseudo build failures on master-next on all arches see
> > [1].  I wonder if this is related
> >
> > https://errors.yoctoproject.org/Errors/Details/601473/
>
> I think that would be an issue with my patch in master-next to try and fix
> other pseudo issues with 2.34 hosts.
>
> Basically we need pseudo to work with older glibc where the
> dlsym/dlvsym/dlerror
> functions are in libdl. This is because libpseudo may be loaded against
> host binaries
> which were not linked with glibc 2.34 but something older.
>
> To do that, we need to inject older versioning but the version to use is
> arch
> specific. I have a patch covering 32/64 bit x86 and arm but I haven't got
> further
> than that:
>
>
> ++#if defined (__aarch64__)
> ++#define DLSYMVER "2.17"
> ++#define DLSYMVER2 "2.17"
> ++#elif defined(__i386__)
> ++#define DLSYMVER "2.0"
> ++#define DLSYMVER2 "2.1"
> ++#else
> ++#define DLSYMVER "2.2.5"
> ++#define DLSYMVER2 "2.2.5"
> ++#endif
> ++
> ++__asm__(".symver dlerror,dlerror@GLIBC_" DLSYMVER);
> ++__asm__(".symver dlvsym,dlvsym@GLIBC_" DLSYMVER2);
> ++__asm__(".symver dlsym,dlsym@GLIBC_" DLSYMVER);
>
>
> I may need help finishing this off for other arches people are building it
> for. So far
> I was using this as a test to see if this would even work!


I think we should disable building pseudo for targets which are not used as
build hosts so essentially your patch is good with another addition of
compatible host string


>
> Cheers,
>
> Richard
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154917): 
https://lists.openembedded.org/g/openembedded-core/message/154917
Mute This Topic: https://lists.openembedded.org/mt/84960232/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] glibc: package the stub .a libaries into glibc-dev

2021-08-18 Thread Richard Purdie
On Tue, 2021-08-17 at 17:40 -0700, Khem Raj wrote:
> hmm I am seeing pseudo build failures on master-next on all arches see
> [1].  I wonder if this is related
> 
> https://errors.yoctoproject.org/Errors/Details/601473/

I think that would be an issue with my patch in master-next to try and fix
other pseudo issues with 2.34 hosts.

Basically we need pseudo to work with older glibc where the dlsym/dlvsym/dlerror
functions are in libdl. This is because libpseudo may be loaded against host 
binaries
which were not linked with glibc 2.34 but something older.

To do that, we need to inject older versioning but the version to use is arch 
specific. I have a patch covering 32/64 bit x86 and arm but I haven't got 
further
than that:


++#if defined (__aarch64__)
++#define DLSYMVER "2.17"
++#define DLSYMVER2 "2.17"
++#elif defined(__i386__)
++#define DLSYMVER "2.0"
++#define DLSYMVER2 "2.1"
++#else
++#define DLSYMVER "2.2.5"
++#define DLSYMVER2 "2.2.5"
++#endif
++
++__asm__(".symver dlerror,dlerror@GLIBC_" DLSYMVER);
++__asm__(".symver dlvsym,dlvsym@GLIBC_" DLSYMVER2);
++__asm__(".symver dlsym,dlsym@GLIBC_" DLSYMVER);


I may need help finishing this off for other arches people are building it for. 
So far
I was using this as a test to see if this would even work!

Cheers,

Richard


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154907): 
https://lists.openembedded.org/g/openembedded-core/message/154907
Mute This Topic: https://lists.openembedded.org/mt/84960232/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] glibc: package the stub .a libaries into glibc-dev

2021-08-17 Thread Khem Raj
hmm I am seeing pseudo build failures on master-next on all arches see
[1].  I wonder if this is related

https://errors.yoctoproject.org/Errors/Details/601473/

On Tue, Aug 17, 2021 at 4:46 PM Khem Raj  wrote:
>
> On Tue, Aug 17, 2021 at 3:29 PM Ross Burton  wrote:
> >
> > In glibc 2.34, the libraries libpthread, libdl, libutil, libanl have
> > been integrated into libc. To retain compatibility with old binaries the
> > shared libaries are still shipped but are empty, and to keep software
> > building there are empty static libraries.
> >
> > However, these static libraries get packaged into glibc-staticdev (as
> > they should be), but by this design they should be in glibc-dev.
> >
> > https://sourceware.org/pipermail/libc-alpha/2021-August/129718.html
> >
>
> this patch is ok.
>
> > Signed-off-by: Ross Burton 
> > ---
> >  meta/recipes-core/glibc/glibc-package.inc | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-core/glibc/glibc-package.inc 
> > b/meta/recipes-core/glibc/glibc-package.inc
> > index 3026aec9b6f..56fbf8b08ce 100644
> > --- a/meta/recipes-core/glibc/glibc-package.inc
> > +++ b/meta/recipes-core/glibc/glibc-package.inc
> > @@ -22,6 +22,7 @@ ARCH_DYNAMIC_LOADER = ""
> >  ARCH_DYNAMIC_LOADER:aarch64 = "ld-linux-${TARGET_ARCH}.so.1"
> >  libc_baselibs:append = " ${@oe.utils.conditional('ARCH_DYNAMIC_LOADER', 
> > '', '', '${root_prefix}/lib/${ARCH_DYNAMIC_LOADER}', d)}"
> >  INSANE_SKIP:${PN}:append:aarch64 = " libdir"
> > +INSANE_SKIP:${PN}-dev += "staticdev"
> >
> >  FILES:${PN} = "${libc_baselibs} ${libexecdir}/* ${sysconfdir}/ld.so.conf"
> >  RRECOMMENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', 
> > '${MLPREFIX}ldconfig', '', d)}"
> > @@ -38,7 +39,7 @@ FILES:sln = "${base_sbindir}/sln"
> >  FILES:${PN}-pic = "${libdir}/*_pic.a ${libdir}/*_pic.map 
> > ${libdir}/libc_pic/*.o"
> >  FILES:libsotruss = "${libdir}/audit/sotruss-lib.so"
> >  FILES_SOLIBSDEV = "${libdir}/lib*${SOLIBSDEV}"
> > -FILES:${PN}-dev += "${libdir}/*_nonshared.a ${base_libdir}/*_nonshared.a 
> > ${base_libdir}/*.o ${datadir}/aclocal"
> > +FILES:${PN}-dev += "${libdir}/libpthread.a ${libdir}/libdl.a 
> > ${libdir}/libutil.a ${libdir}/libanl.a ${libdir}/*_nonshared.a 
> > ${base_libdir}/*_nonshared.a ${base_libdir}/*.o ${datadir}/aclocal"
> >  RDEPENDS:${PN}-dev = "linux-libc-headers-dev"
> >  FILES:${PN}-staticdev += "${libdir}/*.a ${base_libdir}/*.a"
> >  FILES:nscd = "${sbindir}/nscd* ${sysconfdir}/init.d/nscd 
> > ${systemd_unitdir}/system/nscd* ${sysconfdir}/tmpfiles.d/nscd.conf \
> > --
> > 2.32.0
> >
> >
> > 
> >

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154905): 
https://lists.openembedded.org/g/openembedded-core/message/154905
Mute This Topic: https://lists.openembedded.org/mt/84960232/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] glibc: package the stub .a libaries into glibc-dev

2021-08-17 Thread Khem Raj
On Tue, Aug 17, 2021 at 3:29 PM Ross Burton  wrote:
>
> In glibc 2.34, the libraries libpthread, libdl, libutil, libanl have
> been integrated into libc. To retain compatibility with old binaries the
> shared libaries are still shipped but are empty, and to keep software
> building there are empty static libraries.
>
> However, these static libraries get packaged into glibc-staticdev (as
> they should be), but by this design they should be in glibc-dev.
>
> https://sourceware.org/pipermail/libc-alpha/2021-August/129718.html
>

this patch is ok.

> Signed-off-by: Ross Burton 
> ---
>  meta/recipes-core/glibc/glibc-package.inc | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/glibc/glibc-package.inc 
> b/meta/recipes-core/glibc/glibc-package.inc
> index 3026aec9b6f..56fbf8b08ce 100644
> --- a/meta/recipes-core/glibc/glibc-package.inc
> +++ b/meta/recipes-core/glibc/glibc-package.inc
> @@ -22,6 +22,7 @@ ARCH_DYNAMIC_LOADER = ""
>  ARCH_DYNAMIC_LOADER:aarch64 = "ld-linux-${TARGET_ARCH}.so.1"
>  libc_baselibs:append = " ${@oe.utils.conditional('ARCH_DYNAMIC_LOADER', '', 
> '', '${root_prefix}/lib/${ARCH_DYNAMIC_LOADER}', d)}"
>  INSANE_SKIP:${PN}:append:aarch64 = " libdir"
> +INSANE_SKIP:${PN}-dev += "staticdev"
>
>  FILES:${PN} = "${libc_baselibs} ${libexecdir}/* ${sysconfdir}/ld.so.conf"
>  RRECOMMENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', 
> '${MLPREFIX}ldconfig', '', d)}"
> @@ -38,7 +39,7 @@ FILES:sln = "${base_sbindir}/sln"
>  FILES:${PN}-pic = "${libdir}/*_pic.a ${libdir}/*_pic.map 
> ${libdir}/libc_pic/*.o"
>  FILES:libsotruss = "${libdir}/audit/sotruss-lib.so"
>  FILES_SOLIBSDEV = "${libdir}/lib*${SOLIBSDEV}"
> -FILES:${PN}-dev += "${libdir}/*_nonshared.a ${base_libdir}/*_nonshared.a 
> ${base_libdir}/*.o ${datadir}/aclocal"
> +FILES:${PN}-dev += "${libdir}/libpthread.a ${libdir}/libdl.a 
> ${libdir}/libutil.a ${libdir}/libanl.a ${libdir}/*_nonshared.a 
> ${base_libdir}/*_nonshared.a ${base_libdir}/*.o ${datadir}/aclocal"
>  RDEPENDS:${PN}-dev = "linux-libc-headers-dev"
>  FILES:${PN}-staticdev += "${libdir}/*.a ${base_libdir}/*.a"
>  FILES:nscd = "${sbindir}/nscd* ${sysconfdir}/init.d/nscd 
> ${systemd_unitdir}/system/nscd* ${sysconfdir}/tmpfiles.d/nscd.conf \
> --
> 2.32.0
>
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154904): 
https://lists.openembedded.org/g/openembedded-core/message/154904
Mute This Topic: https://lists.openembedded.org/mt/84960232/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] glibc: package the stub .a libaries into glibc-dev

2021-08-17 Thread Ross Burton
In glibc 2.34, the libraries libpthread, libdl, libutil, libanl have
been integrated into libc. To retain compatibility with old binaries the
shared libaries are still shipped but are empty, and to keep software
building there are empty static libraries.

However, these static libraries get packaged into glibc-staticdev (as
they should be), but by this design they should be in glibc-dev.

https://sourceware.org/pipermail/libc-alpha/2021-August/129718.html

Signed-off-by: Ross Burton 
---
 meta/recipes-core/glibc/glibc-package.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc 
b/meta/recipes-core/glibc/glibc-package.inc
index 3026aec9b6f..56fbf8b08ce 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -22,6 +22,7 @@ ARCH_DYNAMIC_LOADER = ""
 ARCH_DYNAMIC_LOADER:aarch64 = "ld-linux-${TARGET_ARCH}.so.1"
 libc_baselibs:append = " ${@oe.utils.conditional('ARCH_DYNAMIC_LOADER', '', 
'', '${root_prefix}/lib/${ARCH_DYNAMIC_LOADER}', d)}"
 INSANE_SKIP:${PN}:append:aarch64 = " libdir"
+INSANE_SKIP:${PN}-dev += "staticdev"
 
 FILES:${PN} = "${libc_baselibs} ${libexecdir}/* ${sysconfdir}/ld.so.conf"
 RRECOMMENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', 
'${MLPREFIX}ldconfig', '', d)}"
@@ -38,7 +39,7 @@ FILES:sln = "${base_sbindir}/sln"
 FILES:${PN}-pic = "${libdir}/*_pic.a ${libdir}/*_pic.map 
${libdir}/libc_pic/*.o"
 FILES:libsotruss = "${libdir}/audit/sotruss-lib.so"
 FILES_SOLIBSDEV = "${libdir}/lib*${SOLIBSDEV}"
-FILES:${PN}-dev += "${libdir}/*_nonshared.a ${base_libdir}/*_nonshared.a 
${base_libdir}/*.o ${datadir}/aclocal"
+FILES:${PN}-dev += "${libdir}/libpthread.a ${libdir}/libdl.a 
${libdir}/libutil.a ${libdir}/libanl.a ${libdir}/*_nonshared.a 
${base_libdir}/*_nonshared.a ${base_libdir}/*.o ${datadir}/aclocal"
 RDEPENDS:${PN}-dev = "linux-libc-headers-dev"
 FILES:${PN}-staticdev += "${libdir}/*.a ${base_libdir}/*.a"
 FILES:nscd = "${sbindir}/nscd* ${sysconfdir}/init.d/nscd 
${systemd_unitdir}/system/nscd* ${sysconfdir}/tmpfiles.d/nscd.conf \
-- 
2.32.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154901): 
https://lists.openembedded.org/g/openembedded-core/message/154901
Mute This Topic: https://lists.openembedded.org/mt/84960232/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-