Re: git: a27174633782 - main - devel/libnvme: Add json-c dependency and enable json

From: Vladimir Druzenko <vvd_at_freebsd.org>
Date: Fri, 28 Feb 2025 09:59:05 UTC
Hello!

28.02.2025 08:50, Warner Losh пишет:
> The branch main has been updated by imp:
>
> URL: https://cgit.FreeBSD.org/ports/commit/?id=a2717463378268be2994329b4be4553c9698d0ad
>
> commit a2717463378268be2994329b4be4553c9698d0ad
> Author:     Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2025-02-28 05:48:49 +0000
> Commit:     Warner Losh <imp@FreeBSD.org>
> CommitDate: 2025-02-28 05:50:22 +0000
>
>      devel/libnvme: Add json-c dependency and enable json
>      
>      Turns out that too much is disabled when we disable json. Add dependency
>      
>      Sponsored by:           Netflix
> ---
>   devel/libnvme/Makefile | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/devel/libnvme/Makefile b/devel/libnvme/Makefile
> index 585ffd57a00b..37f001608f81 100644
> --- a/devel/libnvme/Makefile
> +++ b/devel/libnvme/Makefile
> @@ -1,6 +1,6 @@
>   PORTNAME=	libnvme
>   DISTVERSION=	1.11.1
> -PORTREVISION=	2
> +PORTREVISION=	3
>   CATEGORIES=	devel
>   
>   MAINTAINER=	imp@FreeBSD.org
> @@ -13,6 +13,7 @@ LICENSE_FILE=	${WRKSRC}/COPYING
>   ONLY_FOR_ARCHS=	aarch64 amd64
>   BUILD_DEPENDS=	freebsd-nvme-shim>0:devel/freebsd-nvme-shim \
>   		bash>0:shells/bash
> +LIB_DEPENDS=	libjson-c.so:devel/json-c
>   
>   USES=		meson
>   USE_LDCONFIG=	yes
> @@ -26,8 +27,7 @@ CFLAGS+=	-I${LOCALBASE}/include/freebsd-nvme-shim
>   PLIST_SUB=	DISTVERSION=${DISTVERSION} \
>   		MAJORVER=${DISTVERSION:R:R}
>   
> -MESON_ARGS=	-Djson-c=disabled \
> -		-Dkeyutils=disabled \
> +MESON_ARGS=	-Dkeyutils=disabled \
>   		-Dopenssl=disabled \
>   		-Dpython=disabled \
>   		-Dtests=false

Configure error in poudriere 14.2 amd64:

Did not find pkg-config by name 'pkg-config'
Found pkg-config: NO
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency json-c found: NO (tried pkgconfig and cmake)
Not looking for a fallback subproject for the dependency json-c because:
Use of fallback dependencies is disabled.

meson.build:64:17: ERROR: Dependency 'json-c' is required but not found.


On live system 14.2 amd64 with installed pkgconfig and cmake another error:

FAILED: nvme.p/plugins_wdc_wdc-utils.c.o
cc -Invme.p -I. -I.. -Iccan -I../ccan -I/usr/local/include 
-I/usr/local/include/json-c -I/usr/local/include/freebsd-nvme-shim 
-fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch 
-std=gnu99 -fomit-frame-pointer -D_GNU_SOURCE -include config.h -O2 
-pipe -march=skylake-avx512 -fstack-protector-strong 
-fno-strict-aliasing -MD -MQ nvme.p/plugins_wdc_wdc-utils.c.o -MF 
nvme.p/plugins_wdc_wdc-utils.c.o.d -o nvme.p/plugins_wdc_wdc-utils.c.o 
-c ../plugins/wdc/wdc-utils.c
../plugins/wdc/wdc-utils.c:87:36: error: invalid operands to binary 
expression ('char *(int, int)' and 'int')
    87 |         timeInfo->zone                  = -1 * (timezone / 
SECONDS_IN_MIN);
       |                                                 ~~~~~~~~ ^ 
~~~~~~~~~~~~~~
1 error generated.

-- 
Best regards,
Vladimir Druzenko