ring: build with global includes
PATCH 1/1 ring: build with global includes
ring has no dependencies and should be able to be built standalone but cannot be since it cannot find rte_config.h. this change directs meson to include global_inc paths just like is done with other libraries e.g. telemetry.
Tyler Retzlaff (1):
ring: build with global includes
lib/ring/meson.build | 2 ++ 1 file changed, 2 insertions(+)
Signature · 1 line
1.8.3.1
PATCH 1/1 ring: build with global includes
Meson include global_inc so that rte_config.h can be found in the include path.
--- lib/ring/meson.build | 2 ++ 1 file changed, 2 insertions(+)
lib/ring/meson.build +2 -0
@@ -1,6 +1,8 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation +includes = [global_inc] + sources = files('rte_ring.c') headers = files('rte_ring.h') # most sub-headers are not for direct inclusion
Signature · 1 line
1.8.3.1
Quoted 11 lines · Tyler Retzlaff
ring has no dependencies and should be able to be built standalone but cannot be since it cannot find
rte_config.h. this change directs meson to includeglobal_incpaths just like is done with other libraries e.g. telemetry.Tyler Retzlaff (1):
ring: build with global includeslib/ring/meson.build | 2 ++ 1 file changed, 2 insertions(+)
I am a little confused by this change - how do you mean built-standalone? The ring library depends upon EAL for memory management, does it not? Also, no DPDK library can be built on its own without the rest of the top-level build infrastructure, which will ensure that the global-include folders are on the include path?
In terms of other libs, e.g. telemetry, the only reason those need the global includes added to their include path explicitly is because those are built ahead of EAL. Anything that depends on EAL - including ring - will have the global includes available.
Can you explain a little more about the use-case you are looking at here, and how you are attempting to build ring?
/Bruce
Quoted 19 lines · Bruce Richardson
Quoted 11 lines · Tyler Retzlaff
ring has no dependencies and should be able to be built standalone but cannot be since it cannot find
rte_config.h. this change directs meson to includeglobal_incpaths just like is done with other libraries e.g. telemetry.Tyler Retzlaff (1):
ring: build with global includeslib/ring/meson.build | 2 ++ 1 file changed, 2 insertions(+)I am a little confused by this change - how do you mean built-standalone? The ring library depends upon EAL for memory management, does it not? Also, no DPDK library can be built on its own without the rest of the top-level build infrastructure, which will ensure that the global-include folders are on the include path?
Quoted 4 lines
In terms of other libs, e.g. telemetry, the only reason those need the global includes added to their include path explicitly is because those are built ahead of EAL. Anything that depends on EAL - including ring - will have the global includes available.
i'm having trouble seeing where in the meson.build that ring depends on eal can you point me to where it is?
Quoted 3 lines
Can you explain a little more about the use-case you are looking at here, and how you are attempting to build ring?
so i found this by trying to understand other libraries dependencies through a process of disabling the build of various subsets.
it's possible i didn't look deeply enough but i didn't see an explicit dependency on eal (in the meson.build files). maybe you can point out where it is because by just having rte_config.h available it compiles and links.
e.g. i don't see.
deps += ['eal']
is the dependency on eal the library or just eal headers? because if it is header only it is equivalent to telemetry i think?
thanks!
ty
Quoted 2 lines
/Bruce
Quoted 49 lines
-----Original Message-----
From: Tyler Retzlaff <[email protected]>
Sent: Monday, November 21, 2022 7:53 PM
To: Bruce Richardson <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] ring: build with global includesQuoted 19 lines · Bruce Richardson
Quoted 11 lines · Tyler Retzlaff
ring has no dependencies and should be able to be built standalone but cannot be since it cannot find
rte_config.h. this change directs meson to includeglobal_incpaths just like is done with other libraries e.g. telemetry.Tyler Retzlaff (1):
ring: build with global includeslib/ring/meson.build | 2 ++ 1 file changed, 2 insertions(+)I am a little confused by this change - how do you mean built-standalone? The ring library depends upon EAL for memory management, does it not? Also, no DPDK library can be built on its own without the rest of the top-level build infrastructure, which will ensure that the global-include folders are on the include path?
Quoted 4 lines
In terms of other libs, e.g. telemetry, the only reason those need the global includes added to their include path explicitly is because those are built ahead of EAL. Anything that depends on EAL - including ring - will have the global includes available.
i'm having trouble seeing where in the meson.build that ring depends on eal can you point me to where it is?
Quoted 3 lines
Can you explain a little more about the use-case you are looking at here, and how you are attempting to build ring?
so i found this by trying to understand other libraries dependencies through a process of disabling the build of various subsets.
it's possible i didn't look deeply enough but i didn't see an explicit dependency on eal (in the meson.build files). maybe you can point out where it is because by just having
rte_config.havailable it compiles and links.
Quoted 6 lines
e.g. i don't see.
deps += ['eal']
is the dependency on eal the library or just eal headers? because if it is header only it is equivalent to telemetry i think?
rte_ring.c uses bunch of EAL functions:rte_zmalloc, rte_memzone_*, rte_log*, rte_mcfg*, etc.
Quoted 6 lines
thanks!
ty
Quoted 2 lines
/Bruce
21/11/2022 22:27, Konstantin Ananyev:
Quoted 10 lines
From: Tyler Retzlaff <[email protected]>
Quoted 6 lines
e.g. i don't see.
deps += ['eal']
is the dependency on eal the library or just eal headers? because if it is header only it is equivalent to telemetry i think?
rte_ring.cuses bunch of EAL functions:rte_zmalloc, rte_memzone_*, rte_log*, rte_mcfg*, etc.
I think deps += ['eal'] is missing in ring meson file.
Quoted 6 lines · Thomas Monjalon
21/11/2022 22:27, Konstantin Ananyev:
Quoted 5 lines
From: Tyler Retzlaff <[email protected]>
Quoted 4 lines
e.g. i don't see.
deps += ['eal']
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
is the dependency on eal the library or just eal headers? because if it is header only it is equivalent to telemetry i think?
rte_ring.cuses bunch of EAL functions:rte_zmalloc, rte_memzone_*, rte_log*, rte_mcfg*, etc.I think deps += ['eal'] is missing in ring meson file.
i guess that's what i'm kind of getting at... if it was there then the patch i submitted is not required since depending on eal would drag in global_inc.
Quoted 11 lines · Tyler Retzlaff
Quoted 9 lines · Thomas Monjalon
21/11/2022 22:27, Konstantin Ananyev:
Quoted 8 lines
From: Tyler Retzlaff <[email protected]>
Quoted 6 lines
e.g. i don't see.
deps += ['eal']
is the dependency on eal the library or just eal headers? because if it is header only it is equivalent to telemetry i think?
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
rte_ring.cuses bunch of EAL functions:rte_zmalloc, rte_memzone_*, rte_log*, rte_mcfg*, etc.I think deps += ['eal'] is missing in ring meson file.
i guess that's what i'm kind of getting at... if it was there then the patch i submitted is not required since depending on eal would drag in
global_inc.
It is implicitly added, via lib/meson.build:
First eal is parsed before a lot of other components:
libraries = [
'kvargs', # eal depends on kvargs
'telemetry', # basic info querying
'eal', # everything depends on eal
'ring',
Then, there is:
# eal is standard dependency once built
if dpdk_conf.has('RTE_LIB_EAL')
deps += ['eal']
endifSignature · 1 line
David Marchand
Quoted 32 lines · David Marchand
Quoted 11 lines · Tyler Retzlaff
Quoted 9 lines · Thomas Monjalon
21/11/2022 22:27, Konstantin Ananyev:
Quoted 8 lines
From: Tyler Retzlaff <[email protected]>
Quoted 6 lines
e.g. i don't see.
deps += ['eal']
is the dependency on eal the library or just eal headers? because if it is header only it is equivalent to telemetry i think?
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
rte_ring.cuses bunch of EAL functions:rte_zmalloc, rte_memzone_*, rte_log*, rte_mcfg*, etc.I think deps += ['eal'] is missing in ring meson file.
i guess that's what i'm kind of getting at... if it was there then the patch i submitted is not required since depending on eal would drag in
global_inc.It is implicitly added, via
lib/meson.build:First eal is parsed before a lot of other components:
libraries = [
'kvargs', # eal depends on kvargs
'telemetry', # basic info querying
'eal', # everything depends on eal
'ring',
Quoted 8 lines
Then, there is:
# eal is standard dependency once built if dpdk_conf.has('RTE_LIB_EAL') deps += ['eal'] endif
Since every library in DPDK that is built after EAL depends upon EAL, it's added as a standard dependency. However, if we prefer to have more explicit dependencies we can remove that and add it to what every libraries need it.
[Ideally, I'd like to have all library meson.build files call out the full list of other libs they use, but I found in the past that it caused the configure time with meson to balloon as it tracked recursive dependencies, leading to entries appearing multiple times and then having to be pruned down. This is why in meson.build files dependency lists have been kept to a minimum up till now]
/Bruce
Quoted 33 lines · Bruce Richardson
Quoted 32 lines · David Marchand
Quoted 11 lines · Tyler Retzlaff
Quoted 9 lines · Thomas Monjalon
21/11/2022 22:27, Konstantin Ananyev:
Quoted 8 lines
From: Tyler Retzlaff <[email protected]>
Quoted 6 lines
e.g. i don't see.
deps += ['eal']
is the dependency on eal the library or just eal headers? because if it is header only it is equivalent to telemetry i think?
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
rte_ring.cuses bunch of EAL functions:rte_zmalloc, rte_memzone_*, rte_log*, rte_mcfg*, etc.I think deps += ['eal'] is missing in ring meson file.
i guess that's what i'm kind of getting at... if it was there then the patch i submitted is not required since depending on eal would drag in
global_inc.It is implicitly added, via
lib/meson.build:First eal is parsed before a lot of other components:
libraries = [
'kvargs', # eal depends on kvargs
'telemetry', # basic info querying
'eal', # everything depends on eal
'ring',
Quoted 8 lines
Quoted 8 lines
Then, there is:
# eal is standard dependency once built if dpdk_conf.has('RTE_LIB_EAL') deps += ['eal'] endif
ah! thank you for pointing this out. i just couldn't see it.
Quoted 11 lines
Since every library in DPDK that is built after EAL depends upon EAL, it's added as a standard dependency. However, if we prefer to have more explicit dependencies we can remove that and add it to what every libraries need it.
[Ideally, I'd like to have all library meson.build files call out the full list of other libs they use, but I found in the past that it caused the configure time with meson to balloon as it tracked recursive dependencies, leading to entries appearing multiple times and then having to be pruned down. This is why in meson.build files dependency lists have been kept to a minimum up till now]
no, this is fine the way it works. i just obsessed about understanding how it was working.
i'll withdraw the patch, it isn't needed.
thanks!