Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thesamesam
Copy link
Contributor

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.

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 <sam@gentoo.org>
@uberhacker
Copy link

Thank you for this, however, I'm still unable to run tests after applying the patch. Received the following:

ERR  status 256 from /usr/local/tmp/crew/less.20230814224036.dir/less-643/lesstest/lesstest  -e -s '/usr/local/tmp/crew/less.20230814224036.dir/less-643/lesstest/lt_screen' -t '/usr/local/tmp/crew/less.20230814224036.dir/less-643/lesstest/lt/subsearch.lt' '/usr/local/tmp/crew/less.20230814224036.dir/less-643/less'
/usr/local/tmp/crew/less.20230814224036.dir/less-643/less: error while loading shared libraries: libtinfow.so.6: cannot open shared object file: No such file or directory
DIFF github216 on cmd #0 (. 0)
FAIL: github216 (0 steps)

The library does exist and the library search path includes this location.

$ echo $LD_LIBRARY_PATH
/usr/local/lib:/usr/local/lib64
$ ls -l /usr/local/lib64/libtinfow.so.6
lrwxrwxrwx 1 chronos chronos 16 Jan  5  2023 /usr/local/lib64/libtinfow.so.6 -> libtinfow.so.6.4

Any other suggestions?

@thesamesam
Copy link
Contributor Author

I assume LD_LIBRARY_PATH is definitely exported (not just set)?

Can you reproduce it if you run /usr/local/tmp/crew/less.20230814224036.dir/less-643/lesstest/lesstest -e -s '/usr/local/tmp/crew/less.20230814224036.dir/less-643/lesstest/lt_screen' -t '/usr/local/tmp/crew/less.20230814224036.dir/less-643/lesstest/lt/subsearch.lt' '/usr/local/tmp/crew/less.20230814224036.dir/less-643/less' manually after failure?

@uberhacker
Copy link

Hey @thesamesam,
Thanks for the quick response. Yes, I can reproduce.

$ /usr/local/tmp/crew/less.20230817064138.dir/less-643/lesstest/lesstest -e -s '/usr/local/tmp/crew/less.20230817064138.dir/less-643/lesstest/lt_screen' -t '/usr/local/tmp/crew/less.20230817064138.dir/less-643/lesstest/lt/subsearch.lt' '/usr/local/tmp/crew/less.20230817064138.dir/less-643/less'
/usr/local/tmp/crew/less.20230817064138.dir/less-643/less: error while loading shared libraries: libtinfow.so.6: cannot open shared object file: No such file or directory
DIFF subsearch on cmd #0 (. 0)
FAIL: subsearch (0 steps)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants