trouble building via packpack on ubuntu 20.04

Forum for questions and support relating to 1.35.x development only.
Post Reply
fathom
Posts: 18
Joined: Sun Jul 12, 2020 11:31 pm

trouble building via packpack on ubuntu 20.04

Post by fathom » Tue Aug 04, 2020 7:47 am

trying to build a 1.35 or even 1.34 using the packpack docker image as described in the docs.

doesn't get very far.

mk-build-deps: Unable to install zoneminder-build-deps at /usr/bin/mk-build-deps line 457.
mk-build-deps: Unable to install all build-dep packages
make: *** [/pack//deb.mk:121: /build/zoneminder_1.34.17~20200804.3-focal_amd64.changes] Error 1


i've seen same error described for an older distro and the solution was apparently to use a different docker repo, but that's the repo that's being used i believe. so maybe ubuntu 20.04 is just too new to build on?

User avatar
knight-of-ni
Posts: 2306
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: trouble building via packpack on ubuntu 20.04

Post by knight-of-ni » Wed Aug 05, 2020 6:27 pm

That error is coming from the Debian packaging scripts. It means you are missing one or more packages required to build a zoneminder package on Debian.

In order to go further, you need to tell us exactly which docker image you are trying to build from.
If it isn't one that I or iconnor made, then it is probably missing a package or two that no longer ships with debian. e.g. mp4v2
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

fathom
Posts: 18
Joined: Sun Jul 12, 2020 11:31 pm

Re: trouble building via packpack on ubuntu 20.04

Post by fathom » Wed Aug 05, 2020 9:01 pm

i'll admit to be being a bit vague about how this all gets put together...

it says it's pulling packpack/packpack:ubuntu-focal

that is the docker image, yeah?

the .travis.yml file has the line:

- SMPFLAGS=-j4 OS=ubuntu DIST=focal DOCKER_REPO=iconzm/packpack

when searching for my error, it seemed the solution under a different ubuntu release was to add that DOCKER_REPO override but it appears to already be the default now.

if neither of those answers the question, lemme know how i can find the answer you're looking for. i appreciate the assistance.

User avatar
iconnor
Posts: 1325
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: trouble building via packpack on ubuntu 20.04

Post by iconnor » Thu Aug 06, 2020 10:36 pm

our focal dockerfile is no good atm. I made some improvements today it's still broken. they changed too many package names since eoan.

I'll try to get it fixed tomorrow.

fathom
Posts: 18
Joined: Sun Jul 12, 2020 11:31 pm

Re: trouble building via packpack on ubuntu 20.04

Post by fathom » Fri Aug 07, 2020 2:44 am

thanks. i figured it might be the case that focal was not ready yet (at least using this system).

User avatar
knight-of-ni
Posts: 2306
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: trouble building via packpack on ubuntu 20.04

Post by knight-of-ni » Fri Aug 07, 2020 12:39 pm

The following worked for me:

Code: Select all

SMPFLAGS=-j8 OS=ubuntu DIST=focal DOCKER_REPO=knnniggett/packpack ./utils/packpack/startpackpack.sh
Execute this from the root of the zoneminder git folder on your local machine. Adjust the number of worker threads (-j8) to the number of real cpu cores you have for best performance.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

User avatar
iconnor
Posts: 1325
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: trouble building via packpack on ubuntu 20.04

Post by iconnor » Fri Aug 07, 2020 1:55 pm

My focal docker builds now or you may prefer stick with knight-of-ni's.

fathom
Posts: 18
Joined: Sun Jul 12, 2020 11:31 pm

Re: trouble building via packpack on ubuntu 20.04

Post by fathom » Fri Aug 07, 2020 6:46 pm

awesome. it seems to have completed and now i've got a .deb file i can install.

right now i'm running zm from inside of dlandon's docker image. i'm fine with installing directly to my system, but before i do that, is it preferred to run zm from a docker or directly installed? i am not very docker savvy so i don't know the pros/cons. and maybe not being docker savvy means i shouldn't go down that route?

User avatar
knight-of-ni
Posts: 2306
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: trouble building via packpack on ubuntu 20.04

Post by knight-of-ni » Fri Aug 07, 2020 7:11 pm

Do whatever you are most comfortable with.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

fathom
Posts: 18
Joined: Sun Jul 12, 2020 11:31 pm

Re: trouble building via packpack on ubuntu 20.04

Post by fathom » Fri Aug 07, 2020 8:14 pm

will do.

part of the reason to build from source it to explore some changes to the code. when building dev packages should i do anything particular with the version file (i'm assuming that's where it's getting the version info)? or just let it use build numbers to differentiate itself? or is it all personal preference?

thanks for your help.

fathom
Posts: 18
Joined: Sun Jul 12, 2020 11:31 pm

Re: trouble building via packpack on ubuntu 20.04

Post by fathom » Sat Aug 08, 2020 10:47 pm

so i think things are mostly working. i'm building the entire package to just work on a single piece -- zma. but i can live with that for now.

but i'm really confused by how it's doing the build. it's copying the source directory to the build dir while it's processing. and when i compare the src files, they're a few iterations back. i have a git repo, but i haven't been committing anything -- there's really not much going on yet. so i don't really understand where it's getting the src files.

for example, i've modified the zm_image.cpp file to try a different algorithm for blending. that causes a panic because it's a different result. okay, so i change the panic to a debug statement. but the compiled code is still doing the panic. so i change the message to be slightly different text so i can easily spot the change in the exe. no change. i remove build/ and try again and and again. no luck. while building i look at the build/src and it's the debug() statement and not the panic statement, but it's also not the changed text message. so where did it come from? is there someplace else i should clean up?

i'm hoping this latest build will work for me since it's the debug statement and not the panic... but maybe i'm just way out of my depth here.

User avatar
knight-of-ni
Posts: 2306
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: trouble building via packpack on ubuntu 20.04

Post by knight-of-ni » Sun Aug 09, 2020 12:44 pm

If you are working in the C source, then you will need to get used to building zoneminder over and over again. You hadn't told us your purpose in building zoneminder until after you got the build working. You can certainly continue to use our build system to crank out packages through a docker container, but that's not the way I'd do it in your case. There are too many layers to dig into if there is a build failure.

See this instead:
https://zoneminder.readthedocs.io/en/la ... rom-source

I don't always build on Ubuntu, but if I recall you will want to do something like this:

Code: Select all

do_debian_package.sh --snapshot=NOW --branch={your working branch} --fork={your github name} --type=local
Couple of things:
- call the script outside the zoneminder git repo on your local machine
- this requires you to commit your changes first then push them to your github zonemidner fork
- this will build a deb package on the local machine, so it will install package building tools and all of zoneminders deps right onto the local machine
- you will probably need to install iconner's ppa due to missing packages in focal: https://launchpad.net/~iconnor/+archive ... der-master

If you run into issues, tell us exactly what commands you entered and what the error message was. If the built application does not run the way you expect, then show us what changes you made and describe expected results.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

fathom
Posts: 18
Joined: Sun Jul 12, 2020 11:31 pm

Re: trouble building via packpack on ubuntu 20.04

Post by fathom » Sun Aug 16, 2020 6:42 am

so i've been committing changes now every time i want to build. i think that's been reliable. the build process is a bit slow, but not a big issue.

i have a pretty stable setup using dlandon's docker image and tried to migrate that out of the docker, but ran into some issues. maybe i just need to start from scratch instead of migrating. that is, if i decide my changes are worth it. i did some tests and i'm not sure it's really a big difference. or perhaps, it's better said it doesn't solve my biggest problem.

User avatar
bkjaya1952
Posts: 97
Joined: Sat Aug 25, 2018 3:24 pm
Location: Sri Lanka
Contact:

Re: trouble building via packpack on ubuntu 20.04

Post by bkjaya1952 » Sun Aug 16, 2020 8:13 am

fathom wrote:
Sun Aug 16, 2020 6:42 am
so i've been committing changes now every time i want to build. i think that's been reliable. the build process is a bit slow, but not a big issue.

i have a pretty stable setup using dlandon's docker image and tried to migrate that out of the docker, but ran into some issues. maybe i just need to start from scratch instead of migrating. that is, if i decide my changes are worth it. i did some tests and i'm not sure it's really a big difference. or perhaps, it's better said it doesn't solve my biggest problem.
Please try bkjaya1952/zoneminder-master-docker-latest (Updated with Zoneminder 1.35.5~20200815203623-focal )

https://hub.docker.com/r/bkjaya1952/zon ... ker-latest

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests