* [PATCH 1/2] ruby: configure mis-detects isnan/isinf on musl
@ 2019-09-27 13:54 André Draszik
2019-09-27 13:54 ` [PATCH 2/2] ruby: fix non-IPv6 support André Draszik
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: André Draszik @ 2019-09-27 13:54 UTC (permalink / raw)
To: openembedded-core
From: André Draszik <andre.draszik@jci.com>
The configure script does not detect isnan/isinf as macros
as is the case in musl.
Help it by providing the correct result via
CACHED_CONFIGUREVARS.
Signed-off-by: André Draszik <andre.draszik@jci.com>
---
meta/recipes-devtools/ruby/ruby_2.5.5.bb | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/recipes-devtools/ruby/ruby_2.5.5.bb b/meta/recipes-devtools/ruby/ruby_2.5.5.bb
index 8ad59a7657..fdd3852a78 100644
--- a/meta/recipes-devtools/ruby/ruby_2.5.5.bb
+++ b/meta/recipes-devtools/ruby/ruby_2.5.5.bb
@@ -32,6 +32,9 @@ EXTRA_OECONF = "\
--with-pkg-config=pkg-config \
"
+# the configure script does not detect isnan/isinf as macros
+CACHED_CONFIGUREVARS_libc-musl += "ac_cv_func_isnan=yes ac_cv_func_isinf=yes"
+
do_install() {
oe_runmake 'DESTDIR=${D}' install
}
--
2.23.0.rc1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 2/2] ruby: fix non-IPv6 support 2019-09-27 13:54 [PATCH 1/2] ruby: configure mis-detects isnan/isinf on musl André Draszik @ 2019-09-27 13:54 ` André Draszik 2019-09-27 14:10 ` [PATCH v2] " André Draszik 2019-09-27 15:15 ` [PATCH 1/2] ruby: configure mis-detects isnan/isinf on musl Ross Burton 2019-09-27 15:54 ` Khem Raj 2 siblings, 1 reply; 10+ messages in thread From: André Draszik @ 2019-09-27 13:54 UTC (permalink / raw) To: openembedded-core From: André Draszik <andre.draszik@jci.com> When IPv6 support is disabled, this recipe mis-configures ruby so that it end up non-working: --enable-wide-getaddrinfo instructs ruby to re-implement the standard getaddinfo(), but IPv6 support is still automatically detected via ext/socket/extconf.rb independently of that flag. To re-implement getaddrinfo(), ruby uses the obsolete getipnodebyaddr() and getipnodebyname() functions - i.e. according to the man-page, glibc provided those only in glibc 2.1.91-95; and of course compilation fails. [1] Switch to ruby's standard --enable-ipv6= configure options to make the build work without warnings, and ruby work at runtime as well. [1] Compilation and linking actually succeed, albeit with a warning regarding implicit declaration / unresolved symbols. The error is only obvious at runtime due to the unresolved symbols... Signed-off-by: André Draszik <andre.draszik@jci.com> --- meta/recipes-devtools/ruby/ruby_2.5.5.bb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/meta/recipes-devtools/ruby/ruby_2.5.5.bb b/meta/recipes-devtools/ruby/ruby_2.5.5.bb index fdd3852a78..49bc368889 100644 --- a/meta/recipes-devtools/ruby/ruby_2.5.5.bb +++ b/meta/recipes-devtools/ruby/ruby_2.5.5.bb @@ -9,17 +9,12 @@ SRC_URI += " \ SRC_URI[md5sum] = "7e156fb526b8f4bb1b30a3dd8a7ce400" SRC_URI[sha256sum] = "28a945fdf340e6ba04fc890b98648342e3cccfd6d223a48f3810572f11b2514c" -# it's unknown to configure script, but then passed to extconf.rb -# maybe it's not really needed as we're hardcoding the result with -# 0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch -UNKNOWN_CONFIGURE_WHITELIST += "--enable-wide-getaddrinfo" - PACKAGECONFIG ??= "" PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind" PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp" -PACKAGECONFIG[ipv6] = ",--enable-wide-getaddrinfo," +PACKAGECONFIG[ipv6] = "--enable-ipv6=yes, --enable-ipv6=no," EXTRA_AUTORECONF += "--exclude=aclocal" -- 2.23.0.rc1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2] ruby: fix non-IPv6 support 2019-09-27 13:54 ` [PATCH 2/2] ruby: fix non-IPv6 support André Draszik @ 2019-09-27 14:10 ` André Draszik 2019-09-27 15:05 ` Alexander Kanavin 0 siblings, 1 reply; 10+ messages in thread From: André Draszik @ 2019-09-27 14:10 UTC (permalink / raw) To: openembedded-core From: André Draszik <andre.draszik@jci.com> When IPv6 support is disabled, this recipe mis-configures ruby so that it end up non-working: --enable-wide-getaddrinfo instructs ruby to re-implement the standard getaddinfo(), but IPv6 support is still automatically detected via ext/socket/extconf.rb independently of that flag. To re-implement getaddrinfo(), ruby uses the obsolete getipnodebyaddr() and getipnodebyname() functions - i.e. according to the man-page, glibc provided those only in glibc 2.1.91-95; and of course compilation fails. [1] Switch to ruby's standard --enable-ipv6= configure options to make the build work without warnings, and ruby work at runtime as well. [1] Compilation and linking actually succeed, albeit with a warning regarding implicit declaration / unresolved symbols. The error is only obvious at runtime due to the unresolved symbols... Signed-off-by: André Draszik <andre.draszik@jci.com> --- v2: * switch to --enable-ipv6/--disable-ipv6 instead of --enable-ipv6=yes/no, as the latter is not actually recognised --- meta/recipes-devtools/ruby/ruby_2.5.5.bb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/meta/recipes-devtools/ruby/ruby_2.5.5.bb b/meta/recipes-devtools/ruby/ruby_2.5.5.bb index fdd3852a78..feb654cb6a 100644 --- a/meta/recipes-devtools/ruby/ruby_2.5.5.bb +++ b/meta/recipes-devtools/ruby/ruby_2.5.5.bb @@ -9,17 +9,12 @@ SRC_URI += " \ SRC_URI[md5sum] = "7e156fb526b8f4bb1b30a3dd8a7ce400" SRC_URI[sha256sum] = "28a945fdf340e6ba04fc890b98648342e3cccfd6d223a48f3810572f11b2514c" -# it's unknown to configure script, but then passed to extconf.rb -# maybe it's not really needed as we're hardcoding the result with -# 0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch -UNKNOWN_CONFIGURE_WHITELIST += "--enable-wide-getaddrinfo" - PACKAGECONFIG ??= "" PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind" PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp" -PACKAGECONFIG[ipv6] = ",--enable-wide-getaddrinfo," +PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6," EXTRA_AUTORECONF += "--exclude=aclocal" -- 2.23.0.rc1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2] ruby: fix non-IPv6 support 2019-09-27 14:10 ` [PATCH v2] " André Draszik @ 2019-09-27 15:05 ` Alexander Kanavin 2019-09-27 15:24 ` André Draszik 0 siblings, 1 reply; 10+ messages in thread From: Alexander Kanavin @ 2019-09-27 15:05 UTC (permalink / raw) To: André Draszik; +Cc: OE-core [-- Attachment #1: Type: text/plain, Size: 2784 bytes --] Just wanted to request, would you be able to provide a ruby version upgrade as well? Alex On Fri, 27 Sep 2019 at 16:10, André Draszik <git@andred.net> wrote: > From: André Draszik <andre.draszik@jci.com> > > When IPv6 support is disabled, this recipe mis-configures > ruby so that it end up non-working: > --enable-wide-getaddrinfo instructs ruby to re-implement > the standard getaddinfo(), but IPv6 support is still > automatically detected via ext/socket/extconf.rb > independently of that flag. > > To re-implement getaddrinfo(), ruby uses the obsolete > getipnodebyaddr() and getipnodebyname() functions - i.e. > according to the man-page, glibc provided those only in > glibc 2.1.91-95; and of course compilation fails. [1] > > Switch to ruby's standard --enable-ipv6= configure > options to make the build work without warnings, and > ruby work at runtime as well. > > [1] Compilation and linking actually succeed, albeit with > a warning regarding implicit declaration / unresolved > symbols. The error is only obvious at runtime due to the > unresolved symbols... > > Signed-off-by: André Draszik <andre.draszik@jci.com> > > --- > v2: > * switch to --enable-ipv6/--disable-ipv6 instead of > --enable-ipv6=yes/no, as the latter is not actually > recognised > --- > meta/recipes-devtools/ruby/ruby_2.5.5.bb | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/meta/recipes-devtools/ruby/ruby_2.5.5.bb > b/meta/recipes-devtools/ruby/ruby_2.5.5.bb > index fdd3852a78..feb654cb6a 100644 > --- a/meta/recipes-devtools/ruby/ruby_2.5.5.bb > +++ b/meta/recipes-devtools/ruby/ruby_2.5.5.bb > @@ -9,17 +9,12 @@ SRC_URI += " \ > SRC_URI[md5sum] = "7e156fb526b8f4bb1b30a3dd8a7ce400" > SRC_URI[sha256sum] = > "28a945fdf340e6ba04fc890b98648342e3cccfd6d223a48f3810572f11b2514c" > > -# it's unknown to configure script, but then passed to extconf.rb > -# maybe it's not really needed as we're hardcoding the result with > -# 0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch > -UNKNOWN_CONFIGURE_WHITELIST += "--enable-wide-getaddrinfo" > - > PACKAGECONFIG ??= "" > PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" > > PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, > valgrind" > PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp" > -PACKAGECONFIG[ipv6] = ",--enable-wide-getaddrinfo," > +PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6," > > EXTRA_AUTORECONF += "--exclude=aclocal" > > -- > 2.23.0.rc1 > > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core > [-- Attachment #2: Type: text/html, Size: 4030 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] ruby: fix non-IPv6 support 2019-09-27 15:05 ` Alexander Kanavin @ 2019-09-27 15:24 ` André Draszik 2019-09-27 15:32 ` Alexander Kanavin 0 siblings, 1 reply; 10+ messages in thread From: André Draszik @ 2019-09-27 15:24 UTC (permalink / raw) To: Alexander Kanavin; +Cc: OE-core On Fri, 2019-09-27 at 17:05 +0200, Alexander Kanavin wrote: > Just wanted to request, would you be able to provide a ruby version upgrade as well? Not anytime soon - I'm just working a quick proof-of-concept. Also, if you look at Alpine, they are packaging all the bundled gems separately, so ideally the same should happen when using yocto. But that's a bigger task... And I don't know anything about ruby :-) Can't the auto-updater do it? (Without the repackaging?) Cheers, Andre' > Alex > > On Fri, 27 Sep 2019 at 16:10, André Draszik <git@andred.net> wrote: > > From: André Draszik <andre.draszik@jci.com> > > > > When IPv6 support is disabled, this recipe mis-configures > > ruby so that it end up non-working: > > --enable-wide-getaddrinfo instructs ruby to re-implement > > the standard getaddinfo(), but IPv6 support is still > > automatically detected via ext/socket/extconf.rb > > independently of that flag. > > > > To re-implement getaddrinfo(), ruby uses the obsolete > > getipnodebyaddr() and getipnodebyname() functions - i.e. > > according to the man-page, glibc provided those only in > > glibc 2.1.91-95; and of course compilation fails. [1] > > > > Switch to ruby's standard --enable-ipv6= configure > > options to make the build work without warnings, and > > ruby work at runtime as well. > > > > [1] Compilation and linking actually succeed, albeit with > > a warning regarding implicit declaration / unresolved > > symbols. The error is only obvious at runtime due to the > > unresolved symbols... > > > > Signed-off-by: André Draszik <andre.draszik@jci.com> > > > > --- > > v2: > > * switch to --enable-ipv6/--disable-ipv6 instead of > > --enable-ipv6=yes/no, as the latter is not actually > > recognised > > --- > > meta/recipes-devtools/ruby/ruby_2.5.5.bb | 7 +------ > > 1 file changed, 1 insertion(+), 6 deletions(-) > > > > diff --git a/meta/recipes-devtools/ruby/ruby_2.5.5.bb b/meta/recipes-devtools/ruby/ruby_2.5.5.bb > > index fdd3852a78..feb654cb6a 100644 > > --- a/meta/recipes-devtools/ruby/ruby_2.5.5.bb > > +++ b/meta/recipes-devtools/ruby/ruby_2.5.5.bb > > @@ -9,17 +9,12 @@ SRC_URI += " \ > > SRC_URI[md5sum] = "7e156fb526b8f4bb1b30a3dd8a7ce400" > > SRC_URI[sha256sum] = "28a945fdf340e6ba04fc890b98648342e3cccfd6d223a48f3810572f11b2514c" > > > > -# it's unknown to configure script, but then passed to extconf.rb > > -# maybe it's not really needed as we're hardcoding the result with > > -# 0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch > > -UNKNOWN_CONFIGURE_WHITELIST += "--enable-wide-getaddrinfo" > > - > > PACKAGECONFIG ??= "" > > PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" > > > > PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind" > > PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp" > > -PACKAGECONFIG[ipv6] = ",--enable-wide-getaddrinfo," > > +PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6," > > > > EXTRA_AUTORECONF += "--exclude=aclocal" > > > > -- > > 2.23.0.rc1 > > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] ruby: fix non-IPv6 support 2019-09-27 15:24 ` André Draszik @ 2019-09-27 15:32 ` Alexander Kanavin 2019-09-30 8:17 ` André Draszik 0 siblings, 1 reply; 10+ messages in thread From: Alexander Kanavin @ 2019-09-27 15:32 UTC (permalink / raw) To: André Draszik; +Cc: OE-core [-- Attachment #1: Type: text/plain, Size: 244 bytes --] On Fri, 27 Sep 2019 at 17:24, André Draszik <git@andred.net> wrote: > Can't the auto-updater do it? (Without the repackaging?) > I think it fails at the rebasing patches step - merge conflicts can only be resolved by a human. Alex [-- Attachment #2: Type: text/html, Size: 548 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] ruby: fix non-IPv6 support 2019-09-27 15:32 ` Alexander Kanavin @ 2019-09-30 8:17 ` André Draszik 0 siblings, 0 replies; 10+ messages in thread From: André Draszik @ 2019-09-30 8:17 UTC (permalink / raw) To: Alexander Kanavin; +Cc: OE-core On Fri, 2019-09-27 at 17:32 +0200, Alexander Kanavin wrote: > On Fri, 27 Sep 2019 at 17:24, André Draszik <git@andred.net> wrote: > > Can't the auto-updater do it? (Without the repackaging?) > > I think it fails at the rebasing patches step - merge conflicts can only be resolved by a human. OK, I'll try to have a look anyway... A. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] ruby: configure mis-detects isnan/isinf on musl 2019-09-27 13:54 [PATCH 1/2] ruby: configure mis-detects isnan/isinf on musl André Draszik 2019-09-27 13:54 ` [PATCH 2/2] ruby: fix non-IPv6 support André Draszik @ 2019-09-27 15:15 ` Ross Burton 2019-09-30 8:17 ` André Draszik 2019-09-27 15:54 ` Khem Raj 2 siblings, 1 reply; 10+ messages in thread From: Ross Burton @ 2019-09-27 15:15 UTC (permalink / raw) To: openembedded-core On 27/09/2019 14:54, André Draszik wrote: > From: André Draszik <andre.draszik@jci.com> > > The configure script does not detect isnan/isinf as macros > as is the case in musl. > > Help it by providing the correct result via > CACHED_CONFIGUREVARS. Is this reported as a bug upstream so we can remove this workaround at some point? Ross ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] ruby: configure mis-detects isnan/isinf on musl 2019-09-27 15:15 ` [PATCH 1/2] ruby: configure mis-detects isnan/isinf on musl Ross Burton @ 2019-09-30 8:17 ` André Draszik 0 siblings, 0 replies; 10+ messages in thread From: André Draszik @ 2019-09-30 8:17 UTC (permalink / raw) To: openembedded-core On Fri, 2019-09-27 at 16:15 +0100, Ross Burton wrote: > On 27/09/2019 14:54, André Draszik wrote: > > From: André Draszik <andre.draszik@jci.com> > > > > The configure script does not detect isnan/isinf as macros > > as is the case in musl. > > > > Help it by providing the correct result via > > CACHED_CONFIGUREVARS. > > Is this reported as a bug upstream so we can remove this workaround at > some point? Now that you say it - actually somebody else did before, and they've also fixed it in later versions. New patch coming. A. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] ruby: configure mis-detects isnan/isinf on musl 2019-09-27 13:54 [PATCH 1/2] ruby: configure mis-detects isnan/isinf on musl André Draszik 2019-09-27 13:54 ` [PATCH 2/2] ruby: fix non-IPv6 support André Draszik 2019-09-27 15:15 ` [PATCH 1/2] ruby: configure mis-detects isnan/isinf on musl Ross Burton @ 2019-09-27 15:54 ` Khem Raj 2 siblings, 0 replies; 10+ messages in thread From: Khem Raj @ 2019-09-27 15:54 UTC (permalink / raw) To: André Draszik; +Cc: Patches and discussions about the oe-core layer On Fri, Sep 27, 2019 at 6:55 AM André Draszik <git@andred.net> wrote: > > From: André Draszik <andre.draszik@jci.com> > > The configure script does not detect isnan/isinf as macros > as is the case in musl. > > Help it by providing the correct result via > CACHED_CONFIGUREVARS. > > Signed-off-by: André Draszik <andre.draszik@jci.com> > --- > meta/recipes-devtools/ruby/ruby_2.5.5.bb | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/meta/recipes-devtools/ruby/ruby_2.5.5.bb b/meta/recipes-devtools/ruby/ruby_2.5.5.bb > index 8ad59a7657..fdd3852a78 100644 > --- a/meta/recipes-devtools/ruby/ruby_2.5.5.bb > +++ b/meta/recipes-devtools/ruby/ruby_2.5.5.bb > @@ -32,6 +32,9 @@ EXTRA_OECONF = "\ > --with-pkg-config=pkg-config \ > " > > +# the configure script does not detect isnan/isinf as macros > +CACHED_CONFIGUREVARS_libc-musl += "ac_cv_func_isnan=yes ac_cv_func_isinf=yes" > + Please use _append_libc-musl and drop += > do_install() { > oe_runmake 'DESTDIR=${D}' install > } > -- > 2.23.0.rc1 > > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-09-30 8:17 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-09-27 13:54 [PATCH 1/2] ruby: configure mis-detects isnan/isinf on musl André Draszik 2019-09-27 13:54 ` [PATCH 2/2] ruby: fix non-IPv6 support André Draszik 2019-09-27 14:10 ` [PATCH v2] " André Draszik 2019-09-27 15:05 ` Alexander Kanavin 2019-09-27 15:24 ` André Draszik 2019-09-27 15:32 ` Alexander Kanavin 2019-09-30 8:17 ` André Draszik 2019-09-27 15:15 ` [PATCH 1/2] ruby: configure mis-detects isnan/isinf on musl Ross Burton 2019-09-30 8:17 ` André Draszik 2019-09-27 15:54 ` Khem Raj
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox