ncurses 5.7 doesn't build libtermcap anymore?
I've been working on some recent problems that popped up in the SlugOS feeds; one that appeared recently is that asterisk no longer builds; configure complains about -ltermcap, and investigation shows that indeed, libtermcap is missing. It seems that the new ncurses recipe (5.7) no longer builds it for some reason. I think the same problem is the root cause for the failure of js to build as well.
So I guess the first question is if this is intentional or not? If it is, then I guess I'll modify the asterisk recipe to remove the dependency and submit that patch. Otherwise, well, I guess I could attempt to debug and fix the ncurses recipe, but it looks a bit, um, "non-trivial" so any advice would be appreciated.
Or should I just pin ncurses to the old 5.4 version that worked?
Thanks,
-Mike
Quoted 7 lines · Mike Westerhof
I've been working on some recent problems that popped up in the SlugOS feeds; one that appeared recently is that asterisk no longer builds; configure complains about -ltermcap, and investigation shows that indeed, libtermcap is missing. It seems that the new ncurses recipe (5.7) no longer builds it for some reason. I think the same problem is the root cause for the failure of js to build as well.
Quoted 6 lines
So I guess the first question is if this is intentional or not? If it is, then I guess I'll modify the asterisk recipe to remove the dependency and submit that patch. Otherwise, well, I guess I could attempt to debug and fix the ncurses recipe, but it looks a bit, um, "non-trivial" so any advice would be appreciated.
AFAICT libtermcap is now in libncurses. so either we can create a symlink called libtermcap.so pointing
to libncurses.so or we can fix the recipes to link with -lncurses instead. I think first approach might be
better.
Quoted 12 lines
Or should I just pin ncurses to the old 5.4 version that worked?
Thanks,
-Mike_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Hi Mike,
Quoted 5 lines · Mike Westerhof
I've been working on some recent problems that popped up in the SlugOS feeds; one that appeared recently is that asterisk no longer builds; configure complains about -ltermcap, and investigation shows that indeed, libtermcap is missing. It seems that the new ncurses recipe (5.7) no longer builds it for some reason.
it's because 5.7's configure is using --with-ticlib which is incompatible with --enable-termcap. On ubuntu, it seems they simply do the following links :usr/lib/libncurses.so usr/lib/libtermcap.sousr/lib/libncurses.a usr/lib/libtermcap.a
Quoted 11 lines
I think the same problem is
the root cause for the failure of js to build as well.So I guess the first question is if this is intentional or not? If it is, then I guess I'll modify the asterisk recipe to remove the dependency and submit that patch. Otherwise, well, I guess I could attempt to debug and fix the ncurses recipe, but it looks a bit, um, "non-trivial" so any advice would be appreciated.
Or should I just pin ncurses to the old 5.4 version that worked?
5.7 is also broken for sdk build, I'm currently trying to fix this, I've add the link and tested asterisk's build, patch is coming.
Eric
PATCH 1/1 sdk.bbclass: allow virtclass-sdk override
--- classes/sdk.bbclass | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
classes/sdk.bbclass +2 -0
@@ -66,3 +66,5 @@ FILES_${PN}-dbg += "${prefix}/.debug \ " export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" + +OVERRIDES .= ":virtclass-sdk"
Signature · 1 line
1.6.3.3
PATCH 1/1 ncurses-5.7 : fix sdk build + add libtermcap link
In reply to Eric Bénard- fix ncurses-sdk build (compile tested on ubuntu using angstrom 2010.x and 2008.1 for armv6 target on i686 host)
- fix asterisk build (by adding libtermcap's link), compile tested on angstrom 2008.1 for armv6
--- recipes/ncurses/ncurses_5.7.bb | 35 +++++++++++++++++++---------------- 1 files changed, 19 insertions(+), 16 deletions(-)
recipes/ncurses/ncurses_5.7.bb +19 -16
@@ -4,7 +4,7 @@ LICENSE = "MIT" SECTION = "libs" PATCHDATE = "20100501" PKGV = "${PV}+${PATCHDATE}" -PR = "r11" +PR = "r12" DEPENDS = "ncurses-native unifdef-native" DEPENDS_virtclass-native = "unifdef-native"
@@ -32,15 +32,15 @@ EXTRA_AUTORECONF = "-I m4" ENABLE_WIDEC = "true" # Build breaks on Ubuntu else :( ENABLE_WIDEC_virtclass-native = "false" - +ENABLE_WIDEC_virtclass-sdk = "false" # Override the function from the autotools class; ncurses requires a # patched autoconf213 to generate the configure script. This autoconf # is not available so that the shipped script will be used. do_configure() { for i in \ - 'narrowc --with-ticlib' \ - 'widec --enable-widec --without-progs'; do + 'narrowc --with-ticlib' \ + 'widec --with-ticlib --enable-widec --without-progs'; do set -- $i mkdir -p $1 cd $1
@@ -144,6 +144,11 @@ do_install() { ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm fi + cd ${D}${libdir} + ln -sf libncurses.so libtermcap.so + ln -sf libncurses.a libtermcap.a + ln -sf libncurses.so.5 libtermcap.so.5 + if [ "${PN}" = "ncurses" ]; then mv ${D}${bindir}/clear ${D}${bindir}/clear.${PN} mv ${D}${bindir}/reset ${D}${bindir}/reset.${PN}
@@ -155,7 +160,6 @@ python populate_packages_prepend () { do_split_packages(d, libdir, '^lib(.*)\.so\..*', 'ncurses-lib%s', 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) } - pkg_postinst_ncurses-tools () { if [ "${PN}" = "ncurses" ]; then update-alternatives --install ${bindir}/clear clear clear.${PN} 100
@@ -172,16 +176,15 @@ pkg_prerm_ncurses-tools () { BBCLASSEXTEND = "native sdk" -PACKAGES = " \ - ncurses-dbg \ - ncurses-dev \ - ncurses-doc \ - ncurses-tools \ - ncurses \ - ncurses-static \ - ncurses-terminfo \ +PACKAGES += " \ + ${PN}-tools \ + ${PN}-terminfo \ " -RSUGGESTS_${PN} = "ncurses-terminfo" + +RSUGGESTS_${PN} = "${PN}-terminfo" +RPROVIDES_${PN} = "libncurses5" +RCONFLICTS_${PN} = "libncurses5" +RREPLACES_${PN} = "libncurses5" FILES_${PN} = "\ ${bindir}/tput \
@@ -192,7 +195,7 @@ FILES_${PN} = "\ # This keeps only tput/tset in ncurses # clear/reset are in already busybox -FILES_ncurses-tools = "\ +FILES_${PN}-tools = "\ ${bindir}/tic \ ${bindir}/toe \ ${bindir}/infotocap \
@@ -204,6 +207,6 @@ FILES_ncurses-tools = "\ ${bindir}/tabs \ " -FILES_ncurses-terminfo = "\ +FILES_${PN}-terminfo = "\ ${datadir}/terminfo \ "
Signature · 1 line
1.6.3.3
PATCH v2 1/1 ncurses-5.7 : fix sdk build + add libtermcap link
- fix ncurses-sdk build (compile tested on ubuntu using angstrom 2010.x and 2008.1 for armv6 target on i686 host)
- fix asterisk build (by adding libtermcap's link), compile tested on angstrom 2008.1 for armv6
---
v2 : remove wrong RPROVIDES/CONFLICTS/REPLACES
recipes/ncurses/ncurses_5.7.bb | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-)
recipes/ncurses/ncurses_5.7.bb +16 -16
@@ -4,7 +4,7 @@ LICENSE = "MIT" SECTION = "libs" PATCHDATE = "20100501" PKGV = "${PV}+${PATCHDATE}" -PR = "r11" +PR = "r12" DEPENDS = "ncurses-native unifdef-native" DEPENDS_virtclass-native = "unifdef-native"
@@ -32,15 +32,15 @@ EXTRA_AUTORECONF = "-I m4" ENABLE_WIDEC = "true" # Build breaks on Ubuntu else :( ENABLE_WIDEC_virtclass-native = "false" - +ENABLE_WIDEC_virtclass-sdk = "false" # Override the function from the autotools class; ncurses requires a # patched autoconf213 to generate the configure script. This autoconf # is not available so that the shipped script will be used. do_configure() { for i in \ - 'narrowc --with-ticlib' \ - 'widec --enable-widec --without-progs'; do + 'narrowc --with-ticlib' \ + 'widec --with-ticlib --enable-widec --without-progs'; do set -- $i mkdir -p $1 cd $1
@@ -144,6 +144,11 @@ do_install() { ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm fi + cd ${D}${libdir} + ln -sf libncurses.so libtermcap.so + ln -sf libncurses.a libtermcap.a + ln -sf libncurses.so.5 libtermcap.so.5 + if [ "${PN}" = "ncurses" ]; then mv ${D}${bindir}/clear ${D}${bindir}/clear.${PN} mv ${D}${bindir}/reset ${D}${bindir}/reset.${PN}
@@ -155,7 +160,6 @@ python populate_packages_prepend () { do_split_packages(d, libdir, '^lib(.*)\.so\..*', 'ncurses-lib%s', 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) } - pkg_postinst_ncurses-tools () { if [ "${PN}" = "ncurses" ]; then update-alternatives --install ${bindir}/clear clear clear.${PN} 100
@@ -172,16 +176,12 @@ pkg_prerm_ncurses-tools () { BBCLASSEXTEND = "native sdk" -PACKAGES = " \ - ncurses-dbg \ - ncurses-dev \ - ncurses-doc \ - ncurses-tools \ - ncurses \ - ncurses-static \ - ncurses-terminfo \ +PACKAGES += " \ + ${PN}-tools \ + ${PN}-terminfo \ " -RSUGGESTS_${PN} = "ncurses-terminfo" + +RSUGGESTS_${PN} = "${PN}-terminfo" FILES_${PN} = "\ ${bindir}/tput \
@@ -192,7 +192,7 @@ FILES_${PN} = "\ # This keeps only tput/tset in ncurses # clear/reset are in already busybox -FILES_ncurses-tools = "\ +FILES_${PN}-tools = "\ ${bindir}/tic \ ${bindir}/toe \ ${bindir}/infotocap \
@@ -204,6 +204,6 @@ FILES_ncurses-tools = "\ ${bindir}/tabs \ " -FILES_ncurses-terminfo = "\ +FILES_${PN}-terminfo = "\ ${datadir}/terminfo \ "
Signature · 1 line
1.6.3.3
Re: [PATCH v2] ncurses-5.7 : fix sdk build + add libtermcap link
recipes/ncurses/ncurses_5.7.bb EXTRA_AUTORECONF = "-I m4" · line 43
Quoted 4 lines · Eric Bénard
recipes/ncurses/ncurses_5.7.bb +2
-2- 'narrowc --with-ticlib' \ - 'widec --enable-widec --without-progs'; do + 'narrowc --with-ticlib' \ + 'widec --with-ticlib --enable-widec --without-progs'; do
can you place this in a separate patch please?
recipes/ncurses/ncurses_5.7.bb do_install() { · line 149
Quoted 3 lines
recipes/ncurses/ncurses_5.7.bb +3
-0+ cd ${D}${libdir} + ln -sf libncurses.so libtermcap.so + ln -sf libncurses.a libtermcap.a
This part is wrong; libtermcap functionality is provided by libtinfo and does not need whole libncurses.
A linker script libtermcap.so with
| INPUT(-ltinfo)
might be a better solution for .so.
recipes/ncurses/ncurses_5.7.bb do_install() { · line 150
Quoted 1 line
recipes/ncurses/ncurses_5.7.bb +1
-0+ ln -sf libncurses.so.5 libtermcap.so.5
This is not needed; DL_NEEDED will be libtinfo.so.X both if you create a symlink or use the linkerscript. There is nothing with a libtermcap.so.5 SONAME either.
recipes/ncurses/ncurses_5.7.bb pkg_prerm_ncurses-tools () { · line 182
Quoted 12 lines
recipes/ncurses/ncurses_5.7.bb +3
-8-PACKAGES = " \ - ncurses-dbg \ - ncurses-dev \ - ncurses-doc \ - ncurses-tools \ - ncurses \ - ncurses-static \ - ncurses-terminfo \ +PACKAGES += " \ + ${PN}-tools \ + ${PN}-terminfo \ "
please put this into a separate patch.
Enrico
Re: [PATCH v2] ncurses-5.7 : fix sdk build + add libtermcap link
Hi Enrico,
thanks for the review,
Quoted 9 lines · Enrico Scholz
recipes/ncurses/ncurses_5.7.bb EXTRA_AUTORECONF = "-I m4" · line 43
Quoted 4 lines · Eric Bénard
recipes/ncurses/ncurses_5.7.bb +2
-2- 'narrowc --with-ticlib' \ - 'widec --enable-widec --without-progs'; do + 'narrowc --with-ticlib' \ + 'widec --with-ticlib --enable-widec --without-progs'; docan you place this in a separate patch please?
I'm not fully sure of this change, do you think this is needed or is this a mistake ?
Quoted 8 lines
recipes/ncurses/ncurses_5.7.bb do_install() { · line 149
Quoted 4 lines
recipes/ncurses/ncurses_5.7.bb +3
-0+ cd ${D}${libdir} + ln -sf libncurses.so libtermcap.so + ln -sf libncurses.a libtermcap.aThis part is wrong; libtermcap functionality is provided by libtinfo and does not need whole libncurses.
that's the way it's done on ubuntu so I thought this could be ok -but it seems there is no libtinfo on ubuntu which may explain this point), I will switch the link to libtinfo and test asterisk build.
Quoted 6 lines
recipes/ncurses/ncurses_5.7.bb do_install() { · line 150
Quoted 1 line
recipes/ncurses/ncurses_5.7.bb +1
-0+ ln -sf libncurses.so.5 libtermcap.so.5This is not needed;
DL_NEEDEDwill be libtinfo.so.X both if you create a symlink or use the linkerscript. There is nothing with a libtermcap.so.5 SONAME either.
yes this was a test, I forget to remove this line sorry.
Eric
Re: [PATCH v2] ncurses-5.7 : fix sdk build + add libtermcap link
Quoted 9 lines · Eric Bénard
Quoted 7 lines
recipes/ncurses/ncurses_5.7.bb EXTRA_AUTORECONF = "-I m4" · line 43
Quoted 4 lines
recipes/ncurses/ncurses_5.7.bb +2
-2- 'narrowc --with-ticlib' \ - 'widec --enable-widec --without-progs'; do + 'narrowc --with-ticlib' \ + 'widec --with-ticlib --enable-widec --without-progs'; docan you place this in a separate patch please?
I'm not fully sure of this change, do you think this is needed or is this a mistake ?
I do not see a reason, not to apply '--with-ticlib' to widec. I changed this in git.
Thanks for noticing it
Enrico
Re: [PATCH v2] ncurses-5.7 : fix sdk build + add libtermcap link
Hi Enrico,
Quoted 5 lines · Enrico Scholz
I do not see a reason, not to apply '--with-ticlib' to widec. I changed this in git.
Thanks for noticing it
well if the meaning of noticing is spending 2 days on this recipe trying to fix it, yes I noticed it :-) Thanks for finishing the work, I'm currently rebuilding from scratch to test.
Eric
Quoted 1 line · Eric Bénard
5.7 is also broken for sdk build,
I think that I fixed widec builds for native targets in git. 'sdk' and 'native' works on Fedora 13 now; please check other distributions.
Enrico
Quoted 3 lines · Mike Westerhof
I've been working on some recent problems that popped up in the SlugOS feeds; one that appeared recently is that asterisk no longer builds; configure complains about -ltermcap,
When I remembed an irc discussion, asterisk (tested on version 1.6.0.28) is able to use -ltinfo from recent ncurses. afair, the explicit
--with-termcap=${STAGING_EXECPREFIXDIR}must be removed from the recipe too.
Quoted 1 line
and investigation shows that indeed, libtermcap is missing.
libtermcap is dead and unmaintained since 1996 (!). Recent software should be able to use -ltinfo instead of -ltermcap.
Quoted 3 lines
It seems that the new ncurses recipe (5.7) no longer builds it for some reason. I think the same problem is the root cause for the failure of js to build as well.
Recent js-1.8.0rc1 brings in the -ltermcap by
| ifdef JS_READLINE | ... | PROG_LIBS += -lreadline -ltermcap
libreadline itself should be linked against the correct termcap library (ltinfo or ltermcap) so that this '-ltermcap' can be removed.
Accordingly Makefile.ref, the '-DUSE_TERMCAP' option requires manual addition of '-ltermcap' to LDFLAGS (which is btw usually the wrong variable for extra libraries).
So, when somebody revives the js recipe (last package specific changes were in Feb 2007) and sets '-DUSE_TERMCAP', (s)he should link against '-ltinfo'.
Quoted 5 lines
So I guess the first question is if this is intentional or not? If it is, then I guess I'll modify the asterisk recipe to remove the dependency and submit that patch. Otherwise, well, I guess I could attempt to debug and fix the ncurses recipe, but it looks a bit, um, "non-trivial" so any advice would be appreciated.
We could provide like Fedora a linkerscript 'libtermcap.so' with
| INPUT(-ltinfo)
content. But I am not sure whether -ltinfo is really 100% compatible to -ltermcap and if such a workaround would break autodetection which checks whether termcap or tinfo is to be used.
Enrico