[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: src/term_curses.o: undefined reference to symbol 'tigetstr'

From: Jeffrey Walton
Subject: Re: src/term_curses.o: undefined reference to symbol 'tigetstr'
Date: Sun, 9 Feb 2020 03:41:20 -0500

On Sun, Feb 9, 2020 at 2:50 AM Jeffrey Walton <address@hidden> wrote:
> I'm building Zile 2.4.14 from the release tarball. Configure and build
> goes OK, but the final link fails at:
> gcc -g2 -O2 -march=native -fPIC -pthread
> -L/home/jwalton/tmp/build-test/lib -Wl,-R,'$ORIGIN/../lib'
> -Wl,-R,/home/jwalton/tmp/build-test/lib -Wl,--enable-new-dtags -o
> src/zile src/basic.o src/bind.o src/buffer.o src/eval.o src/file.o
> src/funcs.o src/help.o src/killring.o src/line.o src/gc_veneer.o
> src/lisp.o src/macro.o src/redisplay.o src/registers.o src/search.o
> src/undo.o src/variables.o src/window.o src/memrmem.o src/astr.o
> src/estr.o src/lists.o src/completion.o src/editfns.o src/getkey.o
> src/history.o src/keycode.o src/main.o src/marker.o src/minibuf.o
> src/region.o src/term_minibuf.o src/term_redisplay.o src/term_curses.o
>  ./lib/libzile.a -lncurses -lgc -ldl -lpthread
> /usr/bin/ld: src/term_curses.o: undefined reference to symbol 'tigetstr'
> /home/jwalton/tmp/build-test/lib/../lib/libtinfo.so.6: error adding
> symbols: DSO missing from command line
> collect2: error: ld returned 1 exit status
> It looks like libtinfo hash the symbol:
>     $ nm -g ~/tmp/build-test/lib/libtinfo.so.6 | grep tigetstr
>     0000000000015ce0 T tigetstr
>     0000000000015be0 T tigetstr_sp
> But it looks like the final link is missing the libtinfo library:
>     ... src/term_curses.o  ./lib/libzile.a -lncurses -lgc -ldl -lpthread
> I configured with:
>     --prefix=/home/jwalton/tmp/build-test
>     --libdir=/home/jwalton/tmp/build-test/lib
> And /home/jwalton/tmp/build-test/lib/pkgconfig shows the libtinfo library.

So this was cleared with:

echo "Patching Makefiles..."
(IFS="\r\n" find "$PWD" -name 'Makefile' -print | while read -r file
    cp -p "$file" "$file.fixed"
    sed 's|-lncurses|-lncurses -ltinfo|g' "$file" > "$file.fixed"
    mv "$file.fixed" "$file"

I guess configure.ac should have a:

    AC_SEARCH_LIBS([tigetstr], [ncurses tinfo])


reply via email to

[Prev in Thread] Current Thread [Next in Thread]