[m-rev.] For review: fix extras/curs linking issue
Julien Fischer
jfischer at opturion.com
Sun Jan 23 19:33:25 AEDT 2022
Hi Fabrice,
On Fri, 14 Jan 2022, Fabrice Nicol wrote:
> As a follow-up to my previous email, now regarding extras/curs.
>
> The linking issue is the same: current distributions link to both libncurses and libtinfo.
> Rather than specifying this manually, the better option seems to run `ncurses6-config --libs`.
That assumes you have ncurses 6. RHEL7 based systems ship with version
5 (and presumably quite a lot of older LTS release are the same).
I've committed a different change that separates out the ncurses
configuration stuff into a separate file and lets you override those
settings on the command line, e.g. on an Linux system with ncurses 6
you can now do:
$ mmake depend NCURSES_LIBS="$(ncurses6-config --libs)"
$ mmake NCURSES_LIBS="$(ncurses6-config --libs)"
$ mmake install NCURSES_LIBS="$(ncurses6-config --libs)"
and it should just work.
> [This was about extras/ncurses]
>
> On most Linux platforms, linking to libncurses now also requires linking to libtinfo.
>
> This can be easily checked by running 'ncurses6-config --libs'.
>
> I thought it helpful to modify Mmakefile and sample/Mmakefile to mention this.
>
> Also, for users with less experience of the building process, I added a couple of lines of building advice in the README, as building code in 'extras' requires user intervention.
>
> A note on MGNUCFLAGS: this is not the first time that I've noticed the following gcc error message on running 'mmake' (here in extras/curses/sample/ but I've run into such issues elsewhere):
>
> mgnuc --grade asm_fast.gc -I.. -- -c smalltest.c -o smalltest.o
> gcc: erreur: option « -- » non reconnue sur la ligne de commande
> [error: option '--' not reckognized on command line]
>
> This is caused by the fact that the mgnuc script inserts '-I..' before '--' while it apparently should do this after.
>
> Copying the command line by hand with '-I..' after '--' fixes the issue.
>
> I'm mentioning this as a possible mgnuc bug, but it may be that I missed something too.
>
> For the proposed patch, commenting out MGNUCFLAGS in sample/Mmakefile 'just worked'.
I've committed a fix for this one as well.
Julien.
More information about the reviews
mailing list