Re: [PATCH 3/3] configure: make _check_session_keys work with an as-needed linker
On Mon, May 20 2019, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> When using a promiscuous linker, _check_session_keys was working fine. >> > > cleanup series pushed, with one minor change. For reasons that Tomi can > explain, we use "command -v" instead of "which" in scripts. command is shell builtin, and all modern shells knows the command -v name >/dev/null construct. and works similarly, hash is also shell builtin, but in ksh it returns 0 even the name in question is not found. So when someone uses parts of our shell scripts as an example when they do their own they have better change of succeeding. which(1) is not shell builtin, usually located at /usr/bin. BR, Tomi > > d ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 3/3] configure: make _check_session_keys work with an as-needed linker
Daniel Kahn Gillmor writes: > When using a promiscuous linker, _check_session_keys was working fine. > cleanup series pushed, with one minor change. For reasons that Tomi can explain, we use "command -v" instead of "which" in scripts. d ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
[PATCH 3/3] configure: make _check_session_keys work with an as-needed linker
When using a promiscuous linker, _check_session_keys was working fine. But some OSes (including some versions of Ubuntu) have set their linker to always link in "--as-needed" mode, which means that the order of the objects linked is relevant. If a library is loaded before it is needed, that library will no longer be linked in the final outcome. _check_session_keys.c was failing on those systems. Signed-off-by: Daniel Kahn Gillmor --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 2531cc39..9e8a21bf 100755 --- a/configure +++ b/configure @@ -532,7 +532,7 @@ EOF if ! TEMP_GPG=$(mktemp -d); then printf 'No.\nCould not make tempdir for testing session-key support.\n' errors=$((errors + 1)) -elif ${CC} ${CFLAGS} ${gmime_cflags} ${gmime_ldflags} _check_session_keys.c -o _check_session_keys \ +elif ${CC} ${CFLAGS} ${gmime_cflags} _check_session_keys.c ${gmime_ldflags} -o _check_session_keys \ && GNUPGHOME=${TEMP_GPG} gpg --batch --quiet --import < test/gnupg-secret-key.asc \ && SESSION_KEY=$(GNUPGHOME=${TEMP_GPG} ./_check_session_keys) \ && [ $SESSION_KEY = 9:0BACD64099D1468AB07C796F0C0AC4851948A658A15B34E803865E9FC635F2F5 ] -- 2.20.1 ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch