[OE-core] [PATCH v2] nettle: fix ptest failure
Adrian Bunk
bunk at stusta.de
Mon Apr 15 08:39:57 UTC 2019
On Mon, Apr 15, 2019 at 09:06:12AM +0100, richard.purdie at linuxfoundation.org wrote:
> On Mon, 2019-04-15 at 16:09 +0800, Yu, Mingli wrote:
> >
> > On 2019年04月15日 15:59, richard.purdie at linuxfoundation.org wrote:
> > > On Mon, 2019-04-15 at 15:40 +0800, mingli.yu at windriver.com wrote:
> > > > ---- a/testsuite/dlopen-test.c 2016-10-01 00:28:38.000000000
> > > > -0700
> > > > -+++ b/testsuite/dlopen-test.c 2017-10-13 11:08:57.227572860
> > > > -0700
> > > > -@@ -9,7 +9,7 @@
> > > > +diff --git a/testsuite/dlopen-test.c b/testsuite/dlopen-test.c
> > > > +index 99d3535..92de9f8 100644
> > > > +--- a/testsuite/dlopen-test.c
> > > > ++++ b/testsuite/dlopen-test.c
> > > > +@@ -9,7 +9,9 @@ int
> > > > main (int argc UNUSED, char **argv UNUSED)
> > > > {
> > > > #if HAVE_LIBDL
> > > > - void *handle = dlopen ("../libnettle.so", RTLD_NOW);
> > > > + void *handle = dlopen ("/usr/lib/libnettle.so", RTLD_NOW);
> > > > ++ if (!handle)
> > > > ++ handle = dlopen ("/usr/lib64/libnettle.so", RTLD_NOW);
> > > > int (*get_version)(void);
> > > > if (!handle)
> > > > {
> > >
> > > What happens on a 32 bit system?
> > >
> > > You can't hardcode a specific libdir like that!
> >
> > I just rework the patch dlopen-test.patch which Juro Bystricky
> > generated
> > before, the previous patch only check /usr/lib/libnettle.so and I
> > updated it also to check /usr/lib64/libnettle.so if no
> > /usr/lib/libnettle.so exist.
> > - void *handle = dlopen ("../libnettle.so", RTLD_NOW);
> > + void *handle = dlopen ("/usr/lib/libnettle.so", RTLD_NOW);
> > ++ if (!handle)
> > ++ handle = dlopen ("/usr/lib64/libnettle.so", RTLD_NOW);
>
> What happens on x32? n32? or if I set libdir to lib32?
dlopen("libnettle.so", RTLD_NOW) should work,
this uses the normal library search path.
But is it actually worth permanently carrying a patch here?
run-ptest already skips one test for unrelated reasons,
and skipping another one would also be an option.
> Cheers,
>
> Richard
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
More information about the Openembedded-core
mailing list