Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 01 Dec 1998 18:38:10 +0100
From:      "José Mª Alcaide" <jose@we.lc.ehu.es>
To:        obrien@NUXI.com
Cc:        Nathan Dorfman <nathan@rtfm.net>, freebsd-current@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG
Subject:   Re: [patch] libmytinfo breaks vim-5.3 port, maybe others?
Message-ID:  <36642982.9B0D6B66@we.lc.ehu.es>
References:  <19981023205115.A5357@rtfm.net> <19981129004517.B28637@nuxi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
David O'Brien wrote:
> 
> > Vim-5.3 (compiled from ports) won't run in -g (gvim) mode with
> > libmytinfo. At first I thought it was vim breakage, or Motif/Athena
> > or even X11 breakage. But read on:
> 
> ..snip..
> 
> > Anyway, I noticed something weird:
> >
> >         libmytinfo.so.2 => /usr/lib/libmytinfo.so.2 (0x2834b000)
> 
> This is automatically linked in if libncurses is being used.
> 

Apply this patch to the vim5 port's Makefile:

--------------------------------Cut------------------------------------
--- Makefile.orig       Thu Oct 15 02:35:11 1998
+++ Makefile    Tue Dec  1 18:12:12 1998
@@ -29,7 +29,7 @@
 
 WRKSRC=                ${WRKDIR}/${DISTNAME}/src
 PATCH_DIST_ARGS=       -d ${WRKDIR}/${DISTNAME} --forward --quiet -E ${PATCH_DIST_STRIP}
-MAKE_FLAGS=    CONF_ARGS="--prefix=${PREFIX} --enable-max-features" -f
+MAKE_FLAGS=    CONF_ARGS="--prefix=${PREFIX} --enable-max-features --with-tlib=termlib" -f
 ALL_TARGET=    #
 MAN1=          vim.1 xxd.1 ectags.1
 
--------------------------------Cut------------------------------------

This patch forces linking against termlib instead of ncurses. Obviously
this is only a workaround for a problem in the ncurses library.

The vim5.3's "configure" script checks for tgetent() in ncurses. It's
found in the 3.0 libncurses (so vim is linked with it), but this
check fails under FreeBSD 2.2.x, so it's linked with libtermlib.

BTW, I've just found a flaw related to the termcap and termlib
libraries in /usr/lib under FreeBSD-3.0-RELEASE. Watch the output of
ls -li *term*:

23269 -r--r--r--  2 root  wheel  18522 17 oct 18:59 libtermcap.a
23271 lrwxrwxrwx  1 root  wheel     15  9 nov 17:01 libtermcap.so -> libtermcap.so.2
23270 -r--r--r--  1 root  wheel  15108 17 oct 18:59 libtermcap.so.2
23682 -r--r--r--  2 root  wheel  19760 16 oct 18:06 libtermcap_p.a
23269 -r--r--r--  2 root  wheel  18522 17 oct 18:59 libtermlib.a
23272 lrwxrwxrwx  1 root  wheel     15  9 nov 17:01 libtermlib.so -> libtermcap.so.2
23682 -r--r--r--  2 root  wheel  19760 16 oct 18:06 libtermlib_p.a

There is no libtermlib.so.2!! This explains the output of the
command "ldconfig -r | fgrep term":

        7:-ltermcap.2 => /usr/lib/libtermcap.so.2

libtermlib.so.2 does not appear. It seems there is a bug in the
installation script of this libraries. Until it's fixed, the
solution is easy:

  cd /usr/lib
  rm libtermlib.so
  ln libtermcap.so.2 libtermlib.so.2
  ln -s libtermlib.so.2 libtermlib.so

And that's all.

-- JMA
-----------------------------------------------------------------------
José Mª Alcaide                         | mailto:jose@we.lc.ehu.es
Universidad del País Vasco              | http://www.we.lc.ehu.es/~jose
Dpto. de Electricidad y Electrónica     |
Facultad de Ciencias - Campus de Lejona | Tel.:  +34-946012479
48940 Lejona (Vizcaya) - SPAIN          | Fax:   +34-944858139
-----------------------------------------------------------------------
               "Go ahead... make my day." - H. Callahan

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36642982.9B0D6B66>