Ticket #7821 (closed defect: fixed)

Opened 3 years ago

Last modified 19 months ago

readline-6.0.p1 fails on FreeBSD

Reported by: pjeremy Owned by: pjeremy
Priority: major Milestone: sage-4.5
Component: porting: BSD Keywords:
Cc: Work issues:
Report Upstream: N/A Reviewers: Mike Hansen
Authors: Peter Jeremy Merged in: sage-4.5.alpha0
Dependencies: Stopgaps:

Description

readline-6.0.p1/spkg-install contains a typo in some FreeBSD-specific code, leading to the following error:

...
/bin/sh ../support/shlib-install -O freebsd8.0 -d /home/peter/sage/sage-4.3/local/lib -b /home/peter/sage/sage-4.3/local/bin -i "/usr/bin/install -c -m 644" libreadline.so.6.0
install: you may need to run ldconfig
make[1]: Leaving directory `/home/peter/sage/sage-4.3/spkg/build/readline-6.0.p1/src/shlib'
ln: SAGE_LOCAL/lib/libreadline.so: No such file or directory

The affected code is no longer required with readline-6.0 so delete it.

FreeBSD 3.x and later default to ELF, rather then a.out. A utility objformat(1) was temporarily introduced to enable third-party applications to determine te object format. This has now been deleted and code should assume ELF format if it does not exist. Explicitly linking libreadline against libtermcap is necessary to ensure that dependencies are picked up.

Attachments

7821-readline.patch Download (1.1 KB) - added by pjeremy 3 years ago.

Change History

Changed 3 years ago by pjeremy

comment:1 Changed 3 years ago by pjeremy

  • Status changed from new to needs_review

comment:2 Changed 3 years ago by pjeremy

  • Authors set to Peter Jeremy

comment:3 Changed 3 years ago by mhansen

  • Status changed from needs_review to positive_review
  • Reviewers set to Mike Hansen

This looks good to me. I've made an spkg out of the changes at  http://sage.math.washington.edu/home/mhansen/readline-6.0.p2.spkg

comment:4 Changed 3 years ago by rlm

  • Status changed from positive_review to closed
  • Resolution set to fixed
  • Merged in set to sage-4.5.alpha0

comment:5 Changed 19 months ago by leif

For the record:

The proper fix (btw. also for a couple of other systems, like Arch Linux, OpenSuSE and meanwhile also Ubuntu 11.10 I think) is to add $(TERMCAP_LIB) to the link command of libreadline.so in src/shlib/Makefile.in, rather than setting SHLIB_LIBS='-ltermcap'. This is more generic, since readline's configure determines what the proper libtermcap (or its replacement) is. No need to special-case on the platform (operating system / distro).

Note: See TracTickets for help on using tickets.