-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lesstest: use pkg-config to find ncurses libraries #412
base: master
Are you sure you want to change the base?
Conversation
Fails to build with split tinfo otherwise like: ``` x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -Wreturn-type -ggdb3 -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-z,pack-relative-relocs -ggdb3 -o lesstest display.o env.o lesstest.o parse.o pipeline.o log.o run.o term.o wchar.o -lncurses /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: display.o: in function `display_screen': /var/tmp/portage/sys-apps/less-643/work/less-643/lesstest/display.c:86:(.text+0x2e0): undefined reference to `tgoto' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: term.o: in function `setup_mode': /var/tmp/portage/sys-apps/less-643/work/less-643/lesstest/term.c:83:(.text+0x18): undefined reference to `tgetstr' [...] ``` Going forward, we may want to just add a Makefile.in which configure handles to the lesstest subdir. Signed-off-by: Sam James <[email protected]>
Thank you for this, however, I'm still unable to run tests after applying the patch. Received the following:
The library does exist and the library search path includes this location.
Any other suggestions? |
I assume Can you reproduce it if you run |
Hey @thesamesam,
|
@thesamesam I don't want to merge this while there is an unresolved error report against it as above. |
I'm not sure what the remaining issue is with their test. I interpreted it as "this doesn't make it worse for me" rather than "this regresses my usecase" though. But you're right that it won't work if there's no pkg-config program on the build system. Handling that portably in a Makefile is a pain. Any suggestions? The better option would be to have configure look for it and substitute in the value. |
This should handle this case (untested): TERMLIB ?= $(shell ${PKG_CONFIG} --libs ncurses || printf %s -lncurses) |
Fails to build with split tinfo otherwise like:
Going forward, we may want to just add a Makefile.in which configure handles to the lesstest subdir.