[MacPorts] #74265: libcbor @0.14.0: build fails when libcjson and a previous libcbor are installed
MacPorts
noreply at macports.org
Thu Jul 30 07:33:58 UTC 2026
#74265: libcbor @0.14.0: build fails when libcjson and a previous libcbor are
installed
--------------------+-------------------------
Reporter: drkp | Owner: trodemaster
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: libcbor
--------------------+-------------------------
Building or upgrading `libcbor` to 0.14.0 fails during the examples build:
{{{
/opt/local/include/cbor/common.h:177:1: error: unknown type name
'_CBOR_NODISCARD'
...
fatal error: too many errors emitted, stopping now [-ferror-limit=]
make: *** [all] Error 2
}}}
This error comes from trying to include the currently installed libcbor's
headers (not the ones currently being built). This occurs only when
libcjson is also installed, because libcbor opportunistically links
against it to build the examples, and picks up the -I${prefix}/include
from its pkg-config file.
This is only used when building the examples, so adding
`-DWITH_EXAMPLES=OFF` to configure.args fixes it for me. AFAICT, the
examples aren't even installed so there should be no downside to adding
this.
--
Ticket URL: <https://trac.macports.org/ticket/74265>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list