Subject: devel/ncurses version numbering/libtool question
To: None <tech-pkg@netbsd.org>
From: Georg Schwarz <georg.schwarz@freenet.de>
List: tech-pkg
Date: 11/21/2004 22:16:42
I'm compiling devel/ncurses 5.4 on IRIX 5.3.
The funny thing is, all shared libs are installed with a suffix of 6.4,
not 5.4 as I would have expected.
I pinned it done to the following behaviour of libtool:
bash-2.05b$ /usr/local/pkg/bin/libtool --mode=link cc -o libpanel.la
../obj_lo/panel.lo ../obj_lo/p_above.lo ../obj_lo/p_below.lo
../obj_lo/p_bottom.lo ../obj_lo/p_delete.lo ../obj_lo/p_hide.lo
../obj_lo/p_hidden.lo ../obj_lo/p_move.lo ../obj_lo/p_new.lo
../obj_lo/p_replace.lo ../obj_lo/p_show.lo ../obj_lo/p_top.lo
../obj_lo/p_update.lo ../obj_lo/p_user.lo ../obj_lo/p_win.lo -rpath
/usr/local/pkg/lib -version-info 5:4 -L../lib ../lib/libncurses.la
-L/usr/people/schwarz/pkgsrc/devel/ncurses/work/.buildlink/lib
rm -fr .libs/libpanel.a .libs/libpanel.la .libs/libpanel.lai
.libs/libpanel.so .libs/libpanel.so.6 .libs/libpanel.so.6.4
ld -shared ../obj_lo/.libs/panel.o ../obj_lo/.libs/p_above.o
../obj_lo/.libs/p_below.o ../obj_lo/.libs/p_bottom.o
../obj_lo/.libs/p_delete.o ../obj_lo/.libs/p_hide.o
../obj_lo/.libs/p_hidden.o ../obj_lo/.libs/p_move.o
../obj_lo/.libs/p_new.o ../obj_lo/.libs/p_replace.o
../obj_lo/.libs/p_show.o ../obj_lo/.libs/p_top.o
../obj_lo/.libs/p_update.o ../obj_lo/.libs/p_user.o
../obj_lo/.libs/p_win.o -rpath
/usr/people/schwarz/pkgsrc/devel/ncurses/work/ncurses-5.4/lib/.libs:/usr
/local/pkg/lib
-L/usr/people/schwarz/pkgsrc/devel/ncurses/work/.buildlink/lib
-L/usr/people/schwarz/pkgsrc/devel/ncurses/work/ncurses-5.4/lib
../lib/.libs/libncurses.so -lc -soname libpanel.so.6 `test -n
"sgi6.3:sgi6.2:sgi6.1:sgi6.0:sgi6.4" && echo -set_version
sgi6.3:sgi6.2:sgi6.1:sgi6.0:sgi6.4` -update_registry .libs/so_locations
-o .libs/libpanel.so.6.4
...
although -version-info is set to 5:4 the version naming uses so.6.4.
This is probably not intended; or is it???
Libtool says:
...
number_major="$2"
number_minor="$3"
number_revision="$4"
#
# There are really only two kinds -- those that
# use the current revision as the major version
# and those that subtract age and use age as
# a minor version. But, then there is irix
# which has an extra 1 added just for fun
#
I really don't understand this...
Anyway, when I use in the above command line -version-number instead of
-version-info I get:
bash-2.05b$ /usr/local/pkg/bin/libtool --mode=link cc -o libpanel.la
../obj_lo/panel.lo ../obj_lo/p_above.lo ../obj_lo/p_below.lo
../obj_lo/p_bottom.lo ../obj_lo/p_delete.lo ../obj_lo/p_hide.lo
../obj_lo/p_hidden.lo ../obj_lo/p_move.lo ../obj_lo/p_new.lo
../obj_lo/p_replace.lo ../obj_lo/p_show.lo ../obj_lo/p_top.lo
../obj_lo/p_update.lo ../obj_lo/p_user.lo ../obj_lo/p_win.lo -rpath
/usr/local/pkg/lib -version-number 5:4 -L../lib ../lib/libncurses.la
-L/usr/people/schwarz/pkgsrc/devel/ncurses/work/.buildlink/lib
ld -shared ../obj_lo/.libs/panel.o ../obj_lo/.libs/p_above.o
../obj_lo/.libs/p_below.o ../obj_lo/.libs/p_bottom.o
../obj_lo/.libs/p_delete.o ../obj_lo/.libs/p_hide.o
../obj_lo/.libs/p_hidden.o ../obj_lo/.libs/p_move.o
../obj_lo/.libs/p_new.o ../obj_lo/.libs/p_replace.o
../obj_lo/.libs/p_show.o ../obj_lo/.libs/p_top.o
../obj_lo/.libs/p_update.o ../obj_lo/.libs/p_user.o
../obj_lo/.libs/p_win.o -rpath
/usr/people/schwarz/pkgsrc/devel/ncurses/work/ncurses-5.4/lib/.libs:/usr
/local/pkg/lib
-L/usr/people/schwarz/pkgsrc/devel/ncurses/work/.buildlink/lib
-L/usr/people/schwarz/pkgsrc/devel/ncurses/work/ncurses-5.4/lib
../lib/.libs/libncurses.so -lc -soname libpanel.so.5 `test -n
"sgi5.3:sgi5.2:sgi5.1:sgi5.0:sgi5.4" && echo -set_version
sgi5.3:sgi5.2:sgi5.1:sgi5.0:sgi5.4` -update_registry .libs/so_locations
-o .libs/libpanel.so.5.4
(cd .libs && rm -f libpanel.so.5 && ln -s libpanel.so.5.4 libpanel.so.5)
(cd .libs && rm -f libpanel.so && ln -s libpanel.so.5.4 libpanel.so)
(cd .libs && rm -f libpanel.so && ln -s libpanel.so.5.4 libpanel.so)
ar cru .libs/libpanel.a ../obj_lo/panel.o ../obj_lo/p_above.o
../obj_lo/p_below.o ../obj_lo/p_bottom.o ../obj_lo/p_delete.o
../obj_lo/p_hide.o ../obj_lo/p_hidden.o ../obj_lo/p_move.o
../obj_lo/p_new.o ../obj_lo/p_replace.o ../obj_lo/p_show.o
../obj_lo/p_top.o ../obj_lo/p_update.o ../obj_lo/p_user.o
../obj_lo/p_win.o
which seems to be correct to me.
Is this a bug in libtool, or in ncurses, or what else?
I would like to get a better understanding before I file a PR.
--
Georg Schwarz http://home.pages.de/~schwarz/
georg.schwarz@freenet.de +49 177 8811442