Re: git: d53991856704 - main - Mk/Scripts: qa resolve LIB_DEPENDS using sonames

From: Baptiste Daroussin <bapt_at_FreeBSD.org>
Date: Mon, 07 Sep 2026 17:29:26 UTC
On Mon 07 Sep 16:38, Colin Percival wrote:
> On 9/7/26 00:26, Baptiste Daroussin wrote:
> > The branch main has been updated by bapt:
> > 
> > URL: https://cgit.FreeBSD.org/ports/commit/?id=d5399185670435361c9d3f6217438704ed0aa878
> > 
> > commit d5399185670435361c9d3f6217438704ed0aa878
> > Author:     Baptiste Daroussin <bapt@FreeBSD.org>
> > AuthorDate: 2026-09-07 07:21:20 +0000
> > Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
> > CommitDate: 2026-09-07 07:25:08 +0000
> > 
> >      Mk/Scripts: qa resolve LIB_DEPENDS using sonames
> 
> I got this error overnight; not sure if this commit is but I can't see
> any other commits which look relevant.  Anyone want to take a look?
> 
> --- libruby34.so.34.9 ---
> linking shared-library libruby34.so.34.9
> ld: error: unknown argument '-Wl,--compress-debug-sections=zlib'
> ld: error: unknown argument '-Wl,-soname,libruby34.so.34.9'
> ld: error: unknown argument '-fstack-protector-strong'
> ld: error: unable to find library -lexecinfo
> ld: error: unable to find library -lprocstat
> ld: error: unable to find library -lrt
> ld: error: unable to find library -lrt
> ld: error: unable to find library -ldl
> ld: error: unable to find library -lcrypt
> ld: error: unable to find library -lm
> ld: error: unable to find library -lthr
> ld: error: unable to find library -lpthread
> *** [libruby34.so.34.9] Error code 1

unrelated, this only affects the qa phase

> 
> Colin Percival
> 
> 
> >      PR:     274012
> >      Reported by:    yuri
> > ---
> >   Mk/Scripts/qa.sh | 12 ++++++++++--
> >   1 file changed, 10 insertions(+), 2 deletions(-)
> > 
> > diff --git a/Mk/Scripts/qa.sh b/Mk/Scripts/qa.sh
> > index 2556395ff3eb..bc69aa034cb5 100644
> > --- a/Mk/Scripts/qa.sh
> > +++ b/Mk/Scripts/qa.sh
> > @@ -667,7 +667,8 @@ proxydeps_suggest_uses() {
> >   }
> >   proxydeps() {
> > -	local file dep_file dep_file_pkg already rc dep_lib_file dep_lib_files
> > +	local file dep_file dep_file_pkg already rc dep_lib_file dep_lib_files \
> > +		_checklib _soname
> >   	rc=0
> > @@ -734,7 +735,14 @@ proxydeps() {
> >   	# Check whether all files in LIB_DEPENDS are actually linked against
> >   	for _library in ${WANTED_LIBRARIES} ; do
> > -		if ! listcontains ${_library%%.so*}.so "${dep_lib_files}" ; then
> > +		# Resolve the LIB_DEPENDS library to its actual SONAME
> > +		_checklib=${_library}
> > +		if [ -f "${LOCALBASE}/lib/${_library}" ]; then
> > +			_soname=$(readelf -d "${LOCALBASE}/lib/${_library}" 2>/dev/null | \
> > +				awk '/SONAME/ {gsub(/[\[\]]/, "", $NF); print $NF}')
> > +			[ -n "${_soname}" ] && _checklib=${_soname}
> > +		fi
> > +		if ! listcontains ${_checklib%%.so*}.so "${dep_lib_files}" ; then
> >   			warn "you might not need LIB_DEPENDS on ${_library}"
> >   		fi
> >   	done
> 
> -- 
> Colin Percival
> FreeBSD Release Engineering Lead & EC2 platform maintainer
> Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
>