Opened 3 years ago

Closed 3 years ago

#21706 closed enhancement (fixed)

Fix autotools/texinfo/ncurses problem, change autotools package from experimental to optional

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-7.4
Component: packages: optional Keywords:
Cc: jdemeyer, embray, dimpase Merged in:
Authors: Matthias Koeppe Reviewers: Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: b45c642 (Commits) Commit: b45c642549d2f00eb13e15c729eadfdedce381ee
Dependencies: Stopgaps:

Description (last modified by mkoeppe)

The autotools package was changed from optional to experimental in #18563, which made this change for various packages.

The reason for changing autotools (missing xz dependency of libtool) has since been fixed in #21047.

The branch also fixes a build problem of autotools (texinfo) involving ncurses.

Attachments (1)

autotools-20141105.log (59.1 KB) - added by dimpase 3 years ago.
log with sage 7.4.rc2

Download all attachments as: .zip

Change History (17)

comment:1 Changed 3 years ago by mkoeppe

  • Branch set to u/mkoeppe/change_autotools_from_experimental_to_optional

comment:2 Changed 3 years ago by mkoeppe

  • Commit set to d7a8cd5024add284c948f60dd1c43f4564a2a995
  • Milestone changed from sage-7.5 to sage-7.4
  • Status changed from new to needs_review

New commits:

d7a8cd5Change autotools from experimental to optional

comment:3 Changed 3 years ago by mkoeppe

  • Authors set to Matthias Koeppe

comment:4 Changed 3 years ago by dimpase

  • Status changed from needs_review to needs_work

autotools does not build for me, it seems to be a linking problem to ncurses:

...
gcc  -g -O2  -L/home/dima/Sage/sage/local/lib -Wl,-rpath,/home/dima/Sage/sage/local/lib  -o infokey infokey.o key.o ../lib/libtxi.a ../gnulib/lib/libgnu.a  
terminal.o: In function `terminal_get_screen_size':
/home/dima/Sage/sage/local/var/tmp/sage/build/autotools-20141105/src/texinfo-4.13/info/terminal.c:481: undefined reference to `tgetnum'
/home/dima/Sage/sage/local/var/tmp/sage/build/autotools-20141105/src/texinfo-4.13/info/terminal.c:493: undefined reference to `tgetnum'
terminal.o: In function `terminal_goto_xy':
/home/dima/Sage/sage/local/var/tmp/sage/build/autotools-20141105/src/texinfo-4.13/info/terminal.c:235: undefined reference to `tgoto'
terminal.o: In function `terminal_delete_lines':
/home/dima/Sage/sage/local/var/tmp/sage/build/autotools-20141105/src/texinfo-4.13/info/terminal.c:365: undefined reference to `tgoto'
/home/dima/Sage/sage/local/var/tmp/sage/build/autotools-20141105/src/texinfo-4.13/info/terminal.c:365: undefined reference to `tputs'
/home/dima/Sage/sage/local/var/tmp/sage/build/autotools-20141105/src/texinfo-4.13/info/terminal.c:369: undefined reference to `tputs'
terminal.o: In function `terminal_insert_lines':
/home/dima/Sage/sage/local/var/tmp/sage/build/autotools-20141105/src/texinfo-4.13/info/terminal.c:389: undefined reference to `tgoto'
/home/dima/Sage/sage/local/var/tmp/sage/build/autotools-20141105/src/texinfo-4.13/info/terminal.c:389: undefined reference to `tputs'
...

comment:5 Changed 3 years ago by mkoeppe

I think we'd need a bit more info to debug this...

Changed 3 years ago by dimpase

log with sage 7.4.rc2

comment:6 Changed 3 years ago by dimpase

the interesting part of the attached log is

checking build system type... (cached) x86_64-unknown-linux-gnu
checking for tgetent in -lncurses... no
checking for tgetent in -lcurses... no
checking for tgetent in -ltermlib... no
checking for tgetent in -ltermcap... no
checking for tgetent in -lterminfo... no
configure: WARNING: probably need a terminal library, one of: ncurses curses termlib
 termcap terminfo
checking for library with termcap variables... 

while ncurses package is installed; my guess is that perhaps the appropriate -L is missing in LDFLAGS.

Anyhow, I don't see exactly what's happening in spkg-install, and why is does not run ./confgure, which would be an appropriate place to pass proper -L.

comment:7 Changed 3 years ago by mkoeppe

It does run configure of all the packages involved, in Makefile.build.

Here (on Mac OS X) I see:

[autotools-20141105] checking for tgetent in -lncurses... no
[autotools-20141105] checking for tgetent in -lcurses... no
[autotools-20141105] checking for tgetent in -ltermlib... no
[autotools-20141105] checking for tgetent in -ltermcap... yes
[autotools-20141105] checking for library with termcap variables... 

So on this system, tgetent is not provided by the ncurses library (from Sage's ncurses spkg) either, but rather from libtermcap.

comment:8 Changed 3 years ago by mkoeppe

Our ncurses package is built using configure option --with-termlib, which causes tgetent and friends to be put into the separate library libtinfo, not libncurses.

The ancient texinfo 4.13 that is used by our autotools package (with comment "texinfo 5.x breaks building old versions of autotools...") does not know about libtinfo.

comment:9 Changed 3 years ago by git

  • Commit changed from d7a8cd5024add284c948f60dd1c43f4564a2a995 to b45c642549d2f00eb13e15c729eadfdedce381ee

Branch pushed to git repo; I updated commit sha1. New commits:

b45c642Patch the texinfo configure script to check libtinfo

comment:10 Changed 3 years ago by mkoeppe

  • Status changed from needs_work to needs_review

Please try with this patch.

comment:11 Changed 3 years ago by dimpase

  • Reviewers set to Dima Pasechnik
  • Status changed from needs_review to positive_review

OK, this works. Although I think we should update this package to newer autotools (not on this ticket though).

comment:12 Changed 3 years ago by mkoeppe

Thanks!

Could you also take a look at:

  • #21525 needs_review enhancement - package autotools: Don't depend on $SAGE_LOCAL

Updating autotools is #21196.

comment:13 Changed 3 years ago by mkoeppe

  • Description modified (diff)

comment:14 Changed 3 years ago by mkoeppe

  • Summary changed from Change autotools from experimental to optional to Fix autotools/texinfo/ncurses problem, change autotools package from experimental to optional

comment:15 Changed 3 years ago by mkoeppe

  • Description modified (diff)

comment:16 Changed 3 years ago by vbraun

  • Branch changed from u/mkoeppe/change_autotools_from_experimental_to_optional to b45c642549d2f00eb13e15c729eadfdedce381ee
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.