chrisss404 / check-mk-arm

Checkmk for Raspberry Pi.
182 stars 23 forks source link

dpkg-buildpackage: error #40

Closed 4Syno closed 3 years ago

4Syno commented 3 years ago

Hello; Thank you for the scripts. I use an Odroid C2 (aarch64). When trying to compile check-mk-raw-2.0.0p8 for Ubuntu 20.04, I get an error. Can you pls help me ?

/opt/build-mk/check-mk-raw-2.0.0p8.cre/omd/build/intermediate_install/Python-3.8.7/lib/python3.8/lib-dynload/xxlimited.cpython-38-aarch64-linux-gnu.so: RUNPATH=/omd/versions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/lib
/opt/build-mk/check-mk-raw-2.0.0p8.cre/omd/build/intermediate_install/Python-3.8.7/lib/python3.8/lib-dynload/xxlimited.cpython-38-aarch64-linux-gnu.so: new RUNPATH: /omd/versions/2.0.0p8.cre/lib
/opt/build-mk/check-mk-raw-2.0.0p8.cre/omd/build/intermediate_install/Python-3.8.7/lib/python3.8/lib-dynload/zlib.cpython-38-aarch64-linux-gnu.so: RUNPATH=/omd/versions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/lib
/opt/build-mk/check-mk-raw-2.0.0p8.cre/omd/build/intermediate_install/Python-3.8.7/lib/python3.8/lib-dynload/zlib.cpython-38-aarch64-linux-gnu.so: new RUNPATH: /omd/versions/2.0.0p8.cre/lib
sed -i 's|--rpath,/omd/versions/[^/]*/lib|--rpath,/omd/versions/2.0.0p8.cre/lib|g' \
    /opt/build-mk/check-mk-raw-2.0.0p8.cre/omd/build/intermediate_install/Python-3.8.7/lib/python3.8/_sysconfigdata__linux_x86_64-linux-gnu.py
sed: can't read /opt/build-mk/check-mk-raw-2.0.0p8.cre/omd/build/intermediate_install/Python-3.8.7/lib/python3.8/_sysconfigdata__linux_x86_64-linux-gnu.py: No such file or directory
make[1]: *** [packages/Python3/Python3.make:50: /opt/build-mk/check-mk-raw-2.0.0p8.cre/omd/build/stamps/Python-3.8.7-cache-pkg-process] Error 2
make[1]: Leaving directory '/opt/build-mk/check-mk-raw-2.0.0p8.cre/omd'
make: *** [debian/rules:42: install] Error 2
dpkg-buildpackage: error: debian/rules build-arch subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage --rules-target build-arch -rfakeroot -us -uc -ui -i.git -I.git -i.gitignore -I.gitignore failed
make[1]: *** [Makefile:278: deb] Error 2
make[1]: Leaving directory '/opt/build-mk/check-mk-raw-2.0.0p8.cre/omd'
make: *** [Makefile:98: deb] Error 2
4Syno commented 3 years ago

Upps, already in your documentation:

cp omd/packages/Python3/Python3.make omd/packages/Python3/Python3.make_v2
vim omd/packages/Python3/Python3.make_v2
-            $(PACKAGE_PYTHON3_PYTHONPATH)/_sysconfigdata__linux_x86_64-linux-gnu.py
+            $(PACKAGE_PYTHON3_PYTHONPATH)/_sysconfigdata__linux_aarch64-linux-gnu.py
-            $(PACKAGE_PYTHON3_PYTHONPATH)/_sysconfigdata__linux_x86_64-linux-gnu.py
+            $(PACKAGE_PYTHON3_PYTHONPATH)/_sysconfigdata__linux_aarch64-linux-gnu.py
diff -u omd/packages/Python3/Python3.make omd/packages/Python3/Python3.make_v2 > ../python-make-set-aarch64-architecture.patch

This did the trick - Thanks! But dpkg-buildpackage still failed, any advice?

dpkg-buildpackage --rules-target binary-arch -rfakeroot -us -uc -ui -i.git -I.git -i.gitignore -I.gitignore
dpkg-buildpackage: warning: using a gain-root-command while being root
dpkg-buildpackage: info: source package check-mk-raw-2.0.0p8
dpkg-buildpackage: info: source version 0.focal
dpkg-buildpackage: info: source distribution focal
dpkg-buildpackage: info: source changed by Checkmk team <feedback@checkmk.com>
dpkg-buildpackage: info: host architecture arm64
 fakeroot debian/rules binary-arch
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_installdebconf -n
dh_installinit
dh_installman
dh_link
dh_strip --exclude=wkhtmltopdf --exclude=cmc --exclude=waitmax --exclude agent_modbus
strip: Unable to recognise the format of the input file `debian/check-mk-raw-2.0.0p8/opt/omd/versions/2.0.0p8.cre/lib/seccli/libCSPI.so'
dh_strip: error: strip --remove-section=.comment --remove-section=.note --strip-unneeded debian/check-mk-raw-2.0.0p8/opt/omd/versions/2.0.0p8.cre/lib/seccli/libCSPI.so returned exit code 1
dh_strip: error: Aborting due to earlier error
make: *** [debian/rules:103: binary-arch] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary-arch subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage --rules-target binary-arch -rfakeroot -us -uc -ui -i.git -I.git -i.gitignore -I.gitignore failed
make[1]: *** [Makefile:278: deb] Error 2
make[1]: Leaving directory '/opt/build-mk/check-mk-raw-2.0.0p8.cre/omd'
make: *** [Makefile:98: deb] Error 2
chrisss404 commented 3 years ago

Hi 4Syno,

my guess is that you haven't excluded the navicli module (see: https://github.com/chrisss404/check-mk-arm#remove-module-navicli)?

It needs to be excluded as there is no arm version available.

Good luck & BR Christian

4Syno commented 3 years ago

Finally it worked. Lets see if I can build my own docker image with it.

dpkg-deb: building package 'check-mk-raw-2.0.0p8' in '../check-mk-raw-2.0.0p8_0.focal_arm64.deb'.
dpkg-deb: building package 'check-mk-raw-2.0.0p8-dbgsym' in 'debian/.debhelper/scratch-space/build-check-mk-raw-2.0.0p8/check-mk-raw-2.0.0p8-dbgsym_0.focal_arm64.deb'.
    Renaming check-mk-raw-2.0.0p8-dbgsym_0.focal_arm64.deb to check-mk-raw-2.0.0p8-dbgsym_0.focal_arm64.ddeb
make[1]: Leaving directory '/opt/build-mk/check-mk-raw-2.0.0p8.cre/omd'
root@1e65a2f9e104:/opt/build-mk# 

Thanks again :)