WTF is going on with the nvme-cli build

Damien Le Moal dlemoal at kernel.org
Thu Apr 13 03:49:42 PDT 2023


On 4/13/23 16:07, Daniel Wagner wrote:
> Hi Christoph,
> 
> On Wed, Apr 12, 2023 at 11:52:34PM -0700, Christoph Hellwig wrote:
>> can you please urgently fix nvme-cli to have a sane build system
>> again?
> 
> Please, let's not be so drastic and I would argue all build system have their
> wards. We just need to figure out how to handle them.

Since we are talking about this, builds of libnvme on latest Fedora miserably fail:

FAILED: src/libnvme.so.1.4.0.p/nvme_json.c.o
ccache cc -Isrc/libnvme.so.1.4.0.p -Isrc -I../src -I. -I.. -Iccan -I../ccan
-Iinternal -I../internal -I/usr/local/include/json-c -fdiagnostics-color=always
-D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O0 -g
-fomit-frame-pointer -D_GNU_SOURCE -include internal/config.h
-DCCAN_LIST_DEBUG=1 -DCCAN_STR_DEBUG=1 -fPIC -MD -MQ
src/libnvme.so.1.4.0.p/nvme_json.c.o -MF src/libnvme.so.1.4.0.p/nvme_json.c.o.d
-o src/libnvme.so.1.4.0.p/nvme_json.c.o -c ../src/nvme/json.c
../src/nvme/json.c:15:10: fatal error: json.h: No such file or directory
   15 | #include <json.h>
      |          ^~~~~~~~

All the time... And I do have the json development headers installed:

/usr/include/json-c/json.h

But the compile command does not add -I/usr/include/json-c: it uses the broken
default /usr/local/include/json-c. No normal distro install anything in
/usr/local...

And that is despite the fact that meson setup says:

Run-time dependency json-c found: YES 0.15

Something is not right.

> 
>> Right now it tries to download random packages over the internet
>> instead of not building components or failing the configuration.
> 
> Which version are you using? I've recentely change the default behavior of the
> fallback mechanisme but might have missed something. Alternatively, it also
> possible to change the global default for this feature.
> 
> The flag in question is:
> 
>   meson setup --wrap-mode=nofallback .build
> 




More information about the Linux-nvme mailing list