Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build on Arm64 #4207

Closed
coreybruce opened this issue Jan 26, 2025 · 10 comments
Closed

Fails to build on Arm64 #4207

coreybruce opened this issue Jan 26, 2025 · 10 comments

Comments

@coreybruce
Copy link

coreybruce commented Jan 26, 2025

Describe Your Environment

  • Version of ZoneMinder [release version, development version, or commit] 1.36.35-1
  • How you installed ZoneMinder [e.g. PPA, RPMFusion, from-source, etc] AUR
  • Full name and version of OS manjaro Arm64
  • Browser name and version (if this is an issue with the web interface)

Hey I was told to report the issue by the maintainer of the AUR packages for zoneminder zoneminder-git because it fails to compile on Arm64 and didn't know what the issue is but I should bring it up with you guys as the developer didn't know what the issue is.

https://aur.archlinux.org/packages/zoneminder

[ 16%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/TcpServer.cpp.o
[ 17%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/TcpSocket.cpp.o
[ 17%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/Timer.cpp.o
[ 18%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/Timestamp.cpp.o
[ 19%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/AACSource.cpp.o
[ 19%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/DigestAuthenticator.cpp.o
[ 20%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/G711ASource.cpp.o
[ 21%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/H264Parser.cpp.o
[ 21%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/H264Source.cpp.o
[ 22%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/H265Source.cpp.o
[ 23%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/MediaSession.cpp.o
[ 23%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/RtpConnection.cpp.o
[ 24%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/RtspConnection.cpp.o
[ 25%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/RtspMessage.cpp.o
[ 25%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/RtspPusher.cpp.o
[ 26%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/RtspServer.cpp.o
[ 27%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/VP8Source.cpp.o
[ 27%] Linking CXX static library libRtspServer.a
[ 27%] Built target RtspServer
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
```
Copy link

welcome bot commented Jan 26, 2025

Thanks for opening your first issue here! Just a reminder, this forum is for Bug Reports only. Be sure to follow the issue template!

@connortechnology
Copy link
Member

Thanks for the report. I can try to reproduce, but we have been building on arm64 for quite some time.... Unfortunately your report doesn't include the line that actually says what failed. Can you try to scroll and find it or post the whole output?

@connortechnology
Copy link
Member

Ok, our arm builds are failing too, but I don't think it's our fault. Please check to see if it's the same problem there:
Setting up python3-markupsafe (1.1.0-1build2) ...
Segmentation fault (core dumped)
Traceback (most recent call last):
File "/usr/bin/py3compile", line 290, in
main()
File "/usr/bin/py3compile", line 269, in main
compile(files, versions,
File "/usr/bin/py3compile", line 187, in compile
pipe.send(fn)
File "/usr/bin/py3compile", line 138, in py_compile
stdin.write(filename.encode('utf-8') + b'\n')
BrokenPipeError: [Errno 32] Broken pipe
dpkg: error processing package python3-markupsafe (--configure):

@coreybruce
Copy link
Author

coreybruce commented Jan 27, 2025

Happy to make a report to help a project out, unfortunetly I am not having that same issue and seems to be having a issue with RtspServer

Building zoneminder...
==> Making package: zoneminder 1.36.35-1 (Tue 28 Jan 2025 07:49:28)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found 1.36.35.tar.gz
  -> Found 1.0-zm.tar.gz
  -> Found v3.2.0.tar.gz
  -> Found 055d81fe1293429e496b19104a9ed3360755a440.zip
  -> Found zoneminder-nginx.conf
  -> Found zoneminder-httpd.conf
  -> Found zoneminder-php.ini
  -> Found fcgiwrap-multiwatch.service
==> Validating source files with sha256sums...
    1.36.35.tar.gz ... Passed
    1.0-zm.tar.gz ... Passed
    v3.2.0.tar.gz ... Passed
    055d81fe1293429e496b19104a9ed3360755a440.zip ... Passed
    zoneminder-nginx.conf ... Passed
    zoneminder-httpd.conf ... Passed
    zoneminder-php.ini ... Passed
    fcgiwrap-multiwatch.service ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting 1.36.35.tar.gz with bsdtar
  -> Extracting 1.0-zm.tar.gz with bsdtar
  -> Extracting v3.2.0.tar.gz with bsdtar
  -> Extracting 055d81fe1293429e496b19104a9ed3360755a440.zip with bsdtar
==> Starting prepare()...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
CMake Deprecation Warning at CMakeLists.txt:5 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- The C compiler identification is GNU 14.1.1
-- The CXX compiler identification is GNU 14.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detected compiler: /usr/bin/cc
-- Performing Test HAVE_SENDFILE4_SUPPORT
-- Performing Test HAVE_SENDFILE4_SUPPORT - Success
-- Sendfile support: Linux/Solaris sendfile()
-- Building man pages: Yes (default)
-- Looking for libv4l1-videodev.h
-- Looking for libv4l1-videodev.h - found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for execinfo.h
-- Looking for execinfo.h - found
-- Looking for backtrace
-- Looking for backtrace - found
-- Looking for backtrace_symbols
-- Looking for backtrace_symbols - found
-- Looking for ucontext.h
-- Looking for ucontext.h - found
-- Looking for sys/sendfile.h
-- Looking for sys/sendfile.h - found
-- Looking for sys/syscall.h
-- Looking for sys/syscall.h - found
-- Looking for syscall
-- Looking for syscall - found
-- Looking for sendfile
-- Looking for sendfile - found
-- Looking for posix_memalign
-- Looking for posix_memalign - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of siginfo_t
-- Check size of siginfo_t - done
-- Check size of ucontext_t
-- Check size of ucontext_t - done
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Found ZLIB: /usr/lib/libz.so (found version "1.3.1")
-- Looking for zlib.h
-- Looking for zlib.h - found
-- Found CURL: /usr/lib/libcurl.so (found version "8.11.1")
-- Looking for curl/curl.h
-- Looking for curl/curl.h - found
-- Found JPEG: /usr/lib/libjpeg.so (found version "80")
-- Looking for include files stdio.h, jpeglib.h
-- Looking for include files stdio.h, jpeglib.h - found
-- Found LibJWT: /usr/include
-- Looking for gnutls/gnutls.h
-- Looking for gnutls/gnutls.h - found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pcre.h
-- Looking for pcre.h - found
-- Looking for gcrypt.h
-- Looking for gcrypt.h - found
-- Looking for mysql.h
-- Looking for mysql.h - found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - found
-- Looking for libavcodec/avcodec.h
-- Looking for libavcodec/avcodec.h - found
-- Looking for libavdevice/avdevice.h
-- Looking for libavdevice/avdevice.h - found
-- Looking for libavutil/avutil.h
-- Looking for libavutil/avutil.h - found
-- Looking for libavutil/mathematics.h
-- Looking for libavutil/mathematics.h - found
-- Looking for libavutil/hwcontext.h
-- Looking for libavutil/hwcontext.h - found
-- Looking for libswscale/swscale.h
-- Looking for libswscale/swscale.h - found
-- Looking for libswresample/swresample.h
-- Looking for libswresample/swresample.h - found
-- Checking prototype gnutls_fingerprint for HAVE_DECL_GNUTLS_FINGERPRINT - True
-- Found Perl: /usr/bin/perl (found version "5.40.1")
-- Checking for perl module Sys::Syslog
-- Checking for perl module Sys::Syslog - found at /usr/lib/perl5/5.40/core_perl/Sys/Syslog.pm
-- Checking for perl module DBI
-- Checking for perl module DBI - found at /usr/lib/perl5/5.40/vendor_perl/DBI.pm
-- Checking for perl module DBD::mysql
-- Checking for perl module DBD::mysql - found at /usr/lib/perl5/5.40/vendor_perl/DBD/mysql.pm
-- Checking for perl module Getopt::Long
-- Checking for perl module Getopt::Long - found at /usr/share/perl5/core_perl/Getopt/Long.pm
-- Checking for perl module Time::HiRes
-- Checking for perl module Time::HiRes - found at /usr/lib/perl5/5.40/core_perl/Time/HiRes.pm
-- Checking for perl module Date::Manip
-- Checking for perl module Date::Manip - found at /usr/share/perl5/vendor_perl/Date/Manip.pm
-- Checking for perl module LWP::UserAgent
-- Checking for perl module LWP::UserAgent - found at /usr/share/perl5/vendor_perl/LWP/UserAgent.pm
-- Checking for perl module ExtUtils::MakeMaker
-- Checking for perl module ExtUtils::MakeMaker - found at /usr/share/perl5/core_perl/ExtUtils/MakeMaker.pm
-- Checking for perl module Sys::Mmap
-- Checking for perl module Sys::Mmap - found at /usr/lib/perl5/5.40/vendor_perl/Sys/Mmap.pm
-- Found PerlModules: TRUE
-- Using web user: http
-- Using web group: http
-- Found PkgConfig: /usr/bin/pkg-config (found version "2.3.0")
-- Checking for one of the modules 'polkit-gobject-1;polkit'
-- Checking for module 'glib-2.0'
--   Found glib-2.0, version 2.82.4
-- Found GLIB2: /usr/lib/libglib-2.0.so
-- Found Polkit: /usr/lib/libpolkit-gobject-1.so
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
CMake Deprecation Warning at dep/RtspServer/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


FATALERRORNeed pod2man installed to generate man page
FATALERRORNeed pod2man installed to generate man page
FATALERRORNeed pod2man installed to generate man page
FATALERRORNeed pod2man installed to generate man page
FATALERRORNeed pod2man installed to generate man page
FATALERRORNeed pod2man installed to generate man page
FATALERRORNeed pod2man installed to generate man page
FATALERRORNeed pod2man installed to generate man page
FATALERRORNeed pod2man installed to generate man page
FATALERRORNeed pod2man installed to generate man page
FATALERRORNeed pod2man installed to generate man page
FATALERRORNeed pod2man installed to generate man page
FATALERRORNeed pod2man installed to generate man page
FATALERRORNeed pod2man installed to generate man page
FATALERRORNeed pod2man installed to generate man page
FATALERRORNeed pod2man installed to generate man page
FATALERRORNeed pod2man installed to generate man page
FATALERRORNeed pod2man installed to generate man page
FATALERRORNeed pod2man installed to generate man page
FATALERRORNeed pod2man installed to generate man page
Building unit tests: No (default)
-- Optional libraries found: zlib cURL LIBJWT GnuTLS PCRE GCrypt AVFormat AVCodec AVDevice AVUtil SWScale SWResample
-- Optional libraries not found: libVLC libVNC
-- Running ZoneMinder configuration generator
Generating '/var/tmp/pamac-build-corey/zoneminder/src/zoneminder-1.36.35/zm_config_defines.h'
Updating '/var/tmp/pamac-build-corey/zoneminder/src/zoneminder-1.36.35/db/zm_create.sql'
-- ZoneMinder configuration generator completed successfully
-- Configuring done (10.5s)
-- Generating done (0.1s)
-- Build files have been written to: /var/tmp/pamac-build-corey/zoneminder/src/zoneminder-1.36.35
[  1%] Building C object dep/libbcrypt/CMakeFiles/bcrypt.dir/src/bcrypt.c.o
[  2%] Generating zmaudit.pl.8
[  2%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/Acceptor.cpp.o
/bin/sh: line 1: POD2MAN-NOTFOUND: command not found
make[2]: *** [scripts/CMakeFiles/man-zmaudit.pl.dir/build.make:77: scripts/zmaudit.pl.8] Error 127
make[2]: *** Deleting file 'scripts/zmaudit.pl.8'
make[1]: *** [CMakeFiles/Makefile2:837: scripts/CMakeFiles/man-zmaudit.pl.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  3%] Generating zmc.8
/bin/sh: line 1: POD2MAN-NOTFOUND: command not found
[  4%] Generating zmu.8
make[2]: *** [src/CMakeFiles/man-zmc.dir/build.make:77: src/zmc.8] Error 127
make[2]: *** Deleting file 'src/zmc.8'
/bin/sh: line 1: POD2MAN-NOTFOUND: command not found
make[2]: *** [src/CMakeFiles/man-zmu.dir/build.make:77: src/zmu.8] Error 127
make[2]: *** Deleting file 'src/zmu.8'
make[1]: *** [CMakeFiles/Makefile2:739: src/CMakeFiles/man-zmc.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:771: src/CMakeFiles/man-zmu.dir/all] Error 2
[  5%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/BufferReader.cpp.o
[  5%] Building C object dep/libbcrypt/CMakeFiles/bcrypt.dir/src/crypt_gensalt.c.o
[  6%] Building C object dep/libbcrypt/CMakeFiles/bcrypt.dir/src/crypt_blowfish.c.o
[  7%] Building C object dep/libbcrypt/CMakeFiles/bcrypt.dir/src/wrapper.c.o
[  8%] Building ASM object dep/libbcrypt/CMakeFiles/bcrypt.dir/src/x86.S.o
[  9%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/BufferWriter.cpp.o
[  9%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/EpollTaskScheduler.cpp.o
[  9%] Linking C static library libbcrypt.a
[  9%] Built target bcrypt
[ 10%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/EventLoop.cpp.o
[ 11%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/Logger.cpp.o
[ 11%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/MemoryManager.cpp.o
[ 12%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/NetInterface.cpp.o
[ 13%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/Pipe.cpp.o
[ 13%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/SelectTaskScheduler.cpp.o
[ 14%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/SocketUtil.cpp.o
[ 15%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/TaskScheduler.cpp.o
[ 15%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/TcpConnection.cpp.o
[ 16%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/TcpServer.cpp.o
[ 17%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/TcpSocket.cpp.o
[ 17%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/Timer.cpp.o
[ 18%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/net/Timestamp.cpp.o
[ 19%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/AACSource.cpp.o
[ 19%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/DigestAuthenticator.cpp.o
[ 20%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/G711ASource.cpp.o
[ 21%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/H264Parser.cpp.o
[ 21%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/H264Source.cpp.o
[ 22%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/H265Source.cpp.o
[ 23%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/MediaSession.cpp.o
[ 23%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/RtpConnection.cpp.o
[ 24%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/RtspPusher.cpp.o
[ 24%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/RtspMessage.cpp.o
[ 25%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/RtspConnection.cpp.o
[ 26%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/RtspServer.cpp.o
[ 27%] Building CXX object dep/RtspServer/CMakeFiles/RtspServer.dir/src/xop/VP8Source.cpp.o
[ 27%] Linking CXX static library libRtspServer.a
[ 27%] Built target RtspServer
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

@connortechnology
Copy link
Member

Good news, your problem is that your system doesn't have the pod2man command. Normally this just comes with perl, Manjaro must package it separately. Install it and you should be good to go.

@coreybruce
Copy link
Author

Oh awesome thanks for letting me know, I will install that package from the AUR later on and report how it goes, I'll need to change the pkgbuild file before building it as it only has x86_64 and also ask them to add aarch64 to the package.

@coreybruce
Copy link
Author

Good news, your problem is that your system doesn't have the pod2man command. Normally this just comes with perl, Manjaro must package it separately. Install it and you should be good to go.

Yep that was exactly what I was missing, I just installed the AUR package and it successfully compiled

I enabled the systemd service but I got this issue

× zoneminder.service - ZoneMinder CCTV recording and security system
     Loaded: loaded (/usr/lib/systemd/system/zoneminder.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Wed 2025-01-29 11:53:16 AEST; 3min 49s ago
 Invocation: e5b852354e434a309f5b3976f48fdcf7
    Process: 41361 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=255/EXCEPTION)
        CPU: 87ms

Jan 29 11:53:16 corey-pi5 zmpkg[41361]: ERR [Error reconnecting to db: errstr:Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2) error val:]
Jan 29 11:53:16 corey-pi5 zmpkg.pl[41361]: Unable to connect to DB. ZM Cannot continue.
Jan 29 11:53:16 corey-pi5 zmpkg.pl[41361]: BEGIN failed--compilation aborted at /usr/share/perl5/vendor_perl/ZoneMinder/Config.pm line 150.
Jan 29 11:53:16 corey-pi5 zmpkg.pl[41361]: Compilation failed in require at /usr/share/perl5/vendor_perl/ZoneMinder.pm line 33.
Jan 29 11:53:16 corey-pi5 zmpkg.pl[41361]: BEGIN failed--compilation aborted at /usr/share/perl5/vendor_perl/ZoneMinder.pm line 33.
Jan 29 11:53:16 corey-pi5 zmpkg.pl[41361]: Compilation failed in require at /usr/bin/zmpkg.pl line 34.
Jan 29 11:53:16 corey-pi5 zmpkg.pl[41361]: BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 34.
Jan 29 11:53:16 corey-pi5 systemd[1]: zoneminder.service: Control process exited, code=exited, status=255/EXCEPTION
Jan 29 11:53:16 corey-pi5 systemd[1]: zoneminder.service: Failed with result 'exit-code'.
Jan 29 11:53:16 corey-pi5 systemd[1]: Failed to start ZoneMinder CCTV recording and security system.

I assume this is a totally different issue that has nothing to do with this issue tho haha 😆

@connortechnology
Copy link
Member

Looks like you havn't setup the mysql db.

@onlyjob
Copy link
Contributor

onlyjob commented Feb 21, 2025

For what it's worth, Zoneminder 1.36.35 builds successfully in Debian, on arm64 and other architectures: https://buildd.debian.org/status/package.php?p=zoneminder

@connortechnology
Copy link
Member

Yup, issue was a missing pod2man.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants