Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Oct 2023 15:05:17 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 262032] [NEW PORT] devel/xnvme: Cross-platform libraries and tools for NVMe devices
Message-ID:  <bug-262032-7788-wq03NYXfEA@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-262032-7788@https.bugs.freebsd.org/bugzilla/>
References:  <bug-262032-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262032

--- Comment #4 from Robert Clausecker <fuz@FreeBSD.org> ---
Thank you for your update.  I've test-built the port and found some new iss=
ues.

 - Please use ${DISTVERSION} instead of hardcoding 0.7.1 in MASTER_SITES.  =
This
   makes it easier to update the port.
 - Check if e.g. sysutils might be a more appropriate category for the port.

Testing the port, it immediately fails to build due to a missing Python
dependency:

WARNING: Recommend using either -Dbuildtype or -Doptimization + -Ddebug. Us=
ing
both is redundant since they override each other. See:
https://mesonbuild.com/Builtin-options.html#build-type-options
The Meson build system
Version: 1.2.2
Source dir: /wrkdirs/usr/ports/devel/xnvme/work/xnvme-0.7.1
Build dir: /wrkdirs/usr/ports/devel/xnvme/work/xnvme-0.7.1/_build
Build type: native build
Project name: xnvme
Project version: 0.7.1
C compiler for the host machine: cc (clang 14.0.5 "FreeBSD clang version 14=
.0.5
(https://github.com/llvm/llvm-project.git llvmorg-14.0.5-0-gc12386ae247c)")
C linker for the host machine: cc ld.lld 14.0.5
Host machine cpu family: arm
Host machine cpu: armv7
Message: host_machine.system: freebsd
Compiler for C supports arguments -Wno-missing-braces: YES=20
Compiler for C supports arguments -Wno-cast-function-type: YES=20
Compiler for C supports arguments -Wno-strict-aliasing: YES=20
Program python3 found: NO

meson.build:49:31: ERROR: python3 not found

A full log can be found at
/wrkdirs/usr/ports/devel/xnvme/work/xnvme-0.7.1/_build/meson-logs/meson-log=
.txt
WARNING: Running the setup command as `meson [options]` instead of `meson s=
etup
[options]` is ambiguous and deprecated.
=3D=3D=3D>  Script "configure" failed unexpectedly.

This is because on FreeBSD, we do not by default install a python3 binary a=
nd
ports must not assume that it exist.
To fix this, add "USES=3Dpython:build" to the port Makefile.  This causes a
PYTHON environment variable to be defined when meson is run.  It holds the =
path
of the Python interpreter.  Obey that variable instead of assuming the comm=
and
is named python3.

Temporarily patching this issue by supplying

pre-configure:
        ${REINPLACE_CMD} -e s,python3,${PYTHON_CMD}, ${WRKSRC}/meson.build

in the port Makefile, the build then fails on armv7 FreeBSD 13.2 as follows:

cc -Ilib/libxnvme.so.p -Ilib -I../lib -I. -I.. -Iinclude -I../include
-fno-color-diagnostics -D_FILE_OFFSET_BITS=3D64 -Wa
ll -Winvalid-pch -Wextra -std=3Dgnu11 -Wno-missing-braces -Wno-cast-functio=
n-type
-Wno-strict-aliasing -include xnvme_con
fig.h -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC -pthread
-MD -MQ lib/libxnvme.so.p/xnvme_adm.c.o -M
F lib/libxnvme.so.p/xnvme_adm.c.o.d -o lib/libxnvme.so.p/xnvme_adm.c.o -c
../lib/xnvme_adm.c=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20
In file included from ../lib/xnvme_adm.c:6:
In file included from ../include/libxnvme.h:46:=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
../include/libxnvme_cmd.h:32:1: error: static_assert failed due to requirem=
ent
'sizeof(struct xnvme_cmd_ctx) =3D=3D 128' "I
ncorrect size"=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
XNVME_STATIC_ASSERT(sizeof(struct xnvme_cmd_ctx) =3D=3D 128, "Incorrect siz=
e")=20
^                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=20=20
../include/libxnvme_util.h:16:40: note: expanded from macro
'XNVME_STATIC_ASSERT'
#define XNVME_STATIC_ASSERT(cond, msg) static_assert(cond, msg);
                                       ^             ~~~~=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
/usr/include/assert.h:73:23: note: expanded from macro 'static_assert'=20=
=20=20=20=20=20=20=20=20=20
#define static_assert   _Static_assert=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20
                        ^=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20
1 error generated.=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20

It also fails elsewhere, but this is the first error.  Please either fix the
issue or disable armv7 (either with BROKEN_armv7 or NOT_FOR_ARCHS=3Darmv7).=
  On
arm64 the build succeeds with a warning that should be addressed:

[ 26% 54/201] cc -Ilib/libxnvme.so.p -Ilib -I../lib -I. -I.. -Iinclude
-I../include -fno-color-diagnostics -D_FILE_OFFSET_BITS=3D64 -Wall -Winvali=
d-pch
-Wextra -std=3Dgnu11 -Wno-missing-braces -Wno-cast-function-type
-Wno-strict-aliasing -include xnvme_config.h -O2 -pipe -fstack-protector-st=
rong
-fno-strict-aliasing -fPIC -pthread -MD -MQ lib/libxnvme.so.p/xnvme_buf.c.o=
 -MF
lib/libxnvme.so.p/xnvme_buf.c.o.d -o lib/libxnvme.so.p/xnvme_buf.c.o -c
../lib/xnvme_buf.c
../lib/xnvme_buf.c:255:68: warning: format specifies type 'unsigned long lo=
ng'
but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
                printf("    - {byte: '%06llu', expected: 0x%x, actual:
0x%x)\n", i, exp[i],
                                      ~~~~~~=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
 ^
                                      %06zu
1 warning generated.

Please check these issues and resubmit.  I have so far not tested on x86 ye=
t.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-262032-7788-wq03NYXfEA>