Xilinx / smartcam

Other
25 stars 21 forks source link

unable to build - missing kernel.h but cannot install Xilinx App package #4

Closed mhanuel26 closed 2 years ago

mhanuel26 commented 2 years ago

Hello All, Hi @lokeshjadhav,

I am getting the following error

PetaLinux environment set to '/tools/Xilinx/PetaLinux/2021.2'
WARNING: This is not a supported OS
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services
mhanuel@mhanuel-MSI:~/devel/xilinx/smartcam$ ./build.sh ${SDKPATH}
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mhanuel/devel/xilinx/smartcam/build
[ 16%] Building CXX object CMakeFiles/ivas_airender.dir/src/ivas_airender.cpp.o
[ 33%] Building C object CMakeFiles/ivas_xpp.dir/src/ivas_xpp_pipeline.c.o
[ 50%] Linking CXX executable smartcam
/home/mhanuel/devel/xilinx/smartcam/src/ivas_xpp_pipeline.c:17:10: fatal error: ivas/ivas_kernel.h: No such file or directory
   17 | #include <ivas/ivas_kernel.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
/home/mhanuel/petalinux_sdk_2021.2/sysroots/x86_64-petalinux-linux/usr/libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/10.2.0/real-ld: cannot find -lgstapp-1.0
/home/mhanuel/petalinux_sdk_2021.2/sysroots/x86_64-petalinux-linux/usr/libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/10.2.0/real-ld: cannot find -lgstreamer-1.0
/home/mhanuel/petalinux_sdk_2021.2/sysroots/x86_64-petalinux-linux/usr/libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/10.2.0/real-ld: cannot find -lgstbase-1.0
/home/mhanuel/petalinux_sdk_2021.2/sysroots/x86_64-petalinux-linux/usr/libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/10.2.0/real-ld: cannot find -lgstvideo-1.0
/home/mhanuel/petalinux_sdk_2021.2/sysroots/x86_64-petalinux-linux/usr/libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/10.2.0/real-ld: cannot find -lgstallocators-1.0
/home/mhanuel/petalinux_sdk_2021.2/sysroots/x86_64-petalinux-linux/usr/libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/10.2.0/real-ld: cannot find -lgstrtsp-1.0
/home/mhanuel/petalinux_sdk_2021.2/sysroots/x86_64-petalinux-linux/usr/libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/10.2.0/real-ld: cannot find -lgstrtspserver-1.0
/home/mhanuel/petalinux_sdk_2021.2/sysroots/x86_64-petalinux-linux/usr/libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/10.2.0/real-ld: cannot find -lgstvideo-1.0
/home/mhanuel/petalinux_sdk_2021.2/sysroots/x86_64-petalinux-linux/usr/libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/10.2.0/real-ld: cannot find -lgstallocators-1.0
/home/mhanuel/petalinux_sdk_2021.2/sysroots/x86_64-petalinux-linux/usr/libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/10.2.0/real-ld: cannot find -lgstrtsp-1.0
/home/mhanuel/petalinux_sdk_2021.2/sysroots/x86_64-petalinux-linux/usr/libexec/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/10.2.0/real-ld: cannot find -lgstrtspserver-1.0
make[2]: *** [CMakeFiles/ivas_xpp.dir/build.make:82: CMakeFiles/ivas_xpp.dir/src/ivas_xpp_pipeline.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:153: CMakeFiles/ivas_xpp.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/smartcam.dir/build.make:103: smartcam] Error 1
make[1]: *** [CMakeFiles/Makefile2:99: CMakeFiles/smartcam.dir/all] Error 2
/home/mhanuel/devel/xilinx/smartcam/src/ivas_airender.cpp:24:10: fatal error: ivas/ivas_kernel.h: No such file or directory
   24 | #include <ivas/ivas_kernel.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/ivas_airender.dir/build.make:82: CMakeFiles/ivas_airender.dir/src/ivas_airender.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:126: CMakeFiles/ivas_airender.dir/all] Error 2
make: *** [Makefile:171: all] Error 2

Now I have follow up the SDK guide but I could not install the Xilinx Application Packages on the image, after enabling any of the packages, for example the kv260-smartcam the error I am getting is

[INFO] Sourcing buildtools
[INFO] Silentconfig project
[INFO] Generating kconfig for Rootfs
[INFO] Menuconfig rootfs

*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

[INFO] Generating plnxtool conf
[INFO] Successfully configured rootfs
mhanuel@mhanuel-MSI:~/devel/xilinx/xilinx-k26-som-2021.2$ petalinux-build
[INFO] Sourcing buildtools
[INFO] Building project
[INFO] Sourcing build environment
[INFO] Generating workspace directory
INFO: bitbake petalinux-image-minimal
NOTE: Started PRServer with DBfile: /home/mhanuel/devel/xilinx/xilinx-k26-som-2021.2/build/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 43985, PID: 3267979
Loading cache: 100% |#######################################################################################################################################################################| Time: 0:00:00
Loaded 5125 entries from dependency cache.
Parsing recipes: 100% |#####################################################################################################################################################################| Time: 0:00:00
Parsing of 3476 .bb files complete (3468 cached, 8 parsed). 5133 targets, 283 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES 'packagegroup-kv260-smartcam' (but /home/mhanuel/devel/xilinx/xilinx-k26-som-2021.2/components/yocto/layers/meta-petalinux/recipes-core/images/petalinux-image-minimal.bb RDEPENDS on or otherwise requires it)
packagegroup-kv260-smartcam was skipped: Recipe is blacklisted: This recipe does not work with the 2021.2 release.
NOTE: Runtime target 'packagegroup-kv260-smartcam' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['packagegroup-kv260-smartcam']
ERROR: Required build target 'petalinux-image-minimal' has no buildable providers.
Missing or unbuildable dependency chain was: ['petalinux-image-minimal', 'packagegroup-kv260-smartcam']

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
ERROR: Failed to build project. Check the /home/mhanuel/devel/xilinx/xilinx-k26-som-2021.2/build/build.log file for more details...

Would you please advise,

Thanks,

xlnx-yuxiz commented 2 years ago

Hi @mhanuel26, How did you get your sdk.sh? Please check if you follow the steps in this page to get it. Please follow the exact step from the start till the end of step Build SDK.

mhanuel26 commented 2 years ago

Hi @xlnx-yuxiz ,

I did exactly as explained there, look at my console output

mhanuel@mhanuel-MSI:~/devel/xilinx/xilinx-k26-som-2021.2$ petalinux-build
[INFO] Sourcing buildtools
[INFO] Building project
[INFO] Sourcing build environment
[INFO] Generating workspace directory
INFO: bitbake petalinux-image-minimal
NOTE: Started PRServer with DBfile: /home/mhanuel/devel/xilinx/xilinx-k26-som-2021.2/build/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 41185, PID: 3057436
Loading cache: 100% |                                                                                                                                                                      | ETA:  --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes: 100% |#####################################################################################################################################################################| Time: 0:00:44
Parsing of 3476 .bb files complete (0 cached, 3476 parsed). 5133 targets, 283 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |##################################################################################################################################################################| Time: 0:00:11
Sstate summary: Wanted 421 Found 409 Missed 12 Current 2975 (97% match, 99% complete)
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 9547 tasks of which 9212 didn't need to be rerun and all succeeded.
INFO: Successfully copied built images to tftp dir: /tftpboot
[INFO] Successfully built project
mhanuel@mhanuel-MSI:~/devel/xilinx/xilinx-k26-som-2021.2$ petalinux-build -s
[INFO] Sourcing buildtools
[INFO] Building project
[INFO] Sourcing build environment
[INFO] Generating workspace directory
INFO: bitbake petalinux-image-minimal -c do_populate_sdk
NOTE: Started PRServer with DBfile: /home/mhanuel/devel/xilinx/xilinx-k26-som-2021.2/build/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 46467, PID: 3121383
Loading cache: 100% |#######################################################################################################################################################################| Time: 0:00:00
Loaded 5125 entries from dependency cache.
Parsing recipes: 100% |#####################################################################################################################################################################| Time: 0:00:00
Parsing of 3476 .bb files complete (3468 cached, 8 parsed). 5133 targets, 283 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |##################################################################################################################################################################| Time: 0:00:04
Checking sstate mirror object availability: 100% |##########################################################################################################################################| Time: 0:00:04
Sstate summary: Wanted 778 Found 688 Missed 90 Current 1693 (88% match, 96% complete)
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 7243 tasks of which 7224 didn't need to be rerun and all succeeded.
[INFO] Copying SDK Installer...
[INFO] Successfully built project
mhanuel@mhanuel-MSI:~/devel/xilinx/xilinx-k26-som-2021.2$ ls
build  components  config.project  hardware  images  pre-built  project-spec  README  README.hw
mhanuel@mhanuel-MSI:~/devel/xilinx/xilinx-k26-som-2021.2$ ls images/
linux
mhanuel@mhanuel-MSI:~/devel/xilinx/xilinx-k26-som-2021.2$ ls images/linux/
bl31.bin  dtbos     imgsel.bin                pmufw.elf               ramdisk.manifest  rootfs.cpio.gz.u-boot  rootfs.tar.gz  u-boot.bin      u-boot.elf           zynqmp-qemu-multiarch-arm.dtb
bl31.elf  Image     imgsel.elf                pxelinux.cfg            ramdisk.tar.gz    rootfs.ext4            sdk.sh         u-boot.dtb      vmlinux              zynqmp-qemu-multiarch-pmu.dtb
boot.scr  Image.gz  petalinux-sdimage.wic.gz  ramdisk.cpio.gz         rootfs.cpio       rootfs.jffs2           system.bit     u-boot-dtb.bin  zynqmp_fsbl.elf
config    image.ub  pl.dtbo                   ramdisk.cpio.gz.u-boot  rootfs.cpio.gz    rootfs.manifest        system.dtb     u-boot-dtb.elf  zynqmp-qemu-arm.dtb

The problem is that if I select the Xilinx App package, for instance the steps

echo 'CONFIG_packagegroup-kv260-smartcam' >> project-spec/meta-user/conf/user-rootfsconfig
petalinux-config -c rootfs

rootfs_petalinux

After doing petalinux-build I get the aforementioned error, that is

ERROR: Nothing RPROVIDES 'packagegroup-kv260-smartcam' (but /home/mhanuel/devel/xilinx/xilinx-k26-som-2021.2/components/yocto/layers/meta-petalinux/recipes-core/images/petalinux-image-minimal.bb RDEPENDS on or otherwise requires it)
packagegroup-kv260-smartcam was skipped: Recipe is blacklisted: This recipe does not work with the 2021.2 release.
NOTE: Runtime target 'packagegroup-kv260-smartcam' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['packagegroup-kv260-smartcam']
ERROR: Required build target 'petalinux-image-minimal' has no buildable providers.
Missing or unbuildable dependency chain was: ['petalinux-image-minimal', 'packagegroup-kv260-smartcam']

So my build don't have those packages, might that be the cause?

If so, how can I fixed it?

Will appreciate your help,

xlnx-yuxiz commented 2 years ago

Oh, I just notice that you are using 2021.2, please switch to 2021.1, just as what the doc page required exactly. We blacklist this app in 2021.2 and maybe related dependencies, so building smartcam with 2021.2 is not straightforward.

mhanuel26 commented 2 years ago

Hi @xlnx-yuxiz, Ok. What does it means the app is backlisted, would it be no more supported ?

Is 2021.1 compatible with the new Vitis AI 2.0? It is confusing to match the versions of different tools.

Thanks,

xlnx-yuxiz commented 2 years ago

Hi @mhanuel26,

"Blacklist" is just a concept of petalinux to disable some packages, we will definitely continue the support. It's disabled just because it's not tested formally with the 2021.2 tools, though it should work.

And Vitis AI 2.0 can run with 2021.1, but the xmodel files need to be recompiled with the compiler shipped in VAI 2.0.

If you just would like to try this application, the most easy way is to use the 2021.1 tools.

mhanuel26 commented 2 years ago

Hi @xlnx-yuxiz ,

It seems there is still something broken with the 2021.1 version. I have followed the guide to install SDK and it was correctly generated using the steps you point. You can see output log here

mhanuel@mhanuel-MSI:~/devel/xilinx$ source ./Petalinux/2021.1/settings.sh 
PetaLinux environment set to '/home/mhanuel/devel/xilinx/Petalinux/2021.1'
WARNING: This is not a supported OS
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services
mhanuel@mhanuel-MSI:~/devel/xilinx$ cd xilinx-k26-starterkit-2021.1/
mhanuel@mhanuel-MSI:~/devel/xilinx/xilinx-k26-starterkit-2021.1$ petalinux-config -c rootfs
[INFO] Sourcing buildtools
[INFO] Generating Kconfig for project
[INFO] Silentconfig project
[INFO] Generating kconfig for Rootfs
[INFO] Menuconfig rootfs

*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

[INFO] Generating plnxtool conf
^[[C[INFO] Successfully configured rootfs
mhanuel@mhanuel-MSI:~/devel/xilinx/xilinx-k26-starterkit-2021.1$ petalinux-build
[INFO] Sourcing buildtools
[INFO] Building project
[INFO] Sourcing build environment
[INFO] Adding user layers
[INFO] Generating workspace directory
INFO: bitbake petalinux-image-minimal
NOTE: Started PRServer with DBfile: /home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/build/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 37629, PID: 1576541
Loading cache: 100% |                                                                                                                                                                      | ETA:  --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes: 100% |#####################################################################################################################################################################| Time: 0:01:03
Parsing of 3478 .bb files complete (0 cached, 3478 parsed). 5113 targets, 269 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
NOTE: Fetching uninative binary shim file:///home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/components/yocto/downloads/uninative/5ec5a9276046e7eceeac749a18b175667384e1f445cd4526300a41404d985a5b/x86_64-nativesdk-libc.tar.xz;sha256sum=5ec5a9276046e7eceeac749a18b175667384e1f445cd4526300a41404d985a5b (will check PREMIRRORS first)
Initialising tasks: 100% |##################################################################################################################################################################| Time: 0:00:19
Checking sstate mirror object availability: 100% |##########################################################################################################################################| Time: 0:00:43
Sstate summary: Wanted 4231 Found 3521 Missed 710 Current 0 (83% match, 0% complete)
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 11742 tasks of which 5050 didn't need to be rerun and all succeeded.
INFO: Successfully copied built images to tftp dir: /tftpboot
[INFO] Successfully built project
mhanuel@mhanuel-MSI:~/devel/xilinx/xilinx-k26-starterkit-2021.1$ petalinux-package --wic --bootfiles "ramdisk.cpio.gz.u-boot boot.scr Image system.dtb"
INFO: Sourcing build environment
INFO: bitbake wic-tools
NOTE: Started PRServer with DBfile: /home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/build/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 45195, PID: 130622
Loading cache: 100% |                                                                                                                                                                      | ETA:  --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes: 100% |#####################################################################################################################################################################| Time: 0:00:45
Parsing of 3478 .bb files complete (0 cached, 3478 parsed). 5113 targets, 269 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |##################################################################################################################################################################| Time: 0:00:02
Sstate summary: Wanted 39 Found 39 Missed 0 Current 121 (100% match, 100% complete)
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 593 tasks of which 575 didn't need to be rerun and all succeeded.
INFO: Extracting rootfs, This may take time!
INFO: Creating wic image...
INFO: wic create /home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/build/wic/rootfs.wks --rootfs-dir /home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/build/wic/rootfs --bootimg-dir /home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/images/linux/ --kernel-dir /home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/images/linux/ --outdir /tmp/tmp.rSuZjPKqVP -n /home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/build/tmp/work/cortexa72-cortexa53-xilinx-linux/wic-tools/1.0-r0/recipe-sysroot-native 
INFO: Creating image(s)...

WARNING: bootloader config not specified, using defaults

INFO: The new image(s) can be found here:
  /tmp/tmp.rSuZjPKqVP/rootfs-202203110516-mmcblk0.direct

The following build artifacts were used to create the image(s):
  ROOTFS_DIR:                   /home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/build/wic/rootfs
  BOOTIMG_DIR:                  /home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/images/linux/
  KERNEL_DIR:                   /home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/images/linux/
  NATIVE_SYSROOT:               /home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/build/tmp/work/cortexa72-cortexa53-xilinx-linux/wic-tools/1.0-r0/recipe-sysroot-native

INFO: The image(s) were created using OE kickstart file:
  /home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/build/wic/rootfs.wks
mhanuel@mhanuel-MSI:~/devel/xilinx/xilinx-k26-starterkit-2021.1$ gzip images/linux/petalinux-sdimage.wic
mhanuel@mhanuel-MSI:~/devel/xilinx/xilinx-k26-starterkit-2021.1$ petalinux-build -s
[INFO] Sourcing buildtools
[INFO] Building project
[INFO] Sourcing build environment
[INFO] Generating workspace directory
INFO: bitbake petalinux-image-minimal -c do_populate_sdk
NOTE: Started PRServer with DBfile: /home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/build/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 37589, PID: 184753
Loading cache: 100% |                                                                                                                                                                      | ETA:  --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes: 100% |#####################################################################################################################################################################| Time: 0:00:44
Parsing of 3478 .bb files complete (0 cached, 3478 parsed). 5113 targets, 269 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |##################################################################################################################################################################| Time: 0:00:10
Checking sstate mirror object availability: 100% |##########################################################################################################################################| Time: 0:00:05
Sstate summary: Wanted 912 Found 823 Missed 89 Current 2122 (90% match, 97% complete)
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 8742 tasks of which 8723 didn't need to be rerun and all succeeded.
[INFO] Copying SDK Installer...
[INFO] Successfully built project
mhanuel@mhanuel-MSI:~/devel/xilinx/xilinx-k26-starterkit-2021.1$ ls
build  components  config.project  hardware  images  pre-built  project-spec  README  README.hw
mhanuel@mhanuel-MSI:~/devel/xilinx/xilinx-k26-starterkit-2021.1$ ./images/linux/sdk.sh 
PetaLinux SDK installer version 2021.1
======================================
Enter target directory for SDK (default: /opt/petalinux/2021.1): ^C
mhanuel@mhanuel-MSI:~/devel/xilinx/xilinx-k26-starterkit-2021.1$ ls /opt/petalinux/2021.1
ls: cannot access '/opt/petalinux/2021.1': No such file or directory
mhanuel@mhanuel-MSI:~/devel/xilinx/xilinx-k26-starterkit-2021.1$ images/linux/sdk.sh 
PetaLinux SDK installer version 2021.1
======================================
Enter target directory for SDK (default: /opt/petalinux/2021.1): ./images/linux/sdk
You are about to install the SDK to "/home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/images/linux/sdk". Proceed [Y/n]? 
Extracting SDK.......................................................................................................................................................................................................................................................................................................................................done
Setting it up...done
Your environment is misconfigured, you probably need to 'unset LD_LIBRARY_PATH'
but please check why this was set in the first place and that it's safe to unset.
The SDK will not operate correctly in most cases when LD_LIBRARY_PATH is set.
For more references see:
  http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80
  http://xahlee.info/UnixResource_dir/_/ldpath.html
/home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/images/linux/sdk/post-relocate-setup.sh: Failed to source /home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/images/linux/sdk/environment-setup-cortexa72-cortexa53-xilinx-linux with status 1
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
 $ . /home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/images/linux/sdk/environment-setup-cortexa72-cortexa53-xilinx-linux

Now when trying to build the smartcam app I am getting

mhanuel@mhanuel-MSI:~/devel/xilinx/smartcam$ SDKPATH=/home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/images/linux/sdk
mhanuel@mhanuel-MSI:~/devel/xilinx/smartcam$ unset LD_LIBRARY_PATH
mhanuel@mhanuel-MSI:~/devel/xilinx/smartcam$ ./build.sh ${SDKPATH}
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mhanuel/devel/xilinx/smartcam/build
[ 50%] Built target ivas_xpp
[ 50%] Building CXX object CMakeFiles/ivas_airender.dir/src/ivas_airender.cpp.o
[ 83%] Built target smartcam
/home/mhanuel/devel/xilinx/smartcam/src/ivas_airender.cpp:25:10: fatal error: gst/ivas/gstinferencemeta.h: No such file or directory
   25 | #include <gst/ivas/gstinferencemeta.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/ivas_airender.dir/build.make:82: CMakeFiles/ivas_airender.dir/src/ivas_airender.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:126: CMakeFiles/ivas_airender.dir/all] Error 2
make: *** [Makefile:171: all] Error 2

What am I missing?

Please help me solve this,

Thanks,

mhanuel26 commented 2 years ago

Hi @xlnx-yuxiz ,

Searching for that file in the sdk folder, please look at the following


mhanuel@mhanuel-MSI:~/devel/xilinx/smartcam$ find /home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/images/linux/sdk/sysroots/ -iname gstinferencemeta.h
/home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/images/linux/sdk/sysroots/cortexa72-cortexa53-xilinx-linux/usr/src/debug/ivas-gst/1.0-r0/git/ivas-gst-plugins/gst-libs/gst/ivas/gstinferencemeta.h
/home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/images/linux/sdk/sysroots/cortexa72-cortexa53-xilinx-linux/usr/include/gstreamer-1.0/gst/ivas/gstinferencemeta.h

So it seems the file is in there right?

Please let me know your thoughts, Manuel

mhanuel26 commented 2 years ago

Hi @xlnx-yuxiz ,

Now I have change the line 25 in ivas_airender.cpp to

#include <gstreamer-1.0/gst/ivas/gstinferencemeta.h>

the error is gone but another inclusion error arise, this time from the gstinferencemeta.h file.

mhanuel@mhanuel-MSI:~/devel/xilinx/smartcam$ ./build.sh ${SDKPATH}
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mhanuel/devel/xilinx/smartcam/build
[ 33%] Built target ivas_xpp
[ 50%] Building CXX object CMakeFiles/ivas_airender.dir/src/ivas_airender.cpp.o
[ 83%] Built target smartcam
In file included from /home/mhanuel/devel/xilinx/smartcam/src/ivas_airender.cpp:25:
/home/mhanuel/devel/xilinx/xilinx-k26-starterkit-2021.1/images/linux/sdk/sysroots/cortexa72-cortexa53-xilinx-linux/usr/include/gstreamer-1.0/gst/ivas/gstinferencemeta.h:33:10: fatal error: gst/ivas/gstinferenceprediction.h: No such file or directory
   33 | #include <gst/ivas/gstinferenceprediction.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/ivas_airender.dir/build.make:82: CMakeFiles/ivas_airender.dir/src/ivas_airender.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:126: CMakeFiles/ivas_airender.dir/all] Error 2
make: *** [Makefile:171: all] Error 2

I don't want to be messing around with this includes, but I believe something change and now the gst becomes gstreamer-1.0/gst

What are your thoughts?

xlnx-yuxiz commented 2 years ago

Hi @mhanuel26 , No need to change the code, but can you try to remove the build directory under the source code folder and then build?

mhanuel26 commented 2 years ago

Hi @xlnx-yuxiz ,

That make it. I was able to build and generate the rpm package.

I was able to install on the target as below

xilinx-k26-starterkit-2021_1:~$ sudo rpm -ivh --force ./smartcam-1.0.1-1.aarch64.rpm 
Password: 
Verifying...                          ################################# [100%]
%pretrans(smartcam-1.0.1-1.aarch64): scriptlet start
%pretrans(smartcam-1.0.1-1.aarch64): execv(/bin/sh) pid 2526
%pretrans(smartcam-1.0.1-1.aarch64): waitpid(2526) rc 2526 status 0
Preparing...                          ################################# [100%]
%prein(smartcam-1.0.1-1.aarch64): scriptlet start
%prein(smartcam-1.0.1-1.aarch64): execv(/bin/sh) pid 2527
%prein(smartcam-1.0.1-1.aarch64): waitpid(2527) rc 2527 status 0
Updating / installing...
   1:smartcam-1.0.1-1                 ################################# [100%]
%post(smartcam-1.0.1-1.aarch64): scriptlet start
%post(smartcam-1.0.1-1.aarch64): execv(/bin/sh) pid 2530
%post(smartcam-1.0.1-1.aarch64): waitpid(2530) rc 2530 status 0
%posttrans(smartcam-1.0.1-1.aarch64): scriptlet start
%posttrans(smartcam-1.0.1-1.aarch64): execv(/bin/sh) pid 2531
%posttrans(smartcam-1.0.1-1.aarch64): waitpid(2531) rc 2531 status 0

Now the question is how to know if I am using the latest app, not sure the versioning number, from the name of the package, it looks different from the one listed using dnf utility (i.e. sudo dnf list installed | cat -n) as shown below

package_smartcam

How do I know I am working with the latest update ?

Thanks,

xlnx-yuxiz commented 2 years ago

Hi @mhanuel26, The naming of dnf package is determined by petalinux config, no need to be the same as the one generated by build.sh. The git commit for the package to be installed by dnf is just the latest one of branch 2021.1, f76f59951f36bc89cb35f081accdd5c380a4ca9b.

BTW, please help close this issue when it's appropriate.

mhanuel26 commented 2 years ago

Thanks a lot for your help @xlnx-yuxiz