[Pkg-firebird-general] Bug#283911: firebird2: FTBFS with kerberos4kth-dev 1.2.2-11: undefined reference to `strunvis'

Kalle Olavi Niemitalo Kalle Olavi Niemitalo <kon@iki.fi>, 283911@bugs.debian.org
Thu, 02 Dec 2004 09:13:42 +0200


Package: firebird2
Version: 1.5.1-4
Severity: normal

My attempt to build firebird2 failed today.  Here are the
relevant parts of the build log:

> checking for vis.h... yes
...
> checking for strvis... no
> checking for strunvis... no
...
> gcc -c  -Wall -pipe -g3 -O '-D__RCSID(x)=' '-D__COPYRIGHT(x)=' '-D__RENAME(x)=' '-D_DIAGASSERT(x)=' -I. np/vis.c -o np/vis.o_a
> gcc -c  -Wall -pipe -g3 -O '-D__RCSID(x)=' '-D__COPYRIGHT(x)=' '-D__RENAME(x)=' '-D_DIAGASSERT(x)=' -I. np/unvis.c -o np/unvis.o_a
...
> /usr/bin/ar cru libedit.a editline.o_a np/strlcat.o_a np/strlcpy.o_a np/fgetln.o_a np/vis.o_a np/unvis.o_a history.o_a tokenizer.o_a readline.o_a
> ranlib libedit.a
...
> g++  ../temp/static.isql/isql/extract.o ../temp/static.isql/isql/isql.o ../temp/static.isql/isql/show.o -o ../gen/firebird/bin/isql_static -L../gen/firebird/lib -lfbstatic -lfbcommon -lcurses -lcrypt -lpthread -lm -lc -ldl  -leditline
> ../temp/static.isql/isql/isql.o(.text+0x933a): In function `add_row(char*)':
> ../src/isql/isql.cpp:2538: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
> ../gen/firebird/lib/libeditline.a(readline.o_a)(.text+0x2ac7): In function `rl_add_defun':
> /var/tmp/kalle/debian/firebird2-1.5.1/src/extern/editline/readline.c:1987: undefined reference to `vis'
> ../gen/firebird/lib/libeditline.a(history.o_a)(.text+0x8e2): In function `history_load':
> /var/tmp/kalle/debian/firebird2-1.5.1/src/extern/editline/history.c:689: undefined reference to `strunvis'
> ../gen/firebird/lib/libeditline.a(history.o_a)(.text+0xa5c): In function `history_save':
> /var/tmp/kalle/debian/firebird2-1.5.1/src/extern/editline/history.c:740: undefined reference to `strvis'
> collect2: ld returned 1 exit status
> make[4]: *** [../gen/firebird/bin/isql_static] Error 1
> rm ../src/isql/isql.cpp ../src/isql/extract.cpp ../src/isql/show.cpp
> make[4]: Leaving directory `/var/tmp/kalle/debian/firebird2-1.5.1/src'
> make[3]: *** [isql_static] Error 2
> make[3]: Leaving directory `/var/tmp/kalle/debian/firebird2-1.5.1/src'
> make[2]: *** [../gen/firebird/security.fdb] Error 2
> make[2]: Leaving directory `/var/tmp/kalle/debian/firebird2-1.5.1/src'
> make[1]: *** [firebird] Error 2
> make[1]: Leaving directory `/var/tmp/kalle/debian/firebird2-1.5.1'
> make: *** [build-super-server] Error 2

Generated firebird2-1.5.1/src/extern/editline/config.h:

> /* config.h.  Generated automatically by configure.  */
> /* #undef SUNOS */
> 
> #define HAVE_SYS_CDEFS_H 1
> #define HAVE_TERMCAP_H 1
> /* #undef HAVE_CURSES_H */
> /* #undef HAVE_NCURSES_H */
> /* #undef HAVE_TERM_H */
> #define HAVE_VIS_H 1
> /* #undef HAVE_ALLOCA_H */
> 
> /* #undef HAVE_ISSETUGID */
> /* #undef HAVE_STRLCAT */
> /* #undef HAVE_STRLCPY */
> /* #undef HAVE_FGETLN */
> /* #undef HAVE_STRVIS */
> /* #undef HAVE_STRUNVIS */
> 
> #include "sys.h"

The configure script detected /usr/include/vis.h from
kerberos4kth-dev 1.2.2-11 and defined HAVE_VIS_H, causing
editline/np/vis.c and editline/np/unvis.c not to define any
functions.  However, strvis() and strunvis() are in
/usr/lib/libroken.{a,so} rather than in libc, so the linker
didn't find them.

I think it would be reasonable to remove the HAVE_VIS_H check
from vis.c and unvis.c.  The configure script already arranges
to compile those files only if it doesn't find strvis() and
strunvis() in system libraries.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.23-kon.astalo.1
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8