Xilinx / smartcam

Other
23 stars 21 forks source link

Build.sh failed CPack Error: Error while execution CPackRPM.cmake #2

Closed luoheng1208 closed 2 years ago

luoheng1208 commented 2 years ago

$ 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: /media/luoheng/hd2/petalux_workspace/xilinx-k26-starterkit-2021.1/build/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 42863, PID: 9318 Loading cache: 100% | | ETA: --:--:-- Loaded 0 entries from dependency cache. Parsing recipes: 100% |####################################################| Time: 0:01:01 Parsing of 3478 .bb files complete (0 cached, 3478 parsed). 5113 targets, 269 skipped, 0 masked, 0 errors. Removing 7 recipes from the k26 sysroot: 100% |############################| Time: 0:00:00 Removing 7 recipes from the zynqmpgeneric sysroot: 100% |#################| Time: 0:00:01 NOTE: Resolving any missing task queue dependencies Initialising tasks: 100% |#################################################| Time: 0:00:10 Checking sstate mirror object availability: 100% |#########################| Time: 0:00:27 Sstate summary: Wanted 1371 Found 786 Missed 585 Current 1663 (57% match, 80% complete) NOTE: Executing Tasks NOTE: Tasks Summary: Attempted 8742 tasks of which 8625 didn't need to be rerun and all succeeded. [INFO] Copying SDK Installer... [INFO] Successfully built project xx@xx-xxx:~/workspace/gitlab/smartcam$ images/linux/sdk.sh_ PetaLinux SDK installer version 2021.1

Enter target directory for SDK (default: /opt/petalinux/2021.1): /home/opt/pkg/petaliunx-2021.1/image/linux/sdk You are about to install the SDK to "/home/opt/pkg/petaliunx-2021.1/image/linux/sdk". Proceed [Y/n]? y Extracting SDK.......................................................................................................................................................................................................................................................................................................................................done Setting it up...done 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.

xx@xx-xxx:~/workspace/gitlab/smartcam$ source /home/opt/pkg/petaliunx-2021.1/image/linux/sdk/environment-setup-cortexa72-cortexa53-xilinx-linux

xx@xx-xxx:~/workspace/gitlab/smartcam$ ./build.sh /home/opt/pkg/petaliunx-2021.1/image/linux/sdk
-- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project:

CMAKE_TOOLCHAIN_FILE

-- Build files have been written to: /home/luoheng/workspace/gitlab/smartcam/build [ 33%] Built target ivas_xpp [ 66%] Built target ivas_airender [100%] Built target smartcam [ 33%] Built target smartcam [ 66%] Built target ivas_airender [100%] Built target ivas_xpp Run CPack packaging tool... -- Toolchain file defaulted to '/home/opt/pkg/petaliunx-2021.1/image/linux/sdk/sysroots/x86_64-petalinux-linux/usr/share/cmake/OEToolchainConfig.cmake' CPack: Create package using RPM CPack: Install projects CPack: - Run preinstall target for: smartcam CPack: - Install project: smartcam [] CPack: Create package CMake Error at /home/opt/pkg/petaliunx-2021.1/image/linux/sdk/sysroots/x86_64-petalinux-linux/usr/share/cmake-3.18/Modules/Internal/CPack/CPackRPM.cmake:774 (message): RPM package requires rpmbuild executable Call Stack (most recent call first): /home/opt/pkg/petaliunx-2021.1/image/linux/sdk/sysroots/x86_64-petalinux-linux/usr/share/cmake-3.18/Modules/Internal/CPack/CPackRPM.cmake:1887 (cpack_rpm_generate_package)

CPack Error: Error while execution CPackRPM.cmake CPack Error: Problem compressing the directory CPack Error: Error when generating package: smartcam Makefile:147: recipe for target 'package' failed make: *** [package] Error 1

xlnx-yuxiz commented 2 years ago

Hi @luoheng1208 ,

Please notice that there's error message "CMake Error at /home/opt/pkg/petaliunx-2021.1/image/linux/sdk/sysroots/x86_64-petalinux-linux/usr/share/cmake-3.18/Modules/Internal/CPack/CPackRPM.cmake:774 (message): RPM package requires rpmbuild executable"

So it may be caused by missing the 'rpmbuild' executable. Normally this file is provided by the rpm package, please try to install it with your package manager, for example, for Ubuntu system, you could run 'apt-get install rpm".