Usama Nathani

01/08/2021, 7:30 PM
Hi Guys! I had a question, I am trying to build a target package for RPM (on Ubuntu 20.0.4) to run on Centos 7, and I have trouble building it. Does anyone have any suggestions?
+ /usr/lib/rpm/ -j4 --build-id-seed 4.3.0_1_ga224cbb2-1 --unique-debug-suffix -4.3.0_1_ga224cbb2-1.x86_64 --unique-debug-src-base osquery-4.3.0_1_ga224cbb2-1.x86_64 /home/usama/os/query/osquery/build/_CPack_Packages/Linux/RPM/BUILD/
/usr/lib/rpm/ line 240: eu-strip: command not found
error: Bad exit status from /var/tmp/rpm-tmp.ol6wPa (%install)
    Bad exit status from /var/tmp/rpm-tmp.ol6wPa (%install)
CPackRPM:Debug:    - /home/usama/os/query/osquery/build/_CPack_Packages/Linux/RPM/rpmbuildosquery.out
CPackRPM:Debug: *** Building target platforms: x86_64
Building for target x86_64
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.9fDhCc
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.ol6wPa
extracting debug info from /home/usama/os/query/osquery/build/_CPack_Packages/Linux/RPM/osquery-4.3.0-1-ga224cbb2-1.linux.x86_64/usr/bin/osqueryd

RPM build errors:
CMake Error at /usr/local/share/cmake-3.17/Modules/Internal/CPack/CPackRPM.cmake:1808 (message):
  RPM package was not generated!
Call Stack (most recent call first):
  /usr/local/share/cmake-3.17/Modules/Internal/CPack/CPackRPM.cmake:1879 (cpack_rpm_generate_package)

CPack Error: Error while execution CPackRPM.cmake
CPack Error: Problem compressing the directory
CPack Error: Error when generating package: osquery
make: *** [Makefile:161: package] Error 1


01/08/2021, 7:51 PM
You need to install elfutils to provide that binary
🙌 1

Usama Nathani

01/08/2021, 8:20 PM
Thank you, this worked perfectly! 🙂


01/08/2021, 8:20 PM
The relevant error is:
/usr/lib/rpm/ line 240: eu-strip: command not found
I hit this error often too. I think we should add the package to our build requirements documentation on the wiki. 😛
😀 1