void-linux / void-packages

The Void source packages collection
https://voidlinux.org
Other
2.59k stars 2.16k forks source link

man uses more instead of less when cross built #37512

Closed lfdebrux closed 2 years ago

lfdebrux commented 2 years ago

System

Expected behavior

man uses less as the default pager. (The mdocml package has less as a dependency so less should always be installed with man on a Void Linux system)

Actual behavior

man uses more as the default pager.

Steps to reproduce the behavior

Notes

I think this happens because although less is a build dependency of mdocml, the configure script for mandoc tries to run less to check whether it is present, but the cross version gets installed in usr/arm-linux-musleabi/bin, which isn't in PATH (and probably wouldn't run anyway being a non-native binary).

I figured out what was going on by running xbps-src -a armv5tel-musl configure mdocml, and looking at masterdir/builddir/mandoc*/config.log. I also verified that the same thing happened when cross-compiling for different targets (and different architectures).

I'm not sure of the right way to fix this, setting BINM_PAGER in configure.local would probably do the job, but maybe there is a more standard way of fixing this sort of problem?

classabbyamp commented 2 years ago

hostmakedepends="less" solves this

Looks like there are a lot of execution failures on cross:

configure log of mdocml ``` file config.log: writing... file configure.local: reading... tested operating system: Linux -> OSENUM=MANDOC_OS_OTHER tested aarch64-linux-gnu-gcc -W: tested noop: yes selected CFLAGS="-fstack-clash-protection -D_FORTIFY_SOURCE=2 -O2 -pipe -march=armv8-a -fcommon -I/usr/aarch64-linux-gnu/usr/include -fdebug-prefix-map=/builddir/mandoc-1.14.6=." tested noop-static: yes selected STATIC="-static" tested attribute: yes tested cmsg: yes tested dirent-namlen: no (execution failed) tested be32toh: yes tested be32toh-DSYS_ENDIAN: no (execution failed) tested EFTYPE: no (execution failed) tested err: yes tested getline: yes tested getsubopt: yes tested isblank: yes tested mkdtemp: yes tested mkstemps: yes tested nanosleep: yes tested ntohl: yes tested O_DIRECTORY: yes tested PATH_MAX: yes tested pledge: no (execution failed) tested sandbox_init: no (execution failed) tested progname: no (execution failed) tested reallocarray: yes tested recallocarray: no (execution failed) tested recallocarray-D_OPENBSD_SOURCE: no (execution failed) tested recvmsg: yes tested rewb-bsd: HAVE_REWB_BSD=0 (manual) tested rewb-sysv: yes tested strcasestr: no (execution failed) tested strcasestr-D_GNU_SOURCE: yes tested stringlist: no (execution failed) tested strlcat: no (execution failed) tested strlcpy: no (execution failed) tested strndup: yes tested strptime: no (execution failed) tested strptime-D_GNU_SOURCE: yes tested strsep: yes tested strtonum: no (execution failed) tested strtonum-D_OPENBSD_SOURCE: no (execution failed) tested vasprintf: no (execution failed) tested vasprintf-D_GNU_SOURCE: yes tested fts-DFTS_COMPARE_CONST: no (execution failed) tested fts: yes tested less: yes selected BINM_PAGER=less tested less -T: yes selected UTF8_LOCALE=en_US.utf8 tested wchar-DUTF8_LOCALE="en_US.utf8": no (execution failed) tested wchar-D_GNU_SOURCE -DUTF8_LOCALE="en_US.utf8": yes tested ohash: no (execution failed) tested ohash-lutil: no (execution failed) selected LDADD=" -lz" file config.h: written file Makefile.local: written ```