-
Notifications
You must be signed in to change notification settings - Fork 693
meson: build libnvme directly instead of as a subproject #2967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
meson: build libnvme directly instead of as a subproject #2967
Conversation
595f21a to
363f4d9
Compare
|
Thanks for this work! There is some nice cleanups and improvements 👍 A few things should be addressed before the merge though. Nothing too serious IMO but the last point:
FAILED: [code=1] libnvme/libnvme/_nvme.cpython-314-x86_64-linux-gnu.so.p/meson-generated_.._nvme_wrap.c.o
cc -Ilibnvme/libnvme/_nvme.cpython-314-x86_64-linux-gnu.so.p -Ilibnvme/libnvme -I../libnvme/libnvme -I. -I.. -Iccan -I../ccan -Ilibnvme -I../libnvme -Ilibnvme/src -I../libnvme/src -I/usr/include/json-c -I/usr/include/python3.14 -fvisibility=hidden -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O2 -g -fomit-frame-pointer -D_GNU_SOURCE -include project-config.h -fPIC -MD -MQ libnvme/libnvme/_nvme.cpython-314-x86_64-linux-gnu.so.p/meson-generated_.._nvme_wrap.c.o -MF libnvme/libnvme/_nvme.cpython-314-x86_64-linux-gnu.so.p/meson-generated_.._nvme_wrap.c.o.d -o libnvme/libnvme/_nvme.cpython-314-x86_64-linux-gnu.so.p/meson-generated_.._nvme_wrap.c.o -c libnvme/libnvme/nvme_wrap.c
In file included from /usr/include/python3.14/Python.h:71,
from libnvme/libnvme/nvme_wrap.c:203:
/usr/include/python3.14/pyport.h:660:35: error: missing ‘)’ after ‘__has_attribute’
660 | #if _Py__has_attribute(fallthrough) && (!defined(__clang__) || \
| ^
./project-config.h:86:35: error: missing binary operator before token ‘(’
86 | #define fallthrough __attribute__((__fallthrough__))
| ^
/usr/include/python3.14/pyport.h:25:49: note: in definition of macro ‘_Py__has_attribute’
25 | # define _Py__has_attribute(x) __has_attribute(x)
| ^
/usr/include/python3.14/pyport.h:660:24: note: in expansion of macro ‘fallthrough’
660 | #if _Py__has_attribute(fallthrough) && (!defined(__clang__) || \
| ^~~~~~~~~~~
› meson install -C .build-incl-lib
ninja: Entering directory `/home/wagi/work/nvme-cli/.build-incl-lib'
ninja: no work to do.
Installing libnvme/src/libnvme.so.3.0.0 to /tmp/test/lib64
Installing nvme to /tmp/test/sbin
Installing /home/wagi/work/nvme-cli/libnvme/src/libnvme.h to /tmp/test/include
'/tmp/test/include/libnvme.h': Unable to set owner 0 and group 0: Operation not permitted, ignoring...
Installing /home/wagi/work/nvme-cli/libnvme/src/libnvme-mi.h to /tmp/test/include
To your questions:
› ./scripts/build.sh -m muon
~/work/nvme-cli/.build-tools/muon ~/work/nvme-cli |
|
Good feedback. I'll start working on it. Thanks. |
363f4d9 to
af2cbd6
Compare
|
I fixed the following:
I have a few questions regarding the following items:
|
6568ff0 to
8b3fd95
Compare
|
@igaw - Added 2 new meson options: Regarding |
8b3fd95 to
a651347
Compare
Change the build flow so that libnvme is no longer defined as a Meson subproject of nvme-cli. Instead, include libnvme's meson.build directly from the top-level meson.build. This allows sharing a common ccan directory between nvme-cli and libnvme, and generates a single configuration header, project-config.h (formerly config.h), used by all components. The old file name conflicted with plugins/solidigm/solidigm-telemetry/config.h, hence the rename. Also reformat all meson.build files to fix indentation inconsistencies and other cosmetic discrepancies. Signed-off-by: Martin Belanger <[email protected]>
a651347 to
de94af4
Compare
|
@igaw - Regarding your earlier comment:
Building the library ( Please let me know how you want to proceed. |
Change the build flow so that libnvme is no longer defined as a Meson subproject of nvme-cli. Instead, include libnvme's meson.build directly from the top-level meson.build.
This allows sharing a common ccan directory between nvme-cli and libnvme, and generates a single configuration header, project-config.h (formerly config.h), used by all components. The old file name conflicted with plugins/solidigm/solidigm-telemetry/config.h, hence the rename.
Also reformat all meson.build files to fix indentation inconsistencies and other cosmetic discrepancies.
@igaw - I tested different build options (enabling all possible options including generating the docs). Everything is working although I couldn't test cross-compilation and other exotic options (e.g. muon).
One thing that I wasn't sure about is the licensing which is slightly different between nvme-cli and libnvme. I have kept both licenses as follows. I made sure these would get used in the
nvme.spec.inandlibnvme.spec.in.