HomeFreeBSD

devel/protobuf-c: fix symbol versioning support detection

Description

devel/protobuf-c: fix symbol versioning support detection

This is a real bug and it stems from protobuf-c ABI changes that
removed symbol versioning incorrectly and unexpectedly when packages
started getting built with more recent llvm (specifically lld). So
older packages of protobuf-c with the same PKGNAME are different
than packages built with newer llvm. This explains run-time linker
problems like the one reported in this bug - even when users
innocently just install some package updates. This can cause project
package builders to generate packages that are different without
changing PKGNAME.

The root cause for this issue with protobuf-c is that the configure
test for symbol versioning support broke after recent lld changes
that are stricter about undefined symbols.

It used to be the case that devel/protobuf-c would properly detect
symbol versioning support, but now after the lld changes, you see
the following during 'make configure':

checking if LD -Wl,--version-script works... no

The attached patch fixes this and restores proper symbol versioning
support detection. It (or a similar change in configure.ac) can
be fed upstream, but I have not opened any case upstream yet.

It also sets HAS_SYMBOL_VERSION to help avoid such silent ABI
breakage in the future.

The patch also shuffles some lines based on 'portclippy' consistency
ordering suggestions.

PORTREVISION SHOULD also have been bumped after the recent update
to devel/protobuf (early June 2025) changed the .so ver of libprotobuf.
The patch will fix that oversight because it bumps PORTREVISION for
other reasons.

PR: 282060
Reported by: Niall.oReilly+freebsd@no8.be
MFH: 2025Q3
Sponsored by: DomainTools LLC

(cherry picked from commit bf457ffa65d42f93737290ab628245dc9b365414)

Details

Provenance
rfyu28uyeg_snkmail.comAuthored on Jul 9 2025, 6:23 AM
truckmanCommitted on Jul 9 2025, 10:50 AM
Parents
R11:0711873cc025: graphics/p5-Cairo: bump dependant ports
Branches
Unknown
Tags
Unknown