Hi Mark,

Got it. And could you please tell me that what host system can trigger this error?  I need to add it to testcases.

Thanks,

Quanyang

On 6/20/24 23:46, Mark Hatle wrote:
I had previously merged this patch.  But I'm going to have to revert it.

Unfortunately it's proven to be unsafe specifically due to the same issue that you reported in the commit message, but for a different reason.

When the component starts up it will use host system components. Due to the LD_LIBRARY_PATH when the libxv_commontasks.so is loaded, it will load the ncurses stuff from the Yocto Project native recipe.  On a system where the corresponding Yocto Project glibc is not being used and the host system is OLDER then the Yocto Project glibc, the component will get an error:

error loading hsi package: couldn't load file "libxv_commontasks.so": libc.so.6: version 'GLIBC_2.33' not found (required by .../libtinfo.so.5).

I will be reverting this, and putting in something that checks that libtinfo is available on the host and warning the user if it's not available.  We simply can't use any YP produced components to fill in for missing host items in XSCT because the YP components may require incompatible/unavailable symbols from a more recent glibc.

--Mark

On 2/29/24 12:58 AM, quanyang.wang via lists.yoctoproject.org wrote:
From: Quanyang Wang <quanyang.w...@windriver.com>

Some OS distros like Ubuntu22.04 don't install libtinfo.so.5 by default,
when running the prebuilt app "xsct", it will go into building error:

| package require xsdb FAILED:
| error loading hsi package: couldn't load file "libxv_commontasks.so": libtinfo.so.5: cannot open shared object file: No such file or directory

The package "ncurses-native" in yocto can provide this library and we
add it to LD_LIBRARY_PATH for xsct to fix the building issue above.

Signed-off-by: Quanyang Wang <quanyang.w...@windriver.com>
---
  classes/xsctbase.bbclass | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/classes/xsctbase.bbclass b/classes/xsctbase.bbclass
index 5b98e25..134ad98 100644
--- a/classes/xsctbase.bbclass
+++ b/classes/xsctbase.bbclass
@@ -25,6 +25,8 @@ XSCTH_ARCH ?= "${@bb.utils.contains_any('XSCTH_PROC_IP', ['psu_cortexa53', 'psv_
  PROJ_ARG ??= "-ws ${XSCTH_WS} -pname ${XSCTH_PROJ} -rp ${XSCTH_REPO}"
  HW_ARG ??= "-processor_ip ${XSCTH_PROC_IP} -hdf ${XSCTH_HDF} -arch ${XSCTH_ARCH} ${@['', '-processor ${XSCTH_PROC}'][d.getVar('XSCTH_PROC', True) != '']}"
  +DEPENDS += 'ncurses-native'
+
  do_configure[vardeps] += "TOOL_VER_MAIN"
  do_configure[depends] += "virtual/hdf:do_deploy"
  do_configure[lockfiles] = "${TMPDIR}/xsct-invoke.lock"
@@ -52,7 +54,7 @@ do_configure() {
      echo "Using xsct from: $(which xsct)"
      echo "cmd is: xsct -sdx -nodisp ${XSCTH_SCRIPT} ${PROJ_ARG} ${HW_ARG} ${APP_ARG} ${MISC_ARG}"   -    eval xsct -sdx -nodisp ${XSCTH_SCRIPT} ${PROJ_ARG} ${HW_ARG} ${APP_ARG} ${MISC_ARG} +    eval LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${STAGING_LIBDIR_NATIVE} xsct -sdx -nodisp ${XSCTH_SCRIPT} ${PROJ_ARG} ${HW_ARG} ${APP_ARG} ${MISC_ARG}
    }





-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5434): 
https://lists.yoctoproject.org/g/meta-xilinx/message/5434
Mute This Topic: https://lists.yoctoproject.org/mt/104639467/21656
Group Owner: meta-xilinx+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-xilinx/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to