Skip to contentSkip to conversation

ltp: fix rpc build error

PATCH Superseded Kory Maincent 3 participants 8 messages Dec 17, 2020 – Dec 19, 2020

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ltp: fix rpc build error

Add support to tirpc tests build.
Export incdir and libdir to have the right path.

---

Change since v1:
- Use PACKAGECONFIG to enable rpc tests
- Improve ${libdir} and ${incdir} export

 meta/recipes-extended/ltp/ltp_20200930.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-extended/ltp/ltp_20200930.bb +3 -3
index 7acf15b360..9da5d90353 100644
@@ -42,14 +42,14 @@ inherit autotools-brokensep pkgconfig
 
 TARGET_CC_ARCH += "${LDFLAGS}"
 
+export libdir := "${exec_prefix}/${baselib}"
+export incdir := "${exec_prefix}/include"
 export prefix = "/opt/${PN}"
-export exec_prefix = "/opt/${PN}"
 
 PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl,"
+PACKAGECONFIG[rpc] = ", --without-tirpc, virtual/librpc,"
 EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4"
 EXTRA_OECONF = " --with-realtime-testsuite --with-open-posix-testsuite "
-# ltp network/rpc test cases ftbfs when libtirpc is found
-EXTRA_OECONF += " --without-tirpc "
 
 do_install(){
     install -d ${D}${prefix}/
Signature · 1 line
2.17.1
#1 lore raw
Quoted 28 lines

-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Kory Maincent
Sent: den 17 december 2020 15:08
To: [email protected]
Cc: [email protected]
Subject: [OE-core] [PATCH v2] ltp: fix rpc build error

Add support to tirpc tests build.
Export incdir and libdir to have the right path.

---

Change since v1:
- Use PACKAGECONFIG to enable rpc tests
- Improve ${libdir} and ${incdir} export

 meta/recipes-extended/ltp/ltp_20200930.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes- renamed from meta/recipes-extended/ltp/ltp_20200930.bb +0 -0

extended/ltp/ltp_20200930.bb
index 7acf15b360..9da5d90353 100644

meta/recipes-extended/ltp/ltp_20200930.bb inherit autotools-brokensep pkgconfig · line 46

Quoted 5 lines
meta/recipes-extended/ltp/ltp_20200930.bb +2 -0
@@ -42,14 +42,14 @@ inherit autotools-brokensep pkgconfig
 
 TARGET_CC_ARCH += "${LDFLAGS}"
 
+export libdir := "${exec_prefix}/${baselib}"
+export incdir := "${exec_prefix}/include"

This should be a little bit better:

export libdir := "${libdir}"
export incdir := "${incdir}"

meta/recipes-extended/ltp/ltp_20200930.bb inherit autotools-brokensep pkgconfig · line 50

Quoted 5 lines
meta/recipes-extended/ltp/ltp_20200930.bb +1 -1
 export prefix = "/opt/${PN}"
-export exec_prefix = "/opt/${PN}"
 
 PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl,"
+PACKAGECONFIG[rpc] = ", --without-tirpc, virtual/librpc,"

I assume there is a --with-tirpc as well, so this should be:

PACKAGECONFIG[rpc] = "--with-tirpc, --without-tirpc, virtual/librpc,"

Quoted 9 lines
meta/recipes-extended/ltp/ltp_20200930.bb +0 -3
 EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4"
 EXTRA_OECONF = " --with-realtime-testsuite --with-open-posix-testsuite "
-# ltp network/rpc test cases ftbfs when libtirpc is found
-EXTRA_OECONF += " --without-tirpc "
 
 do_install(){
     install -d ${D}${prefix}/
--

2.17.1

//Peter

#2 lore raw

Hello Peter,

Quoted 10 lines · On Thu, 17 Dec 2020 16:21:20 +0000 Peter Kjellerstedt…

meta/recipes-extended/ltp/ltp_20200930.bb inherit autotools-brokensep pkgconfig · line 46

Quoted 5 lines

TARGET_CC_ARCH += "${LDFLAGS}"

meta/recipes-extended/ltp/ltp_20200930.bb +2 -0
+export libdir := "${exec_prefix}/${baselib}"
+export incdir := "${exec_prefix}/include"  

This should be a little bit better:

export libdir := "${libdir}"
export incdir := "${incdir}"

Thanks,
I did not notice but it brings an error and I sent a V3 with it. Your review returns this error:
bb.data_smart.ExpansionError: Failure expanding variable incdir, expression was ${incdir} which triggered exception Exception: variable incdir references itself!

Regards,

Köry,

#3 lore raw
Quoted 25 lines

-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Kory Maincent
Sent: den 18 december 2020 09:52
To: Peter Kjellerstedt <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [OE-core] [PATCH v2] ltp: fix rpc build error

Hello Peter,

Quoted 10 lines · On Thu, 17 Dec 2020 16:21:20 +0000 Peter Kjellerstedt…

meta/recipes-extended/ltp/ltp_20200930.bb inherit autotools-brokensep pkgconfig · line 46

Quoted 5 lines

TARGET_CC_ARCH += "${LDFLAGS}"

meta/recipes-extended/ltp/ltp_20200930.bb +2 -0
+export libdir := "${exec_prefix}/${baselib}"
+export incdir := "${exec_prefix}/include"

This should be a little bit better:

export libdir := "${libdir}"
export incdir := "${incdir}"

Quoted 6 lines

Thanks,
I did not notice but it brings an error and I sent a V3 with it. Your review returns this error:
bb.data_smart.ExpansionError: Failure expanding variable incdir, expression was ${incdir} which triggered exception Exception: variable incdir references itself!

Duh, of course. That is because there is no incdir variable, so "${incdir}" will expand to "\${incdir}". The real variable is called includedir.

This of course brings the question whether ltp expects incdir or includedir, and if it is the latter, then your changes so far have not made any difference when it comes to includedir, which means they shouldn't be needed.

Quoted 4 lines

Regards,

Köry,

//Peter

#4 lore raw
Quoted 6 lines · On Fri, 18 Dec 2020 12:06:06 +0000 Peter Kjellerstedt…
Quoted 5 lines

I did not notice but it brings an error and I sent a V3 with it. Your review returns this error:
bb.data_smart.ExpansionError: Failure expanding variable incdir, expression was ${incdir} which triggered exception Exception: variable incdir references itself!

Quoted 8 lines

Duh, of course. That is because there is no incdir variable, so "${incdir}" will expand to "\${incdir}". The real variable is called includedir.

This of course brings the question whether ltp expects incdir or includedir, and if it is the latter, then your changes so far have not made any difference when it comes to includedir, which means they shouldn't be needed.

Your right it needs only ${libdir}.
In fact, the issue was the recipe could not find tirpc pkgconfig. I have chosen to export libdir because PKG_CONFIG_DIR=${STAGING_DIR_HOST}${libdir}/pkgconfig But maybe it is better to add the path to PKG_CONFIG_PATH?

Regards,

Köry

#5 lore raw
Quoted 26 lines

-----Original Message-----
From: Köry Maincent <[email protected]>
Sent: den 18 december 2020 15:08
To: Peter Kjellerstedt <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [OE-core] [PATCH v2] ltp: fix rpc build error

Quoted 6 lines · On Fri, 18 Dec 2020 12:06:06 +0000 Peter Kjellerstedt…
Quoted 5 lines

I did not notice but it brings an error and I sent a V3 with it. Your review returns this error:
bb.data_smart.ExpansionError: Failure expanding variable incdir, expression was ${incdir} which triggered exception Exception:
variable incdir references itself!

Quoted 8 lines

Duh, of course. That is because there is no incdir variable, so "${incdir}" will expand to "\${incdir}". The real variable is called includedir.

This of course brings the question whether ltp expects incdir or includedir, and if it is the latter, then your changes so far have not made any difference when it comes to includedir, which means they shouldn't be needed.

Quoted 5 lines

Your right it needs only ${libdir}.
In fact, the issue was the recipe could not find tirpc pkgconfig. I have chosen to export libdir because PKG_CONFIG_DIR=${STAGING_DIR_HOST}${libdir}/pkgconfig But maybe it is better to add the path to PKG_CONFIG_PATH?

If that is the only reason for the exported libdir, then I agree, it is better to add:

PKG_CONFIG_PATH .= ":${STAGING_DIR_HOST}${exec_prefix}/${baselib}/pkgconfig"

Preferably with a comment explaining why it is being done.

Quoted 3 lines

Regards,

Köry

//Peter

#6 lore raw
In reply to Kory Maincent
Quoted 20 lines · Kory Maincent

Add support to tirpc tests build.
Export incdir and libdir to have the right path.

---

Change since v1:
- Use PACKAGECONFIG to enable rpc tests
- Improve ${libdir} and ${incdir} export

 meta/recipes-extended/ltp/ltp_20200930.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-extended/ltp/ltp_20200930.bb +0 -0
index 7acf15b360..9da5d90353 100644

meta/recipes-extended/ltp/ltp_20200930.bb inherit autotools-brokensep pkgconfig · line 46

Quoted 5 lines
meta/recipes-extended/ltp/ltp_20200930.bb +2 -0
@@ -42,14 +42,14 @@ inherit autotools-brokensep pkgconfig
 
 TARGET_CC_ARCH += "${LDFLAGS}"
 
+export libdir := "${exec_prefix}/${baselib}"
+export incdir := "${exec_prefix}/include"

In general we try and avoid :=, is there a reason its needed here rather than just "=" ? If so, it might be something that should be mentioned in the commit message?

Cheers,
Richard

#7 lore raw
Quoted 10 lines · On Fri, 18 Dec 2020 13:36:10 +0000 Richard Purdie…

meta/recipes-extended/ltp/ltp_20200930.bb inherit autotools-brokensep pkgconfig · line 46

Quoted 6 lines
meta/recipes-extended/ltp/ltp_20200930.bb +2 -0
@@ -42,14 +42,14 @@ inherit autotools-brokensep pkgconfig
 
 TARGET_CC_ARCH += "${LDFLAGS}"
 
+export libdir := "${exec_prefix}/${baselib}"
+export incdir := "${exec_prefix}/include"  

In general we try and avoid :=, is there a reason its needed here rather than just "=" ? If so, it might be something that should be mentioned in the commit message?

Ok, the point was to avoid these ${incdir} and ${libdir} get modified by the "export ${prefix}". In fact, I need to do it only with the PKG_CONFIG_PATH variable. Yes, I will mention it.

Regards,

Köry

Quoted 4 lines

Cheers,
Richard