Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 475800 - dev-lang/erlang with sys-libs/ncurses[tinfo] - configure: error: No curses library functions found
Summary: dev-lang/erlang with sys-libs/ncurses[tinfo] - configure: error: No curses li...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Dirkjan Ochtman
URL: https://github.com/erlang/otp/pull/123
Whiteboard:
Keywords:
Depends on:
Blocks: tinfo
  Show dependency tree
 
Reported: 2013-07-05 07:40 UTC by Thomas Stein
Modified: 2013-11-04 18:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Stein 2013-07-05 07:40:24 UTC
Hello.

If i have ncurses emerged with "tinfo" configure of erlang fails with:

checking for tgetent in -lncurses... no
checking for tgetent in -lcurses... no
checking for tgetent in -ltermcap... no
checking for tgetent in -ltermlib... no
configure: error: No curses library functions found
configure: error: /bin/sh '/var/tmp/portage/dev-lang/erlang-15.2.3.1/work/otp_src_R15B03/erts/configure' failed for erts

Without "tinfo" everything runs fine.

Reproducible: Always
Comment 1 Dirkjan Ochtman gentoo-dev 2013-07-06 14:43:43 UTC
Can you try with erlang-16?
Comment 2 Boris 2013-08-10 11:02:04 UTC
I'm not the reporter, but I'm experiencing the same problem and tried erlang-16, which results in the same problem:

checking for tgetent in -lncurses... no
checking for tgetent in -lcurses... no
checking for tgetent in -ltermcap... no
checking for tgetent in -ltermlib... no
configure: error: No curses library functions found
configure: error: /bin/sh '/var/tmp/paludis/dev-lang-erlang-16/work/otp_src_R16B/erts/configure' failed for erts


But perhaps I can add something other that might be useful. I had the same problem with ddd, which also didn't find a curses-library. There is a bug-report for that too (see #458186) and in the comments for that bug, there is a workaround that helps for erlang too:

https://bugs.gentoo.org/show_bug.cgi?id=458186#c3

Basically removing --as-needed from the LDFLAGS helps for ddd and apparently for erlang too. Normally my LDFLAGS are
> LDFLAGS=-Wl,-O1 -Wl,--as-needed
which I guess is the default as I don't set them myself. After setting them to
> LDFLAGS=-Wl,-O1
for dev-lang/erlang the package compiled without any problems.
Comment 3 Dirkjan Ochtman gentoo-dev 2013-08-19 11:51:50 UTC
That's the kind of workaround I don't think we'd want in the tree.
Comment 4 Boris 2013-08-19 16:51:58 UTC
(In reply to Dirkjan Ochtman from comment #3)
> That's the kind of workaround I don't think we'd want in the tree.

Nor did I say it should go into the tree! I just thought it might help to know that there is a workaround, even if its a hack. Sometimes such workarounds might help to locate a problem because they hint at the cause.
Comment 5 Dirkjan Ochtman gentoo-dev 2013-11-04 14:13:59 UTC
This seems to work:

--- erts/configure.in.bak	2013-11-04 14:47:47.838188678 +0100
+++ erts/configure.in	2013-11-04 14:46:54.352439671 +0100
@@ -1322,7 +1322,7 @@
 if test "x$with_termcap" != "xno" &&
    test "X$host" != "Xwin32"; then
     # try these libs
-    termcap_libs="ncurses curses termcap termlib"
+    termcap_libs="tinfo ncurses curses termcap termlib"
 
     for termcap_lib in $termcap_libs; do
 	AC_CHECK_LIB($termcap_lib, tgetent, TERMCAP_LIB="-l$termcap_lib")

Any comments?
Comment 6 Dirkjan Ochtman gentoo-dev 2013-11-04 18:03:09 UTC
Fixed in 16.1-r1 and 16.2:

+  04 Nov 2013; Dirkjan Ochtman <djc@gentoo.org> erlang-16.1-r1.ebuild,
+  erlang-16.2.ebuild:
+  Properly use autotools, fix tinfo for 16.1-r1 (bug 475800).