| Summary: | "libdir" QA test bombs out when adding a symlink into another package | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Yann Dirson <ydirson> |
| Component: | oe-core other | Assignee: | Ross Burton <ross.burton> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | randy.macleod |
| Version: | unspecified | ||
| Target Milestone: | 5.1 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
Don't check symlinks? Moved en masse from 4.2 to 4.3 by Randy. 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} += "${prefix}/lib*"
File: '/home/rosbur01/Yocto/poky/meta/lib/oe/qa.py', lineno: 60, function: open
0056: if self.data:
0057: self.data.close()
0058:
0059: def open(self):
*** 0060: with open(self.name, "rb") 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: '/work/ross/build/tmp/work/cortexa57-poky-linux/m4/1.4.19/packages-split/m4/usr/lib64/libfoo.so.1'
Posted 'insane: handle dangling symlinks in the libdir QA check' to the list. Fixed in oe-core f044290f98ea66f2cecfbffd7d392dbc3d986da9. |
In dunfell, building for an x86_64 target without multilib, one externally-built binary missed /lib64/ld-linux-x86-64.so.2, so I'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} += "/lib64/ld-linux-x86-64.so.2" 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: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:do_package_qa(d) 0003: File: '/home/yann/yocto/meta-blade/meta-shadow-os/poky/meta/classes/insane.bbclass', lineno: 1044, function: do_package_qa 1040: warn_checks, error_checks = parse_test_matrix("QARECIPETEST") 1041: package_qa_recipe(warn_checks, error_checks, pn, d) 1042: 1043: if 'libdir' in d.getVar("ALL_QA").split(): *** 1044: package_qa_check_libdir(d) 1045: 1046: qa_sane = d.getVar("QA_SANE") 1047: if not qa_sane: 1048: bb.fatal("QA run found fatal errors. Please consider fixing them.") File: '/home/yann/yocto/meta-blade/meta-shadow-os/poky/meta/classes/insane.bbclass', lineno: 275, function: package_qa_check_libdir 0271: if base_libdir not in rel_path: 0272: # make sure it's an actual ELF file 0273: elf = oe.qa.ELFFile(full_path) 0274: try: *** 0275: elf.open() 0276: messages.append("%s: found library in wrong location: %s" % (package, rel_path)) 0277: except (oe.qa.NotELFFileError): 0278: pass 0279: if exec_re.match(rel_path): File: '/home/yann/yocto/meta-blade/meta-shadow-os/poky/meta/lib/oe/qa.py', lineno: 55, function: open 0051: if self.data: 0052: self.data.close() 0053: 0054: def open(self): *** 0055: with open(self.name, "rb") 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} += "glibc" will not help. Looks like I have to avoid this with INSANE_SKIP_${PN} += "libdir"