Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

make(1) is acting erratically



I'm trying to debug https://gnats.netbsd.org/59594 and I'm running into some problems. As described in that PR, I figured out a while ago that the problem in the PR was due to a commit[1] that cleared MAKEFLAGS, so that make(1) would not remember to use the system makefiles in ${NETBSDSRCDIR}/share/mk instead of /usr/share/mk. I have already shown that not clearing MAKEFLAGS makes the build complete.

The problem comes when I try to tell make(1) where the system makefiles are, while otherwise clearing MAKEFLAGS so that the intent of that problematic commit is kept. No matter what I do, make(1) does not want to use the system makefiles that I tell it to, even though, by make's own output, it seems like it should, because the correct paths are in MAKECONF and .SYSPATH when I print them out.

I am running a NetBSD from a couple of days before the problematic commit[1]. I downloaded the NetBSD src and xsrc trees for an up-to-date NetBSD current. I ran make buildworld with native make (not build.sh) until it failed at the checkflist stage at the end. To debug, I took the following steps:

I added a line at the beginning of checkflist like

env > checkflist-env.txt

to get a copy of the environment that checkflist was running in, and I combined that with the output of the build that said what the checkflist command line was, into a script called cmd.sh so that I could run just that one step as it was being called in the build, but without waiting for a long time.

I modified checkflist to source sets.subr2 instead of sets.subr. sets.subr2 is a cut-down version of sets.subr.

I changed sets.subr2 to use mkvars2.mk instead of mkvars.mk. mkvars2.mk is a cut-down version of mkvars.mk.

Here's the diff for distrib/sets/checkflist:

----

Index: checkflist
===================================================================
RCS file: /cvsroot/src/distrib/sets/checkflist,v
retrieving revision 1.46
diff -u -r1.46 checkflist
--- checkflist	21 Aug 2022 07:10:03 -0000	1.46
+++ checkflist	13 Jan 2026 22:54:02 -0000
@@ -11,7 +11,7 @@
 
 prog="${0##*/}"
 rundir="$(dirname "$0")" # ${0%/*} isn't good enough when there's no "/"
-. "${rundir}/sets.subr"
+. "${rundir}/sets.subr2"
 
 #
 # * ${SETS_DLIST}: files present in DESTDIR.

----

Here is the file distrib/sets/sets.subr2:

----

#	$NetBSD: sets.subr,v 1.212 2025/07/21 01:46:05 dholland Exp $
#

: ${AWK:=awk}
: ${CKSUM:=cksum}
: ${COMM:=comm}
: ${DATE:=date}
: ${DB:=db}
: ${EGREP:=egrep}
: ${ENV_CMD:=env}       # ${ENV} is special to sh(1), ksh(1), etc.
: ${FGREP:=fgrep}
: ${FIND:=find}
: ${GREP:=grep}
: ${GZIP_CMD:=gzip}     # ${GZIP} is special to gzip(1)
: ${HOSTNAME_CMD:=hostname}	# ${HOSTNAME} is special to bash(1)
: ${HOST_SH:=sh}
: ${IDENT:=ident}
: ${JOIN:=join}
: ${LS:=ls}
: ${MAKE:=make}
: ${MKTEMP:=mktemp}
: ${MTREE:=mtree}
: ${PASTE:=paste}
: ${PAX:=pax}
: ${PRINTF:=printf}
: ${SED:=sed}
: ${SORT:=sort}
: ${STAT:=stat}
: ${TSORT:=tsort}
: ${UNAME:=uname}
: ${WC:=wc}
: ${XARGS:=xargs}

basename ()
{
	local bn
	bn="${1##*/}"
	bn="${bn%$2}"
	printf "%s\n" "$bn"
}
dirname ()
{
	local dn
	case "$1" in
	?*/*)	dn="${1%/*}" ;;
	/*)	dn=/ ;;
	*)	dn=. ;;
	esac
	printf "%s\n" "$dn"
}

#####

oIFS=$IFS
IFS="
"

for x in $( env -u MAKEFLAGS MAKEVERBOSE= ${MAKE} MYOUTTXT=myout1.txt -m ${NETBSDSRCDIR}/share/mk -B -f ${rundir}/mkvars2.mk mkvars ); do
	eval export $x
done

IFS=$oIFS

MKVARS="$( env -u MAKEFLAGS MAKEVERBOSE= ${MAKE} MYOUTTXT=myout2.txt -m ${NETBSDSRCDIR}/share/mk -B -f ${rundir}/mkvars2.mk mkvars | ${SED} -e 's,=.*,,' | ${XARGS} )"

----

Here is the file distrib/sets/mkvars2.mk:

----

# $NetBSD: mkvars.mk,v 1.47 2025/05/13 21:36:26 nia Exp $

MKEXTRAVARS= \
	HAVE_OPENSSL \
	NETBSDSRCDIR

#####

.include <bsd.own.mk>

#####

mkvars: mkvarsyesno mkextravars .PHONY
	@echo MAKEFLAGS=\"${MAKEFLAGS}\" > ${MYOUTTXT}
	@echo .SYSPATH=\"${.SYSPATH}\" >> ${MYOUTTXT}
	@echo HAVE_OPENSSL=\"${HAVE_OPENSSL}\" >> ${MYOUTTXT}

mkvarsyesno: .PHONY
.for i in ${_MKVARS.yes}
	@echo $i="${$i}"
.endfor
.for i in ${_MKVARS.no}
	@echo $i="${$i}"
.endfor

mkextravars: .PHONY
.for i in ${MKEXTRAVARS}
	@echo $i="${$i}"
.endfor

----

Here is distrib/sets/cmd.sh:

----

#!/bin/sh

env ENV="/home/rob/.shrc" \
    XTERM_SHELL="/bin/ksh" \
    PAX="/usr/netbsd/current/build/THINKPAD/11.99.4-amd64-tooldir/bin/nbpax" \
    SED="/usr/netbsd/current/build/THINKPAD/11.99.4-amd64-tooldir/bin/nbsed" \
    MAKEFLAGS=" -m /usr/netbsd/current/src/share/mk -j 4 -J 15,16 HOST_OSTYPE=NetBSD-11.99.4-amd64 MKOBJDIRS=no NOINCLUDES=yes _SRC_TOP_=/usr/netbsd/current/src _SRC_TOP_OBJ_=/usr/netbsd/current/build/THINKPAD/11.99.4-amd64-obj/usr/netbsd/current/src _THISDIR_=distrib/sets/" \
    PWD="/usr/netbsd/current/src/distrib/sets" \
    MAKE="make" \
    HOME="/root" \
    _="-" \
    PATH="/home/rob/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R7/bin:/usr/pkg/bin:/usr/pkg/sbin:/usr/games:/usr/local/bin:/usr/local/sbin" \
    TAR_SUFF="tar.xz" \
    XTERM_VERSION="XTerm(397)" \
    _SRC_TOP_="/usr/netbsd/current/src" \
    GZIP="-n" \
    MAKELEVEL="2" \
    EGREP="/usr/netbsd/current/build/THINKPAD/11.99.4-amd64-tooldir/bin/nbgrep -E" \
    TERM="xterm" \
    CKSUM="/usr/netbsd/current/build/THINKPAD/11.99.4-amd64-tooldir/bin/nbcksum" \
    MKTEMP="/usr/netbsd/current/build/THINKPAD/11.99.4-amd64-tooldir/bin/nbmktemp" \
    OLDPWD="/usr/netbsd/current/src/distrib/sets" \
    USER="rob" \
    HOST_OSTYPE="NetBSD-11.99.4-amd64" \
    DB="/usr/netbsd/current/build/THINKPAD/11.99.4-amd64-tooldir/bin/nbdb" \
    PKG_CREATE="/usr/netbsd/current/build/THINKPAD/11.99.4-amd64-tooldir/bin/nbpkg_create" \
    LC_CTYPE="en_US.UTF-8" \
    DESTDIR="/usr/netbsd/current/build/THINKPAD/11.99.4-amd64-destdir" \
    CVSROOT="anoncvs%anoncvs.netbsd.org@localhost:/cvsroot" \
    EDITOR="vi" \
    LOGNAME="rob" \
    SU_FROM="rob" \
    SHELL="/bin/sh" \
    MAKEOBJDIRPREFIX="/usr/netbsd/current/build/THINKPAD/11.99.4-amd64-obj" \
    MTREE="/usr/netbsd/current/build/THINKPAD/11.99.4-amd64-tooldir/bin/nbmtree" \
    MACHINE="amd64" \
    MACHINE_ARCH="x86_64" \
    CVS_RSH="ssh" \
    DISPLAY=":0" \
    LYNX_CFG="/home/rob/.lynx.cfg" \
    XZ_OPT="-9" \
    WINDOWID="14680076" \
    WINDOWPATH="5" \
    COMPRESS_PROGRAM="/usr/netbsd/current/build/THINKPAD/11.99.4-amd64-tooldir/bin/nbxz" \
    XTERM_LOCALE="en_US.UTF-8" \
    NOINCLUDES="yes" \
    HOST_SH="/bin/sh" \
    MKOBJDIRS="no" \
    _THISDIR_="distrib/sets/" \
    MAKECONF="/usr/netbsd/current/build/THINKPAD/mk.conf.amd64" \
    TSORT="/usr/netbsd/current/build/THINKPAD/11.99.4-amd64-tooldir/bin/nbtsort -q" \
    AWK="/usr/netbsd/current/build/THINKPAD/11.99.4-amd64-tooldir/bin/nbawk" \
/bin/sh /usr/netbsd/current/src/distrib/sets/checkflist -L base,x

----

When I run the command

./cmd.sh; echo myout1.txt:; cat myout1.txt; echo myout2.txt:; cat myout2.txt;

I get the output

----


=======  225 extra files in DESTDIR  =========
Files in DESTDIR but missing from flist.
File is obsolete or flist is out of date ?
------------------------------------------
./lib/libcrypto.so.16
./lib/libcrypto.so.16.0
./usr/include/openssl/e_ostime.h
./usr/include/openssl/indicator.h
./usr/include/openssl/quic.h
./usr/include/openssl/x509_acert.h
./usr/lib/i386/libcrypto.so.16
./usr/lib/i386/libcrypto.so.16.0
./usr/lib/i386/libdes.so.16
./usr/lib/i386/libdes.so.16.0
./usr/lib/i386/libssl.so.16
./usr/lib/i386/libssl.so.16.0
./usr/lib/libcrypto.so.16
./usr/lib/libcrypto.so.16.0
./usr/lib/libdes.so.16
./usr/lib/libdes.so.16.0
./usr/lib/libssl.so.16
./usr/lib/libssl.so.16.0
./usr/libdata/debug/lib/libcrypto.so.16.0.debug
./usr/libdata/debug/usr/lib/i386/libcrypto.so.16.0.debug
./usr/libdata/debug/usr/lib/i386/libdes.so.16.0.debug
./usr/libdata/debug/usr/lib/i386/libssl.so.16.0.debug
./usr/libdata/debug/usr/lib/libcrypto.so.16.0.debug
./usr/libdata/debug/usr/lib/libdes.so.16.0.debug
./usr/libdata/debug/usr/lib/libssl.so.16.0.debug
./usr/share/man/html1/openssl-skeyutl.html
./usr/share/man/html3/BIO_get_rpoll_descriptor.html
./usr/share/man/html3/BIO_s_dgram_pair.html
./usr/share/man/html3/BIO_sendmmsg.html
./usr/share/man/html3/CMAC_CTX.html
./usr/share/man/html3/COMP_CTX_new.html
./usr/share/man/html3/DTLSv1_get_timeout.html
./usr/share/man/html3/DTLSv1_handle_timeout.html
./usr/share/man/html3/EVP_PKEY_CTX_get_algor.html
./usr/share/man/html3/EVP_SKEY.html
./usr/share/man/html3/EVP_SKEYMGMT.html
./usr/share/man/html3/GENERAL_NAME.html
./usr/share/man/html3/OPENSSL_load_u16_le.html
./usr/share/man/html3/OPENSSL_riscvcap.html
./usr/share/man/html3/OSSL_CMP_ATAV_set0.html
./usr/share/man/html3/OSSL_CMP_ITAV_new_caCerts.html
./usr/share/man/html3/OSSL_ERR_STATE_save.html
./usr/share/man/html3/OSSL_GENERAL_NAMES_print.html
./usr/share/man/html3/OSSL_HPKE_CTX_new.html
./usr/share/man/html3/OSSL_IETF_ATTR_SYNTAX.html
./usr/share/man/html3/OSSL_IETF_ATTR_SYNTAX_print.html
./usr/share/man/html3/OSSL_INDICATOR_set_callback.html
./usr/share/man/html3/OSSL_LIB_CTX_set_conf_diagnostics.html
./usr/share/man/html3/OSSL_PARAM_print_to_bio.html
./usr/share/man/html3/OSSL_QUIC_client_method.html
./usr/share/man/html3/OSSL_sleep.html
./usr/share/man/html3/PBMAC1_get1_pbkdf2_param.html
./usr/share/man/html3/PKCS12_SAFEBAG_set0_attrs.html
./usr/share/man/html3/SSL_CTX_set1_cert_comp_preference.html
./usr/share/man/html3/SSL_CTX_set_domain_flags.html
./usr/share/man/html3/SSL_CTX_set_new_pending_conn_cb.html
./usr/share/man/html3/SSL_accept_stream.html
./usr/share/man/html3/SSL_get0_connection.html
./usr/share/man/html3/SSL_get0_group_name.html
./usr/share/man/html3/SSL_get0_peer_rpk.html
./usr/share/man/html3/SSL_get1_builtin_sigalgs.html
./usr/share/man/html3/SSL_get_conn_close_info.html
./usr/share/man/html3/SSL_get_event_timeout.html
./usr/share/man/html3/SSL_get_handshake_rtt.html
./usr/share/man/html3/SSL_get_rpoll_descriptor.html
./usr/share/man/html3/SSL_get_stream_id.html
./usr/share/man/html3/SSL_get_stream_read_state.html
./usr/share/man/html3/SSL_get_value_uint.html
./usr/share/man/html3/SSL_handle_events.html
./usr/share/man/html3/SSL_inject_net_dgram.html
./usr/share/man/html3/SSL_new_domain.html
./usr/share/man/html3/SSL_new_listener.html
./usr/share/man/html3/SSL_new_stream.html
./usr/share/man/html3/SSL_poll.html
./usr/share/man/html3/SSL_set1_initial_peer_addr.html
./usr/share/man/html3/SSL_set1_server_cert_type.html
./usr/share/man/html3/SSL_set_blocking_mode.html
./usr/share/man/html3/SSL_set_default_stream_mode.html
./usr/share/man/html3/SSL_set_incoming_stream_policy.html
./usr/share/man/html3/SSL_set_quic_tls_cbs.html
./usr/share/man/html3/SSL_set_session_secret_cb.html
./usr/share/man/html3/SSL_stream_conclude.html
./usr/share/man/html3/SSL_stream_reset.html
./usr/share/man/html3/TS_VERIFY_CTX.html
./usr/share/man/html3/X509_ACERT_add1_attr.html
./usr/share/man/html3/X509_ACERT_add_attr_nconf.html
./usr/share/man/html3/X509_ACERT_get0_holder_baseCertId.html
./usr/share/man/html3/X509_ACERT_get_attr.html
./usr/share/man/html3/X509_ACERT_print_ex.html
./usr/share/man/html3/X509_STORE_CTX_get_by_subject.html
./usr/share/man/html3/X509_get_default_cert_file.html
./usr/share/man/html7/EVP_KDF-ARGON2.html
./usr/share/man/html7/EVP_KDF-HMAC-DRBG.html
./usr/share/man/html7/EVP_KDF-PVKKDF.html
./usr/share/man/html7/EVP_KEM-EC.html
./usr/share/man/html7/EVP_KEM-ML-KEM.html
./usr/share/man/html7/EVP_KEM-X25519.html
./usr/share/man/html7/EVP_MD-KECCAK.html
./usr/share/man/html7/EVP_PKEY-ML-DSA.html
./usr/share/man/html7/EVP_PKEY-ML-KEM.html
./usr/share/man/html7/EVP_PKEY-SLH-DSA.html
./usr/share/man/html7/EVP_RAND-CRNG-TEST.html
./usr/share/man/html7/EVP_RAND-JITTER.html
./usr/share/man/html7/EVP_SIGNATURE-ML-DSA.html
./usr/share/man/html7/EVP_SIGNATURE-SLH-DSA.html
./usr/share/man/html7/OSSL_STORE-winstore.html
./usr/share/man/html7/openssl-qlog.html
./usr/share/man/html7/openssl-quic-concurrency.html
./usr/share/man/html7/openssl-quic.html
./usr/share/man/html7/ossl-guide-introduction.html
./usr/share/man/html7/ossl-guide-libcrypto-introduction.html
./usr/share/man/html7/ossl-guide-libraries-introduction.html
./usr/share/man/html7/ossl-guide-libssl-introduction.html
./usr/share/man/html7/ossl-guide-migration.html
./usr/share/man/html7/ossl-guide-quic-client-block.html
./usr/share/man/html7/ossl-guide-quic-client-non-block.html
./usr/share/man/html7/ossl-guide-quic-introduction.html
./usr/share/man/html7/ossl-guide-quic-multi-stream.html
./usr/share/man/html7/ossl-guide-quic-server-block.html
./usr/share/man/html7/ossl-guide-quic-server-non-block.html
./usr/share/man/html7/ossl-guide-tls-client-block.html
./usr/share/man/html7/ossl-guide-tls-client-non-block.html
./usr/share/man/html7/ossl-guide-tls-introduction.html
./usr/share/man/html7/ossl-guide-tls-server-block.html
./usr/share/man/html7/provider-skeymgmt.html
./usr/share/man/man1/openssl-skeyutl.1
./usr/share/man/man3/BIO_get_rpoll_descriptor.3
./usr/share/man/man3/BIO_s_dgram_pair.3
./usr/share/man/man3/BIO_sendmmsg.3
./usr/share/man/man3/CMAC_CTX.3
./usr/share/man/man3/COMP_CTX_new.3
./usr/share/man/man3/DTLSv1_get_timeout.3
./usr/share/man/man3/DTLSv1_handle_timeout.3
./usr/share/man/man3/EVP_PKEY_CTX_get_algor.3
./usr/share/man/man3/EVP_SKEY.3
./usr/share/man/man3/EVP_SKEYMGMT.3
./usr/share/man/man3/GENERAL_NAME.3
./usr/share/man/man3/OPENSSL_load_u16_le.3
./usr/share/man/man3/OPENSSL_riscvcap.3
./usr/share/man/man3/OSSL_CMP_ATAV_set0.3
./usr/share/man/man3/OSSL_CMP_ITAV_new_caCerts.3
./usr/share/man/man3/OSSL_ERR_STATE_save.3
./usr/share/man/man3/OSSL_GENERAL_NAMES_print.3
./usr/share/man/man3/OSSL_HPKE_CTX_new.3
./usr/share/man/man3/OSSL_IETF_ATTR_SYNTAX.3
./usr/share/man/man3/OSSL_IETF_ATTR_SYNTAX_print.3
./usr/share/man/man3/OSSL_INDICATOR_set_callback.3
./usr/share/man/man3/OSSL_LIB_CTX_set_conf_diagnostics.3
./usr/share/man/man3/OSSL_PARAM_print_to_bio.3
./usr/share/man/man3/OSSL_QUIC_client_method.3
./usr/share/man/man3/OSSL_sleep.3
./usr/share/man/man3/PBMAC1_get1_pbkdf2_param.3
./usr/share/man/man3/PKCS12_SAFEBAG_set0_attrs.3
./usr/share/man/man3/SSL_CTX_set1_cert_comp_preference.3
./usr/share/man/man3/SSL_CTX_set_domain_flags.3
./usr/share/man/man3/SSL_CTX_set_new_pending_conn_cb.3
./usr/share/man/man3/SSL_accept_stream.3
./usr/share/man/man3/SSL_get0_connection.3
./usr/share/man/man3/SSL_get0_group_name.3
./usr/share/man/man3/SSL_get0_peer_rpk.3
./usr/share/man/man3/SSL_get1_builtin_sigalgs.3
./usr/share/man/man3/SSL_get_conn_close_info.3
./usr/share/man/man3/SSL_get_event_timeout.3
./usr/share/man/man3/SSL_get_handshake_rtt.3
./usr/share/man/man3/SSL_get_rpoll_descriptor.3
./usr/share/man/man3/SSL_get_stream_id.3
./usr/share/man/man3/SSL_get_stream_read_state.3
./usr/share/man/man3/SSL_get_value_uint.3
./usr/share/man/man3/SSL_handle_events.3
./usr/share/man/man3/SSL_inject_net_dgram.3
./usr/share/man/man3/SSL_new_domain.3
./usr/share/man/man3/SSL_new_listener.3
./usr/share/man/man3/SSL_new_stream.3
./usr/share/man/man3/SSL_poll.3
./usr/share/man/man3/SSL_set1_initial_peer_addr.3
./usr/share/man/man3/SSL_set1_server_cert_type.3
./usr/share/man/man3/SSL_set_blocking_mode.3
./usr/share/man/man3/SSL_set_default_stream_mode.3
./usr/share/man/man3/SSL_set_incoming_stream_policy.3
./usr/share/man/man3/SSL_set_quic_tls_cbs.3
./usr/share/man/man3/SSL_set_session_secret_cb.3
./usr/share/man/man3/SSL_stream_conclude.3
./usr/share/man/man3/SSL_stream_reset.3
./usr/share/man/man3/TS_VERIFY_CTX.3
./usr/share/man/man3/X509_ACERT_add1_attr.3
./usr/share/man/man3/X509_ACERT_add_attr_nconf.3
./usr/share/man/man3/X509_ACERT_get0_holder_baseCertId.3
./usr/share/man/man3/X509_ACERT_get_attr.3
./usr/share/man/man3/X509_ACERT_print_ex.3
./usr/share/man/man3/X509_STORE_CTX_get_by_subject.3
./usr/share/man/man3/X509_get_default_cert_file.3
./usr/share/man/man7/EVP_KDF-ARGON2.7
./usr/share/man/man7/EVP_KDF-HMAC-DRBG.7
./usr/share/man/man7/EVP_KDF-PVKKDF.7
./usr/share/man/man7/EVP_KEM-EC.7
./usr/share/man/man7/EVP_KEM-ML-KEM.7
./usr/share/man/man7/EVP_KEM-X25519.7
./usr/share/man/man7/EVP_MD-KECCAK.7
./usr/share/man/man7/EVP_PKEY-ML-DSA.7
./usr/share/man/man7/EVP_PKEY-ML-KEM.7
./usr/share/man/man7/EVP_PKEY-SLH-DSA.7
./usr/share/man/man7/EVP_RAND-CRNG-TEST.7
./usr/share/man/man7/EVP_RAND-JITTER.7
./usr/share/man/man7/EVP_SIGNATURE-ML-DSA.7
./usr/share/man/man7/EVP_SIGNATURE-SLH-DSA.7
./usr/share/man/man7/OSSL_STORE-winstore.7
./usr/share/man/man7/openssl-qlog.7
./usr/share/man/man7/openssl-quic-concurrency.7
./usr/share/man/man7/openssl-quic.7
./usr/share/man/man7/ossl-guide-introduction.7
./usr/share/man/man7/ossl-guide-libcrypto-introduction.7
./usr/share/man/man7/ossl-guide-libraries-introduction.7
./usr/share/man/man7/ossl-guide-libssl-introduction.7
./usr/share/man/man7/ossl-guide-migration.7
./usr/share/man/man7/ossl-guide-quic-client-block.7
./usr/share/man/man7/ossl-guide-quic-client-non-block.7
./usr/share/man/man7/ossl-guide-quic-introduction.7
./usr/share/man/man7/ossl-guide-quic-multi-stream.7
./usr/share/man/man7/ossl-guide-quic-server-block.7
./usr/share/man/man7/ossl-guide-quic-server-non-block.7
./usr/share/man/man7/ossl-guide-tls-client-block.7
./usr/share/man/man7/ossl-guide-tls-client-non-block.7
./usr/share/man/man7/ossl-guide-tls-introduction.7
./usr/share/man/man7/ossl-guide-tls-server-block.7
./usr/share/man/man7/provider-skeymgmt.7
=========  end of 225 extra files  ===========


======  84 missing files in DESTDIR  ========
Files in flist but missing from DESTDIR.
File wasn't installed ?
------------------------------------------
./lib/libcrypto.so.15
./lib/libcrypto.so.15.0
./usr/include/openssl/asn1_mac.h
./usr/lib/i386/libcrypto.so.15
./usr/lib/i386/libcrypto.so.15.0
./usr/lib/i386/libdes.so.15
./usr/lib/i386/libdes.so.15.0
./usr/lib/i386/libssl.so.15
./usr/lib/i386/libssl.so.15.0
./usr/lib/libcrypto.so.15
./usr/lib/libcrypto.so.15.0
./usr/lib/libdes.so.15
./usr/lib/libdes.so.15.0
./usr/lib/libssl.so.15
./usr/lib/libssl.so.15.0
./usr/libdata/debug/lib/libcrypto.so.15.0.debug
./usr/libdata/debug/usr/lib/i386/libcrypto.so.15.0.debug
./usr/libdata/debug/usr/lib/i386/libdes.so.15.0.debug
./usr/libdata/debug/usr/lib/i386/libssl.so.15.0.debug
./usr/libdata/debug/usr/lib/libcrypto.so.15.0.debug
./usr/libdata/debug/usr/lib/libdes.so.15.0.debug
./usr/libdata/debug/usr/lib/libssl.so.15.0.debug
./usr/share/man/html3/EVP_PKEY_cmp.html
./usr/share/man/html3/EVP_aes.html
./usr/share/man/html3/EVP_aria.html
./usr/share/man/html3/EVP_camellia.html
./usr/share/man/html3/EVP_des.html
./usr/share/man/html3/OPENSSL_VERSION_NUMBER.html
./usr/share/man/html3/RAND_DRBG_generate.html
./usr/share/man/html3/RAND_DRBG_get0_master.html
./usr/share/man/html3/RAND_DRBG_new.html
./usr/share/man/html3/RAND_DRBG_reseed.html
./usr/share/man/html3/RAND_DRBG_set_callbacks.html
./usr/share/man/html3/RAND_DRBG_set_ex_data.html
./usr/share/man/html3/SSL_CTX_set_client_CA_list.html
./usr/share/man/html3/SSL_CTX_set_ex_data.html
./usr/share/man/html3/SSL_SESSION_get_ex_data.html
./usr/share/man/html3/SSL_get_client_CA_list.html
./usr/share/man/html3/SSL_get_server_tmp_key.html
./usr/share/man/html3/TS_VERIFY_CTX_set_certs.html
./usr/share/man/html3/d2i_DHparams.html
./usr/share/man/html3/openssl_HMAC.html
./usr/share/man/html3/openssl_MD2.html
./usr/share/man/html3/openssl_MD4.html
./usr/share/man/html3/openssl_MD5.html
./usr/share/man/html5/openssl.cnf.html
./usr/share/man/html7/Ed25519.html
./usr/share/man/html7/RAND_DRBG.html
./usr/share/man/html7/SM2.html
./usr/share/man/html7/crypto.html
./usr/share/man/html7/migration_guide.html
./usr/share/man/html7/scrypt.html
./usr/share/man/html7/ssl.html
./usr/share/man/man3/EVP_PKEY_cmp.3
./usr/share/man/man3/EVP_aes.3
./usr/share/man/man3/EVP_aria.3
./usr/share/man/man3/EVP_camellia.3
./usr/share/man/man3/EVP_des.3
./usr/share/man/man3/OPENSSL_VERSION_NUMBER.3
./usr/share/man/man3/RAND_DRBG_generate.3
./usr/share/man/man3/RAND_DRBG_get0_master.3
./usr/share/man/man3/RAND_DRBG_new.3
./usr/share/man/man3/RAND_DRBG_reseed.3
./usr/share/man/man3/RAND_DRBG_set_callbacks.3
./usr/share/man/man3/RAND_DRBG_set_ex_data.3
./usr/share/man/man3/SSL_CTX_set_client_CA_list.3
./usr/share/man/man3/SSL_CTX_set_ex_data.3
./usr/share/man/man3/SSL_SESSION_get_ex_data.3
./usr/share/man/man3/SSL_get_client_CA_list.3
./usr/share/man/man3/SSL_get_server_tmp_key.3
./usr/share/man/man3/TS_VERIFY_CTX_set_certs.3
./usr/share/man/man3/d2i_DHparams.3
./usr/share/man/man3/openssl_HMAC.3
./usr/share/man/man3/openssl_MD2.3
./usr/share/man/man3/openssl_MD4.3
./usr/share/man/man3/openssl_MD5.3
./usr/share/man/man5/openssl.cnf.5
./usr/share/man/man7/Ed25519.7
./usr/share/man/man7/RAND_DRBG.7
./usr/share/man/man7/SM2.7
./usr/share/man/man7/crypto.7
./usr/share/man/man7/migration_guide.7
./usr/share/man/man7/scrypt.7
./usr/share/man/man7/ssl.7
========  end of 84 missing files  ==========

myout1.txt:
MAKEFLAGS=" -m /usr/netbsd/current/src/share/mk -B MYOUTTXT=myout1.txt _SRC_TOP_OBJ_=/usr/netbsd/current/build/THINKPAD/11.99.4-amd64-obj/usr/netbsd/current/src"
.SYSPATH="/usr/netbsd/current/src/share/mk"
HAVE_OPENSSL="30"
myout2.txt:
MAKEFLAGS=" -m /usr/netbsd/current/src/share/mk -B MYOUTTXT=myout2.txt _SRC_TOP_OBJ_=/usr/netbsd/current/build/THINKPAD/11.99.4-amd64-obj/usr/netbsd/current/src"
.SYSPATH="/usr/netbsd/current/src/share/mk"
HAVE_OPENSSL="30"

----

This shows that the -m argument to set the path to the system makefiles was successfully given to make, and in fact even the .SYSPATH, which is supposedly where make(1) looks for the system makefiles, is correct, however HAVE_OPENSSL=30 shows that in practice what make(1) is really doing is not looking in /usr/netbsd/current/src/share/mk, but looking in /usr/share/mk. As I am running a version of NetBSD from before the OpenSSL update, the value of this variable is 30 instead of 35, as would be the case on an up-to-date NetBSD current. This can also be shown by poisoning /usr/share/mk/bsd.own.mk by adding the following line at the top of that file:

.error This file has been poisoned.

and make(1) will loudly error out when it reaches that line. However, if it errors out at that location, then the diagnostic messages will not be printed.

Is this behavior of not using the correct system makefile path indicative of a bug in make(1), or is something very subtle going on here?

[1] distrib/sets/sets.subr 1.212 2025/07/21 01:46:05 dholland

Thanks,

Robert


Home | Main Index | Thread Index | Old Index