[CWB] compilation fails for 3.4.12
Stefan Evert
stefanML at collocations.de
Fri Nov 3 15:23:44 CET 2017
> On 3 Nov 2017, at 08:34, Hardie, Andrew <a.hardie at lancaster.ac.uk> wrote:
>
> 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?
Same on our Ubuntu 16.04. It seems that libncurses is internally linked against libtinfo:
> $ ldd /lib/x86_64-linux-gnu/libncurses.so.5
> linux-vdso.so.1 => (0x00007fff4952c000)
> libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd794f20000)
> libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007fd794cf7000)
> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd79492d000)
> /lib64/ld-linux-x86-64.so.2 (0x00007fd795346000)
which makes sense and suggests that Jörg's distro is broken. That also explains why the error cropped up all of a sudden.
> But will `pkg-config --libs ncurses` actually report "-ltinfo" ? It doesn't on my machine - see below - it only reports "-lncurses".
If it doesn't, that means you don't need to link against -ltinfo. On Ubuntu I get
> $ pkg-config ncurses --libs
> -lncurses -ltinfo
but linking also works without -ltinfo.
> 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.
I think we want ncurses, because that's available across a wide range of platforms (such as MacOS), while tinfo may be a linuxism.
> 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…
I do get an error message if I specify libs that don't actually exist.
> Ie to make the change you suggested to Jörg permanent but in config/platform/linux rather than config/platform/unix?
Only if we can be sure that older Linuxen also have libtinfo. pkg-config seems to be the _right_ way to go.
> And then maybe in a few years to remove -lncurses!
I was rather thinking of discontinuing CQP altogether … :o)
Best,
Stefan
More information about the CWB
mailing list