Closed ccbry closed 1 year ago
We do not want to introduce pkg-config
, since it is complicated and not easy for students to understand in terms of teaching.
I think you can add -ltinfo
if the current system is Gentoo Linux. Would you please open a PR for this?
Fixed in #68
Running
make menuconfig
on Gentoo Linux can produce following error message even if nucrses being installed:/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: /home/pzy/Documents/Sync/ics2022/nemu/tools/kconfig/build/obj-mconf/lxdialog/util.o: undefined reference to symbol 'nodelay' /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libtinfo.so.6: error adding symbols: DSO missing from command line
It turns out to be the problem of Gentoo's "tinfo" USE flag, this use flag forces some symbols from libncurses.so to be moved to libtinfo.so. This can be easily fixed bu adding "-ltinfo" afterLIBS += -lncurses
of /nemu/tools/kconfig/MakefileHowever, I'm wondering if there is need to add this fix to source code or if
pkg-config
can be intruduce to source code to generate needed libraries to compeletely avoid this problem?