[CWB] compilation fails for 3.4.12

Hardie, Andrew a.hardie at lancaster.ac.uk
Fri Nov 3 08:34:43 CET 2017


I was halfway to arriving at a similar conclusion.

The weird thing is that as far as I can tell, the distro I am using (debian v 8  Jessie) *does* have tinfo as separate to ncurses - but I *didn't* get a build problem though I suppose I theoretically ought to?

But I do have libtinfo5-dev as well as libncurses5-dev, so perhaps there is some magic going on where the build just works even without the -ltinfo flag as long as the library is installed???? 

Anyway...Re 
>>>
Andrew: We should probably get the correct ncurses flags from pkg-config on Linux, in the same way as for Glib2.  But _not_ as the global default in config/platform/unix because e.g. MacOS doesn't use pkg-config.
<<<
       
But will `pkg-config --libs ncurses` actually report "-ltinfo" ?  It doesn't on my machine - see below - it only reports "-lncurses". 

That is, I suspect we can use pkg-config to get the right library flag for either ncurses or tinfo , but not to work out which one is the one we need.

It might be simpler just to add -ltinfo after -lncurses everywhere in the TERMCAP_LIBS for Linux; newer distros would use only one, older distros only the other...

Ie to make the change you suggested to Jörg permanent but in config/platform/linux rather than config/platform/unix? 

And then maybe in a few years to remove -lncurses!

Andrew.

PS for reference what I see for these is...

$ pkg-config --cflags ncurses
-I/usr/include/ncursesw

$ pkg-config --libs ncurses
-lncurses

$ pkg-config --cflags tinfo
-I/usr/include/ncursesw

$ pkg-config --libs tinfo
-ltinfo

... and in both cases, the Cflags we get aren't needed because we aren't using ncursesw. 

-----Original Message-----
From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Stefan Evert
Sent: 03 November 2017 06:46
To: CWBdev Mailing List
Subject: Re: [CWB] compilation fails for 3.4.12


> On 3 Nov 2017, at 07:09, Jörg Tiedemann <jorg.tiedemann at lingfil.uu.se> wrote:
> 
> I’m not root at the machine and I don’t want to mess around too much with local lib-files.
> The funny thing is that CWB compiled on the same machine without problems before. I wonder if that is an update on the machine or in CWB that causes the difference now … 

Hm, it looks like this functionality was factored out from libncurses into libtinfo on recent Linux distros.  Jörg, can you try whether things work if you also link against -ltinfo when compiling CQP?  You can edit the TERMCAP_LIBS line in config/platform/unix:

	TERMCAP_LIBS = -lncurses -ltinfo

or override it whatever linux configuration file you've specified in config.mk.


Backstory: CQP used to link against libtermcap (which complemented the libcurses). But then stupid Linux stopped supporting the old libraries in favour of the new libncurses, which provided both functionalities, so we had to link against -lncurses even though CQP doesn't need any of the curses stuff. Not stupid Linux suddenly breaks things up into libncurses and libtinfo, while e.g. my Mac only has libncurses …


Andrew: We should probably get the correct ncurses flags from pkg-config on Linux, in the same way as for Glib2.  But _not_ as the global default in config/platform/unix because e.g. MacOS doesn't use pkg-config. 


Best,
Stefan
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it
http://liste.sslmit.unibo.it/mailman/listinfo/cwb


More information about the CWB mailing list