Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Error linking against target architecture while building new package
@ 2023-09-14 10:15 Sourabh Hegde
  2023-09-14 13:14 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 5+ messages in thread
From: Sourabh Hegde @ 2023-09-14 10:15 UTC (permalink / raw)
  To: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 3289 bytes --]

Hello,

I am trying to build a new Buildroot package for i.MX Neural Networks
Accelerator Plugin <https://github.com/nxp-imx/nn-imx/tree/imx_1.3.0> . The
imx-nn-accelerator.mk :
#############################################################
#
# i.MX Neural Networks Accelerator Plugin
#
#############################################################

IMX_NN_ACCELERATOR_VERSION = lf-5.15.71-2.2.1
IMX_NN_ACCELERATOR_SOURCE = $(IMX_NN_ACCELERATOR_VERSION).tar.gz
IMX_NN_ACCELERATOR_SITE =
https://github.com/nxp-imx/nn-imx/archive/refs/tags
IMX_NN_ACCELERATOR_LICENSE = MIT
IMX_NN_ACCELERATOR_LICENSE_FILES = LICENSE
IMX_NN_ACCELERATOR_DEPENDENCIES = imx-gpu-viv

PKG_NAME = imx-nn-accelerator
PKG_VERSION = lf-5.15.71-2.2.1

define IMX_NN_ACCELERATOR_BUILD_CMDS
    $(MAKE) LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D) \
        SDKTARGETSYSROOT=$(STAGING_DIR) \
        AQROOT=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
endef

define IMX_NN_ACCELERATOR_INSTALL_TARGET_CMDS
    $(INSTALL) -D -m 0644 $(@D)/libneuralnetworks*.so*
$(TARGET_DIR)/usr/lib/
    $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/include/OVXLIB
    $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/include/nnrt
    cp -r $(@D)/include/OVXLIB/* $(TARGET_DIR)/usr/include/OVXLIB/
    cp -r $(@D)/include/nnrt/* $(TARGET_DIR)/usr/include/nnrt/
endef

$(eval $(generic-package))

This is already integrated in Yocto nn-imx_1.3.0.bb
<https://github.com/nxp-imx/meta-imx/blob/64a864ab77de06a557afcb01e6dd4d21606e6948/meta-ml/recipes-libraries/nn-imx/nn-imx_1.3.0.bb>
and I am trying to replicate the same in Buildroot. But while building this
is giving the error:

/usr/bin/make -j17 LDFLAGS="" -C
/.../build/imx-nn-accelerator-lf-5.15.71-2.2.1
SDKTARGETSYSROOT=/.../per-package/imx-nn-accelerator/host/aarch64-buildroot-linux-gnu/sysroot
AQROOT=/.../build/imx-nn-accelerator-lf-5.15.71-2.2.1
  LINK    libovxlib.so.1.1.0
/usr/bin/ld: skipping incompatible
/build/per-package/imx-nn-accelerator/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libOpenVX.so
when searching for -lOpenVX
/usr/bin/ld: skipping incompatible
/build/per-package/imx-nn-accelerator/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libOpenVX.so
when searching for -lOpenVX
/usr/bin/ld: cannot find -lOpenVX
/usr/bin/ld: skipping incompatible
/build/per-package/imx-nn-accelerator/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libOpenVXU.so
when searching for -lOpenVXU
/usr/bin/ld: skipping incompatible
/build/per-package/imx-nn-accelerator/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libOpenVXU.so
when searching for -lOpenVXU
/usr/bin/ld: cannot find -lOpenVXU
/usr/bin/ld: skipping incompatible
/build/per-package/imx-nn-accelerator/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libCLC.so
when searching for -lCLC
/usr/bin/ld: skipping incompatible
/build/per-package/imx-nn-accelerator/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libCLC.so
when searching for -lCLC
/usr/bin/ld: cannot find -lCLC
/usr/bin/ld: skipping incompatible
/build/per-package/imx-nn-accelerator/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libVSC.so
when searching for -lVSC

It looks like it is failing to link against the target architecture..
(LDFLAGS variable is empty)

Can anyone please let me know what is missing in makefile and how to
resolve this?

Thanks in advance

[-- Attachment #1.2: Type: text/html, Size: 3808 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-09-14 21:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-14 10:15 [Buildroot] Error linking against target architecture while building new package Sourabh Hegde
2023-09-14 13:14 ` Thomas Petazzoni via buildroot
2023-09-14 15:25   ` Sourabh Hegde
2023-09-14 19:47     ` Thomas Petazzoni via buildroot
2023-09-14 21:11       ` Sourabh Hegde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox