I'm trying to build openblas-0.3.5 with Yocto (Rocko) for my 64-bit Armv8-A. I've found this recipe online and i tweaked it a bit. But i got the following error:
Error:
ERROR: openblas-0.3.5-r0 do_package_qa: QA Issue: non -dev/-dbg/nativesdk- package contains symlink .so: openblas path '/work/aarch64-poky-linux/openblas/0.3.5-r0/packages-split/openblas/usr/lib/libopenblas.so' [dev-so]
WARNING: openblas-0.3.5-r0 do_package_qa: QA Issue: openblas: found library in wrong location: /usr/lib/libopenblas.so.0
openblas: found library in wrong location: /usr/lib/libopenblas_armv8-r0.3.5.so
openblas: found library in wrong location: /usr/lib/libopenblas.so [libdir]
ERROR: openblas-0.3.5-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
ERROR: openblas-0.3.5-r0 do_package_qa: Function failed: do_package_qa
Below is my openblas.bb file:
#
# Copyright (c) 2016 Intel Corporation. All rights reserved.
# Copyright (c) 2019 Luxoft Sweden AB
#
# SPDX-License-Identifier: MIT
#
DESCRIPTION = "OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version."
SUMMARY = "OpenBLAS : An optimized BLAS library"
AUTHOR = "Alexander Leiva <norxander@gmail.com>"
HOMEPAGE = "http://www.openblas.net/"
SECTION = "libs"
LICENSE = "BSD-3-Clause"
DEPENDS = "make"
LIC_FILES_CHKSUM = "file://LICENSE;md5=5adf4792c949a00013ce25d476a2abc0"
SRC_URI = "https://github.com/xianyi/OpenBLAS/archive/v${PV}.tar.gz"
SRC_URI[md5sum] = "579bda57f68ea6e9074bf5780e8620bb"
SRC_URI[sha256sum] = "0950c14bd77c90a6427e26210d6dab422271bc86f9fc69126725833ecdaa0e85"
S = "${WORKDIR}/OpenBLAS-${PV}"
do_compile () {
oe_runmake HOSTCC="${BUILD_CC}" \
CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" \
CROSS_SUFFIX=${HOST_PREFIX} \
ONLY_CBLAS=1 USE_THREAD=0 \
HOSTCC="${BUILD_CC}" \
TARGET=ARMV8 BINARY=64
}
do_install() {
oe_runmake HOSTCC="${BUILD_CC}" \
CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" \
CROSS_SUFFIX=${HOST_PREFIX} \
ONLY_CBLAS=1 USE_THREAD=0 \
HOSTCC="${BUILD_CC}" \
TARGET=ARMV8 BINARY=64 \
PREFIX=${D}/usr \
install
rm -rf ${D}${bindir}
rm -rf ${D}${libdir}/cmake
}
FILES_${PN} += "${libdir}/*"
FILES_${PN} += "/usr/lib/*"
#FILES_${PN}-dev = "${libdir}/* ${includedir}"
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
INSANE_SKIP_${PN} += "staticdev"
Alternative way of removing errors: I replaced -
PREFIX=${D}/usr \
with
PREFIX="${D}/opt/${PN}" \
and
FILES_${PN} += "${libdir}/*"
FILES_${PN} += "/usr/lib/*"
#FILES_${PN}-dev = "${libdir}/* ${includedir}"
with
FILES_${PN} += "/opt/${PN}"
FILES_${PN}-dev += "/opt/${PN}/lib/lib${PN}.so"
#FILES_${PN}-dbg += "/opt/${PN}/lib/.debug"
ISSUES:
1) After doing this, openblas was built without error. But, When i had to work with openblas, after board boot-up, I had to manually copy all the files from /opt/openblas to /usr/lib64/ and /usr/include/.
2) I couldn't find openblas in my sysroots-components folder in build/tmp/sysroots-components/aarch64/openblas
.
3) Couldn't use openblas as dependency of any other recipe. since, it was installed in /opt and not in /usr. (no openblas in sysroots-components)
So, my question is, How do i solve these issues and install openblas in /usr/lib64
instead of /usr/lib
or /opt
??