{"thread":{"id":"25170","subject":"[tig] compilation error: undefined reference to `set_tabsize'","startedAt":"2010-09-20T17:42:00Z","lastAt":"2010-09-21T17:34:37Z","messageCount":9,"participants":["Nicolas Sebrecht","Stefan Näwe","Jonas Fonseca","Kumar Appaiah","Stefan Naewe"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"151136","messageId":"20100920174200.GA13017@vidovic","threadId":"25170","inReplyTo":null,"subject":"[tig] compilation error: undefined reference to `set_tabsize'","fromName":"Nicolas Sebrecht","fromEmail":"nicolas.s.dev@gmx.fr","sentAt":"2010-09-20T17:42:00Z","receivedAt":"2010-09-20T17:42:00Z","isPatch":false,"sender":{"key":"nicolas.s.dev@gmx.fr","avatar":null},"body":"Hi,\n\ntig don't compile anymore here:\n\n  % make\n  gcc   tig.o  -lncursesw  -o tig\n  tig.o: In function `init_display': tig.c:7113: undefined reference to `set_tabsize'\n  collect2: ld returned 1 exit status\n  make: *** [tig] Error 1\n  %\n\n\nand bisected on\n\ncommit f1fe753be71ef3ce5abcbb16c2a359f97e5c7e7d\nAuthor: Stefan Naewe <>\nDate:   Sun Sep 12 11:03:52 2010 +0200\n\n    Use function set_tabsize()\n    \n    this fixes the following compile error on cygwin:\n    tig.c: In function `init_display':\n    tig.c:7112: error: invalid lvalue in assignment\n    \n    Signed-off-by: Stefan Naewe <>\n    Signed-off-by: Jonas Fonseca <>\n\n\nOr did I missed something?\n\n-- \nNicolas Sebrecht\n"},{"id":"151141","messageId":"loom.20100920T203217-346@post.gmane.org","threadId":"25170","inReplyTo":"20100920174200.GA13017@vidovic","subject":"Re: [tig] compilation error: undefined reference to `set_tabsize'","fromName":"Stefan Näwe","fromEmail":"stefan.naewe@googlemail.com","sentAt":"2010-09-20T18:36:03Z","receivedAt":"2010-09-20T18:36:03Z","isPatch":false,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"Nicolas Sebrecht <nicolas.s.dev <at> gmx.fr> writes:\n\n> \n> Hi,\n> \n> tig don't compile anymore here:\n> \n>   % make\n>   gcc   tig.o  -lncursesw  -o tig\n>   tig.o: In function `init_display': tig.c:7113: undefined reference to \n`set_tabsize'\n>   collect2: ld returned 1 exit status\n>   make: *** [tig] Error 1\n>   %\n> \n> and bisected on\n> \n> commit f1fe753be71ef3ce5abcbb16c2a359f97e5c7e7d\n> Author: Stefan Naewe <>\n> Date:   Sun Sep 12 11:03:52 2010 +0200\n> \n>     Use function set_tabsize()\n> \n>     this fixes the following compile error on cygwin:\n>     tig.c: In function `init_display':\n>     tig.c:7112: error: invalid lvalue in assignment\n\nThat change works for me on Cygwin, Ubuntu 10.04, Debian 5.0.6\n\n\nMaybe you should say something about your system/OS version ?\n\nRegards,\n\nStefan\n"},{"id":"151160","messageId":"20100920204344.GB13017@vidovic","threadId":"25170","inReplyTo":"loom.20100920T203217-346@post.gmane.org","subject":"[tig] Re: compilation error: undefined reference to `set_tabsize'","fromName":"Nicolas Sebrecht","fromEmail":"nicolas.s.dev@gmx.fr","sentAt":"2010-09-20T20:43:44Z","receivedAt":"2010-09-20T20:43:44Z","isPatch":false,"sender":{"key":"nicolas.s.dev@gmx.fr","avatar":null},"body":"The 20/09/10, Stefan Näwe wrote:\n> Nicolas Sebrecht <nicolas.s.dev <at> gmx.fr> writes:\n> \n> > \n> > Hi,\n> > \n> > tig don't compile anymore here:\n> > \n> >   % make\n> >   gcc   tig.o  -lncursesw  -o tig\n> >   tig.o: In function `init_display': tig.c:7113: undefined reference to \n> `set_tabsize'\n> >   collect2: ld returned 1 exit status\n> >   make: *** [tig] Error 1\n> >   %\n> > \n> > and bisected on\n> > \n> > commit f1fe753be71ef3ce5abcbb16c2a359f97e5c7e7d\n> > Author: Stefan Naewe <>\n> > Date:   Sun Sep 12 11:03:52 2010 +0200\n> > \n> >     Use function set_tabsize()\n> > \n> >     this fixes the following compile error on cygwin:\n> >     tig.c: In function `init_display':\n> >     tig.c:7112: error: invalid lvalue in assignment\n> \n> That change works for me on Cygwin, Ubuntu 10.04, Debian 5.0.6\n> \n> Maybe you should say something about your system/OS version ?\n\nNaturally. I'm running on Gentoo.\n\n  % gcc -v\n  Using built-in specs.\n  Target: x86_64-pc-linux-gnu\n  Configured with:\n  /var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/configure\n  --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2\n  --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include\n  --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2\n  --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/man\n  --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/info\n  --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4\n  --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec\n  --enable-nls --without-included-gettext --with-system-zlib\n  --disable-checking --disable-werror --enable-secureplt --enable-multilib\n  --enable-libmudflap --disable-libssp --enable-java-awt=gtk\n  --enable-languages=c,c++,java,treelang,fortran --enable-shared\n  --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu\n  Thread model: posix\n  gcc version 4.1.2 (Gentoo 4.1.2 p1.3)\n  %\n\n-- \nNicolas Sebrecht\n"},{"id":"151164","messageId":"AANLkTin6YnZTyfeKKoUtGvZx8rBvfYDPG98qYa0TXoW9@mail.gmail.com","threadId":"25170","inReplyTo":"20100920204344.GB13017@vidovic","subject":"Re: [tig] Re: compilation error: undefined reference to `set_tabsize'","fromName":"Jonas Fonseca","fromEmail":"jonas.fonseca@gmail.com","sentAt":"2010-09-20T21:48:23Z","receivedAt":"2010-09-20T21:48:23Z","isPatch":false,"sender":{"key":"jonas.fonseca@gmail.com","avatar":"https://gravatar.com/avatar/9b7fa23cce50269e5d164312b6ac5ae818a180f837b38f28f3bdf689dd7f96cd?d=mp&s=160"},"body":"On Mon, Sep 20, 2010 at 16:43, Nicolas Sebrecht <nicolas.s.dev@gmx.fr> wrote:\n> The 20/09/10, Stefan Näwe wrote:\n>> Nicolas Sebrecht <nicolas.s.dev <at> gmx.fr> writes:\n>>\n>> > tig don't compile anymore here:\n>> >\n>> >   % make\n>> >   gcc   tig.o  -lncursesw  -o tig\n>> >   tig.o: In function `init_display': tig.c:7113: undefined reference to\n>> `set_tabsize'\n>> >   collect2: ld returned 1 exit status\n>> >   make: *** [tig] Error 1\n>> >   %\n>> >\n>> > and bisected on\n>> >\n>> > commit f1fe753be71ef3ce5abcbb16c2a359f97e5c7e7d\n>> > Author: Stefan Naewe <>\n>> > Date:   Sun Sep 12 11:03:52 2010 +0200\n>> >\n>> >     Use function set_tabsize()\n>> >\n>> >     this fixes the following compile error on cygwin:\n>> >     tig.c: In function `init_display':\n>> >     tig.c:7112: error: invalid lvalue in assignment\n>>\n>> That change works for me on Cygwin, Ubuntu 10.04, Debian 5.0.6\n>>\n>> Maybe you should say something about your system/OS version ?\n>\n> Naturally. I'm running on Gentoo.\n\nOne possibility is to add a check to configure, but I don't know if\nyou are even using that. Alternatively, I think it would also be safe\nto simply just delete the line in question, since tig expands all tabs\nto strings since quite a few releases.\n\n-- \nJonas Fonseca\n"},{"id":"151169","messageId":"20100920230559.GJ23119@bowser.ece.utexas.edu","threadId":"25170","inReplyTo":"20100920204344.GB13017@vidovic","subject":"Re: [tig] Re: compilation error: undefined reference to `set_tabsize'","fromName":"Kumar Appaiah","fromEmail":"a.kumar@alumni.iitm.ac.in","sentAt":"2010-09-20T23:05:59Z","receivedAt":"2010-09-20T23:05:59Z","isPatch":false,"sender":{"key":"a.kumar@alumni.iitm.ac.in","avatar":"https://gravatar.com/avatar/7ce299108bfff26792729bde4a1dd0638292f852a042d40a0a1991ff2ae58b0b?d=mp&s=160"},"body":"On Mon, Sep 20, 2010 at 10:43:44PM +0200, Nicolas Sebrecht wrote:\n> > That change works for me on Cygwin, Ubuntu 10.04, Debian 5.0.6\n> > \n> > Maybe you should say something about your system/OS version ?\n> \n> Naturally. I'm running on Gentoo.\n> \n\nAck that this also breaks build on CentOS. The simple reason is that\nthe ncurses version on CentOS 5.5 is ncurses-5.5, while that on Debian\nLenny is 5.7+. According to the changelog, 5.6 onwards has\nset_tabsize, so checking for that version of ncurses might be a good\noption.\n\nThanks.\n\nKumar\n"},{"id":"151170","messageId":"20100920231349.GK23119@bowser.ece.utexas.edu","threadId":"25170","inReplyTo":"20100920230559.GJ23119@bowser.ece.utexas.edu","subject":"Re: [tig] Re: compilation error: undefined reference to `set_tabsize'","fromName":"Kumar Appaiah","fromEmail":"a.kumar@alumni.iitm.ac.in","sentAt":"2010-09-20T23:13:49Z","receivedAt":"2010-09-20T23:13:49Z","isPatch":false,"sender":{"key":"a.kumar@alumni.iitm.ac.in","avatar":"https://gravatar.com/avatar/7ce299108bfff26792729bde4a1dd0638292f852a042d40a0a1991ff2ae58b0b?d=mp&s=160"},"body":"On Mon, Sep 20, 2010 at 06:05:59PM -0500, Kumar Appaiah wrote:\n> On Mon, Sep 20, 2010 at 10:43:44PM +0200, Nicolas Sebrecht wrote:\n> > > That change works for me on Cygwin, Ubuntu 10.04, Debian 5.0.6\n> > > \n> > > Maybe you should say something about your system/OS version ?\n> > \n> > Naturally. I'm running on Gentoo.\n> > \n> \n> Ack that this also breaks build on CentOS. The simple reason is that\n> the ncurses version on CentOS 5.5 is ncurses-5.5, while that on Debian\n> Lenny is 5.7+. According to the changelog, 5.6 onwards has\n> set_tabsize, so checking for that version of ncurses might be a good\n> option.\n\nI have attached a patch which uses the patch number to determine this:\n\n\nHTH, Thanks!\n\nKumar\n\n>From d10b7f15160b7d8da74f899f25018591cb33eec0 Mon Sep 17 00:00:00 2001\nFrom: Kumar Appaiah <a.kumar@alumni.iitm.ac.in>\nDate: Mon, 20 Sep 2010 18:10:11 -0500\nSubject: [PATCH] Check the ncurse version before using set_tabsize\n\nThis patch checks the ncurses patch level to decide if set_tabsize is\nto be used in place of the TABSIZE macro, for setting the tab size.\n---\n tig.c |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/tig.c b/tig.c\nindex 7bc5daa..01b55d7 100644\n--- a/tig.c\n+++ b/tig.c\n@@ -7111,7 +7111,11 @@ init_display(void)\n \tkeypad(status_win, TRUE);\n \twbkgdset(status_win, get_line_attr(LINE_STATUS));\n \n+#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20080119)\n \tset_tabsize(opt_tab_size);\n+#else\n+\tTABSIZE = opt_tab_size;\n+#endif\n \n \tterm = getenv(\"XTERM_VERSION\") ? NULL : getenv(\"COLORTERM\");\n \tif (term && !strcmp(term, \"gnome-terminal\")) {\n-- \n1.7.2.3\n"},{"id":"151184","messageId":"loom.20100921T083551-528@post.gmane.org","threadId":"25170","inReplyTo":"20100920231349.GK23119@bowser.ece.utexas.edu","subject":"Re: [tig] Re: compilation error: undefined reference to `set_tabsize'","fromName":"Stefan Naewe","fromEmail":"stefan.naewe@googlemail.com","sentAt":"2010-09-21T06:37:50Z","receivedAt":"2010-09-21T06:37:50Z","isPatch":false,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"Kumar Appaiah <a.kumar <at> alumni.iitm.ac.in> writes:\n\n> \n> On Mon, Sep 20, 2010 at 06:05:59PM -0500, Kumar Appaiah wrote:\n> > Ack that this also breaks build on CentOS. The simple reason is that\n> > the ncurses version on CentOS 5.5 is ncurses-5.5, while that on Debian\n> > Lenny is 5.7+. According to the changelog, 5.6 onwards has\n> > set_tabsize, so checking for that version of ncurses might be a good\n> > option.\n> \n> I have attached a patch which uses the patch number to determine this:\n> \n\nGood. Works for me on Debian 5.0.6 and Cygwin.\n\nRegards,\n\nStefan\n"},{"id":"151212","messageId":"AANLkTimvD32iGMwUw6vFhU8Ah+afru-x+opLGsq5Vt1j@mail.gmail.com","threadId":"25170","inReplyTo":"loom.20100921T083551-528@post.gmane.org","subject":"Re: [tig] Re: compilation error: undefined reference to `set_tabsize'","fromName":"Jonas Fonseca","fromEmail":"jonas.fonseca@gmail.com","sentAt":"2010-09-21T12:57:11Z","receivedAt":"2010-09-21T12:57:11Z","isPatch":false,"sender":{"key":"jonas.fonseca@gmail.com","avatar":"https://gravatar.com/avatar/9b7fa23cce50269e5d164312b6ac5ae818a180f837b38f28f3bdf689dd7f96cd?d=mp&s=160"},"body":"On Tue, Sep 21, 2010 at 02:37, Stefan Naewe <stefan.naewe@googlemail.com> wrote:\n> Kumar Appaiah <a.kumar <at> alumni.iitm.ac.in> writes:\n>\n>>\n>> On Mon, Sep 20, 2010 at 06:05:59PM -0500, Kumar Appaiah wrote:\n>> > Ack that this also breaks build on CentOS. The simple reason is that\n>> > the ncurses version on CentOS 5.5 is ncurses-5.5, while that on Debian\n>> > Lenny is 5.7+. According to the changelog, 5.6 onwards has\n>> > set_tabsize, so checking for that version of ncurses might be a good\n>> > option.\n>>\n>> I have attached a patch which uses the patch number to determine this:\n>>\n>\n> Good. Works for me on Debian 5.0.6 and Cygwin.\n\nThanks both, patch applied.\n\n-- \nJonas Fonseca\n"},{"id":"151224","messageId":"20100921173437.GA13013@vidovic","threadId":"25170","inReplyTo":"20100920231349.GK23119@bowser.ece.utexas.edu","subject":"[tig] Re: compilation error: undefined reference to `set_tabsize'","fromName":"Nicolas Sebrecht","fromEmail":"nicolas.s.dev@gmx.fr","sentAt":"2010-09-21T17:34:37Z","receivedAt":"2010-09-21T17:34:37Z","isPatch":false,"sender":{"key":"nicolas.s.dev@gmx.fr","avatar":null},"body":"The 20/09/10, Kumar Appaiah wrote:\n> On Mon, Sep 20, 2010 at 06:05:59PM -0500, Kumar Appaiah wrote:\n\n> > Ack that this also breaks build on CentOS. The simple reason is that\n> > the ncurses version on CentOS 5.5 is ncurses-5.5, while that on Debian\n> > Lenny is 5.7+. According to the changelog, 5.6 onwards has\n> > set_tabsize, so checking for that version of ncurses might be a good\n> > option.\n> \n> I have attached a patch which uses the patch number to determine this:\n\nThanks Kumar, it did it (with ncurses v5.6)! :-)\n\n-- \nNicolas Sebrecht\n"}]}