<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>13949</bug_id>
          
          <creation_ts>2020-06-17 05:53:56 +0000</creation_ts>
          <short_desc>&quot;libdir&quot; QA test bombs out when adding a symlink into another package</short_desc>
          <delta_ts>2024-10-10 11:48:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>oe-core other</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yann Dirson">ydirson</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>87503</commentid>
    <comment_count>0</comment_count>
    <who name="Yann Dirson">ydirson</who>
    <bug_when>2020-06-17 05:53:56 +0000</bug_when>
    <thetext>In dunfell, building for an x86_64 target without multilib, one externally-built binary missed /lib64/ld-linux-x86-64.so.2, so I&apos;m adding a symlink in a separate package using:

do_install_append_x86-64() {
    mkdir ${D}/lib64
    ln -s /lib/ld-linux-x86-64.so.2 ${D}/lib64/
}
FILES_${PN} += &quot;/lib64/ld-linux-x86-64.so.2&quot;


This explodes with the following:

ERROR: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: &apos;exec_python_func() autogenerated&apos;, lineno: 2, function: &lt;module&gt;
     0001:
 *** 0002:do_package_qa(d)
     0003:
File: &apos;/home/yann/yocto/meta-blade/meta-shadow-os/poky/meta/classes/insane.bbclass&apos;, lineno: 1044, function: do_package_qa
     1040:    warn_checks, error_checks = parse_test_matrix(&quot;QARECIPETEST&quot;)
     1041:    package_qa_recipe(warn_checks, error_checks, pn, d)
     1042:
     1043:    if &apos;libdir&apos; in d.getVar(&quot;ALL_QA&quot;).split():
 *** 1044:        package_qa_check_libdir(d)
     1045:
     1046:    qa_sane = d.getVar(&quot;QA_SANE&quot;)
     1047:    if not qa_sane:
     1048:        bb.fatal(&quot;QA run found fatal errors. Please consider fixing them.&quot;)
File: &apos;/home/yann/yocto/meta-blade/meta-shadow-os/poky/meta/classes/insane.bbclass&apos;, lineno: 275, function: package_qa_check_libdir
     0271:                    if base_libdir not in rel_path:
     0272:                        # make sure it&apos;s an actual ELF file
     0273:                        elf = oe.qa.ELFFile(full_path)
     0274:                        try:
 *** 0275:                            elf.open()
     0276:                            messages.append(&quot;%s: found library in wrong location: %s&quot; % (package, rel_path))
     0277:                        except (oe.qa.NotELFFileError):
     0278:                            pass
     0279:                if exec_re.match(rel_path):
File: &apos;/home/yann/yocto/meta-blade/meta-shadow-os/poky/meta/lib/oe/qa.py&apos;, lineno: 55, function: open
     0051:        if self.data:
     0052:            self.data.close()
     0053:
     0054:    def open(self):
 *** 0055:        with open(self.name, &quot;rb&quot;) as f:
     0056:            try:
     0057:                self.data = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
     0058:            except ValueError:
     0059:                # This means the file is empty


RDEPENDS_${PN} += &quot;glibc&quot; will not help.

Looks like I have to avoid this with INSANE_SKIP_${PN} += &quot;libdir&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87510</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2020-06-18 07:54:09 +0000</bug_when>
    <thetext>Don&apos;t check symlinks?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95443</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-04-21 18:45:46 +0000</bug_when>
    <thetext>Moved en masse from 4.2 to 4.3 by Randy.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98945</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-04-30 13:24:34 +0000</bug_when>
    <thetext>Reproducer:

do_install:append:class-target() {
    install -d ${D}${prefix}/lib ${D}${prefix}/lib64
    ln -s /something ${D}${prefix}/lib/libfoo.so.1
    ln -s /something ${D}${prefix}/lib64/libfoo.so.1
}
FILES:${PN} += &quot;${prefix}/lib*&quot;

File: &apos;/home/rosbur01/Yocto/poky/meta/lib/oe/qa.py&apos;, lineno: 60, function: open
     0056:        if self.data:
     0057:            self.data.close()
     0058:
     0059:    def open(self):
 *** 0060:        with open(self.name, &quot;rb&quot;) as f:
     0061:            try:
     0062:                self.data = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
     0063:            except ValueError:
     0064:                # This means the file is empty
Exception: FileNotFoundError: [Errno 2] No such file or directory: &apos;/work/ross/build/tmp/work/cortexa57-poky-linux/m4/1.4.19/packages-split/m4/usr/lib64/libfoo.so.1&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98946</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-04-30 13:57:36 +0000</bug_when>
    <thetext>Posted &apos;insane: handle dangling symlinks in the libdir QA check&apos; to the list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99809</commentid>
    <comment_count>5</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-10-10 11:48:39 +0000</bug_when>
    <thetext>Fixed in oe-core f044290f98ea66f2cecfbffd7d392dbc3d986da9.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>