* WTF is going on with the nvme-cli build
@ 2023-04-13 6:52 Christoph Hellwig
2023-04-13 7:07 ` Daniel Wagner
0 siblings, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2023-04-13 6:52 UTC (permalink / raw)
To: dwagner; +Cc: linux-nvme
Hi Daniel,
can you please urgently fix nvme-cli to have a sane build system
again?
Right now it tries to download random packages over the internet
instead of not building components or failing the configuration.
That's simply not acceptable.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: WTF is going on with the nvme-cli build
2023-04-13 6:52 WTF is going on with the nvme-cli build Christoph Hellwig
@ 2023-04-13 7:07 ` Daniel Wagner
2023-04-13 7:25 ` Christoph Hellwig
2023-04-13 10:49 ` Damien Le Moal
0 siblings, 2 replies; 10+ messages in thread
From: Daniel Wagner @ 2023-04-13 7:07 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-nvme
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.
> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: WTF is going on with the nvme-cli build
2023-04-13 7:07 ` Daniel Wagner
@ 2023-04-13 7:25 ` Christoph Hellwig
2023-04-17 8:40 ` Daniel Wagner
2023-04-13 10:49 ` Damien Le Moal
1 sibling, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2023-04-13 7:25 UTC (permalink / raw)
To: Daniel Wagner; +Cc: Christoph Hellwig, linux-nvme
On Thu, Apr 13, 2023 at 09:07:29AM +0200, 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.
No, the idea of downloading software over a network connection is just
completely fucke up and not acceptable.
>
> > 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.
Latest git tree.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: WTF is going on with the nvme-cli build
2023-04-13 7:07 ` Daniel Wagner
2023-04-13 7:25 ` Christoph Hellwig
@ 2023-04-13 10:49 ` Damien Le Moal
2023-04-17 8:44 ` Daniel Wagner
1 sibling, 1 reply; 10+ messages in thread
From: Damien Le Moal @ 2023-04-13 10:49 UTC (permalink / raw)
To: Daniel Wagner, Christoph Hellwig; +Cc: linux-nvme
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
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: WTF is going on with the nvme-cli build
2023-04-13 7:25 ` Christoph Hellwig
@ 2023-04-17 8:40 ` Daniel Wagner
0 siblings, 0 replies; 10+ messages in thread
From: Daniel Wagner @ 2023-04-17 8:40 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-nvme
On Thu, Apr 13, 2023 at 12:25:05AM -0700, Christoph Hellwig wrote:
> No, the idea of downloading software over a network connection is just
> completely fucke up and not acceptable.
I've update all the defaults of libnvme and nvme-cli and updated the CI build
accordingly. While at it also tried to sync up the documentation. Hope this
addresses the issue.
I think I could also provide some basic build scripts for different
scenarios. Just to make things a bit smoother.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: WTF is going on with the nvme-cli build
2023-04-13 10:49 ` Damien Le Moal
@ 2023-04-17 8:44 ` Daniel Wagner
2023-04-17 9:02 ` Damien Le Moal
0 siblings, 1 reply; 10+ messages in thread
From: Daniel Wagner @ 2023-04-17 8:44 UTC (permalink / raw)
To: Damien Le Moal; +Cc: Christoph Hellwig, linux-nvme
On Thu, Apr 13, 2023 at 07:49:42PM +0900, Damien Le Moal wrote:
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.
meson uses pkg-config (and cmake) to find all the dependency. I suspect the
PKG_CONFIG_PATH contains /usr/local/lib/pkgconfig. Can you check the
pkg-config configuration?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: WTF is going on with the nvme-cli build
2023-04-17 8:44 ` Daniel Wagner
@ 2023-04-17 9:02 ` Damien Le Moal
2023-04-17 9:14 ` Daniel Wagner
0 siblings, 1 reply; 10+ messages in thread
From: Damien Le Moal @ 2023-04-17 9:02 UTC (permalink / raw)
To: Daniel Wagner; +Cc: Christoph Hellwig, linux-nvme
On 4/17/23 17:44, Daniel Wagner wrote:
> On Thu, Apr 13, 2023 at 07:49:42PM +0900, Damien Le Moal wrote:
> 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.
>
> meson uses pkg-config (and cmake) to find all the dependency. I suspect the
> PKG_CONFIG_PATH contains /usr/local/lib/pkgconfig. Can you check the
> pkg-config configuration?
Yeah. The problem is there. pkgconf gives the correct path:
$ pkgconf --cflags json-c
-I/usr/include/json-c
But pkg-config is broken:
$ pkg-config --cflags json-c
-I/usr/local/include/json-c
Not sure why as in Fedora, pkg-config is a shim layer on top of pkgconf provided
by pkgconf-pkg-config package. But I cannot uninstall pkgconf-pkg-config as it
is used by gnome-shell.
Looks like something is broken in Fedora Not sure what as
/usr/lib64/pkgconfig/json-c.pc is perfectly fine, pointing at /usr/include/json-c.
But I would still say that it is probably time to update to pkgconf :)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: WTF is going on with the nvme-cli build
2023-04-17 9:02 ` Damien Le Moal
@ 2023-04-17 9:14 ` Daniel Wagner
2023-04-17 11:06 ` Damien Le Moal
0 siblings, 1 reply; 10+ messages in thread
From: Daniel Wagner @ 2023-04-17 9:14 UTC (permalink / raw)
To: Damien Le Moal; +Cc: Christoph Hellwig, linux-nvme
On Mon, Apr 17, 2023 at 06:02:24PM +0900, Damien Le Moal wrote:
> Not sure why as in Fedora, pkg-config is a shim layer on top of pkgconf provided
> by pkgconf-pkg-config package. But I cannot uninstall pkgconf-pkg-config as it
> is used by gnome-shell.
Didn't know about this new implementation of pkg-config. I found some explenation
here:
https://fedoraproject.org/wiki/Changes/pkgconf_as_system_pkg-config_implementation
> Looks like something is broken in Fedora Not sure what as
> /usr/lib64/pkgconfig/json-c.pc is perfectly fine, pointing at /usr/include/json-c.
>
> But I would still say that it is probably time to update to pkgconf :)
FWIW, you can specify which pkg-config implementation meson should use via the cross
ini file. For example here is the one for using clang instead of gcc:
[binaries]
c = 'clang'
cpp = 'clang++'
strip = 'strip'
pkgconfig = 'pkg-config'
https://mesonbuild.com/Cross-compilation.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: WTF is going on with the nvme-cli build
2023-04-17 9:14 ` Daniel Wagner
@ 2023-04-17 11:06 ` Damien Le Moal
2023-04-17 14:32 ` Daniel Wagner
0 siblings, 1 reply; 10+ messages in thread
From: Damien Le Moal @ 2023-04-17 11:06 UTC (permalink / raw)
To: Daniel Wagner; +Cc: Christoph Hellwig, linux-nvme
On 4/17/23 18:14, Daniel Wagner wrote:
> On Mon, Apr 17, 2023 at 06:02:24PM +0900, Damien Le Moal wrote:
>> Not sure why as in Fedora, pkg-config is a shim layer on top of pkgconf provided
>> by pkgconf-pkg-config package. But I cannot uninstall pkgconf-pkg-config as it
>> is used by gnome-shell.
>
> Didn't know about this new implementation of pkg-config. I found some explenation
> here:
>
> https://fedoraproject.org/wiki/Changes/pkgconf_as_system_pkg-config_implementation
>
>> Looks like something is broken in Fedora Not sure what as
>> /usr/lib64/pkgconfig/json-c.pc is perfectly fine, pointing at /usr/include/json-c.
>>
>> But I would still say that it is probably time to update to pkgconf :)
>
> FWIW, you can specify which pkg-config implementation meson should use via the cross
> ini file. For example here is the one for using clang instead of gcc:
>
> [binaries]
> c = 'clang'
> cpp = 'clang++'
> strip = 'strip'
> pkgconfig = 'pkg-config'
>
> https://mesonbuild.com/Cross-compilation.html
Replacing 'pkg-config' with 'pkgconf' and reconfiguring+compile still gives the
same error. But I think I found the issue: I had a
/usr/local/lib64/pkgconfig/json-c.pc file pointing at /usr/local/include/json-c.
Not sure how that garbage ended up there. Removing this file and compilation is ok.
My apologies for the noise.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: WTF is going on with the nvme-cli build
2023-04-17 11:06 ` Damien Le Moal
@ 2023-04-17 14:32 ` Daniel Wagner
0 siblings, 0 replies; 10+ messages in thread
From: Daniel Wagner @ 2023-04-17 14:32 UTC (permalink / raw)
To: Damien Le Moal; +Cc: Christoph Hellwig, linux-nvme
On Mon, Apr 17, 2023 at 08:06:52PM +0900, Damien Le Moal wrote:
> Replacing 'pkg-config' with 'pkgconf' and reconfiguring+compile still gives the
> same error.
Just checked what my local machine uses. It's also pkgconf and there is
wrapper around the invocation, similar what Fedora does:
https://src.fedoraproject.org/rpms/pkgconf/blob/rawhide/f/platform-pkg-config.in
I suspect one of those environment variables includes the path the
/usr/local/lib/pkgconfig
> But I think I found the issue: I had a
> /usr/local/lib64/pkgconfig/json-c.pc file pointing at /usr/local/include/json-c.
> Not sure how that garbage ended up there. Removing this file and compilation is ok.
That's also a solution :)
> My apologies for the noise.
All good. I am sure this know-how on pkg-config will be helpful in future :)
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-04-17 14:32 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-13 6:52 WTF is going on with the nvme-cli build Christoph Hellwig
2023-04-13 7:07 ` Daniel Wagner
2023-04-13 7:25 ` Christoph Hellwig
2023-04-17 8:40 ` Daniel Wagner
2023-04-13 10:49 ` Damien Le Moal
2023-04-17 8:44 ` Daniel Wagner
2023-04-17 9:02 ` Damien Le Moal
2023-04-17 9:14 ` Daniel Wagner
2023-04-17 11:06 ` Damien Le Moal
2023-04-17 14:32 ` Daniel Wagner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox