Building 2.6.11 from source - dependency failure Debian Bullseye

703 views
Skip to first unread message

Richard Hornby

unread,
Mar 4, 2022, 10:00:07 AM3/4/22
to Open PHD Guiding
Hi

I'm following the PHD_2 build instructions on GitHub for my Rasberry OS (Debian) Bullseye 64 and got so far, then hit an error in building the .tar :

pi@Richard-RPi:~ $ cd phd2_2.6.11
pi@Richard-RPi:~/phd2_2.6.11 $ debuild -S -sa
 dpkg-buildpackage -us -uc -ui -S -sa
dpkg-buildpackage: info: source package phd2
dpkg-buildpackage: info: source version 2.6.11
dpkg-buildpackage: info: source distribution stable
dpkg-buildpackage: info: source changed by <NAME OF DEVELOPER>
 dpkg-source --before-build .
dpkg-checkbuilddeps: error: Unmet build dependencies: libwxgtk3.0-dev libgtk2.0-dev libopencv-dev libudev-dev libv4l-dev
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui -S -sa failed

So I tried installing the missing deps:

pi@Richard-RPi:~/phd2_2.6.11 $ sudo apt install libwxgtk3.0-dev libgtk2.0-dev libopencv-dev libudev-dev libv4l-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package libwxgtk3.0-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libwxgtk3.0-dev' has no installation candidate
pi@Richard-RPi:~/phd2_2.6.11 $

The solution is here :  https://github.com/roboception/rcdiscover/issues/11

with this result:

pi@Richard-RPi:~/phd2_2.6.11 $ sudo apt install libwxgtk3.0-gtk3-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libwxgtk3.0-gtk3-dev is already the newest version (3.0.5.1+dfsg-2).

So now the build instructions need to be amended.  At this point I'm in new territory completely.

Has anyone got a solution?

Tks

Patrick Chevalley

unread,
Mar 4, 2022, 11:13:31 AM3/4/22
to Open PHD Guiding
The default file debian/control is still for Gtk2 to support build on Buster and Ubuntu 16.04, 18.04.

What I do when building on Bulleye or 20.04 or later is to run this command to update the file for Gtk3:
cd phd2
sed -i "s/libwxgtk3.0-dev, libgtk2.0-dev,/libwxgtk3.0-gtk3-dev, libgtk-3-dev,/" debian/control

After that debuild must work.

Patrick

Richard Hornby

unread,
Mar 5, 2022, 2:33:16 AM3/5/22
to Open PHD Guiding
Patrick

As ever thanks for your swift and focused response.   I'm not there yet ..

Ran the sed command then debuild again:

pi@Richard-RPi:~/phd2_2.6.11 $ debuild -us -uc                        dpkg-buildpackage -us -uc -ui

dpkg-buildpackage: info: source package phd2
dpkg-buildpackage: info: source version 2.6.11
dpkg-buildpackage: info: source distribution stable
dpkg-buildpackage: info: source changed by <NAME_OF_DEV>
 dpkg-source --before-build .
dpkg-buildpackage: info: host architecture arm64
 fakeroot debian/rules clean
dh clean
dh: warning: Compatibility levels before 10 are deprecated (level 9 in use)
   dh_clean
dh_clean: warning: Compatibility levels before 10 are deprecated (level 9 in use)
 dpkg-source -b .
dpkg-source: error: can't build with source format '3.0 (quilt)': non-native package version does not contain a revision
dpkg-buildpackage: error: dpkg-source -b . subprocess returned exit status 25

debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui failed

So then I googled "dpkg-source: error: can't build with source format '3.0 (quilt)': non-native package version does not contain a revision"

and learned that I have to amend the local version I am trying to build (I think that’s what it means).  

So then I tried amending the first line of ./changelog to read

"bump rev to 2.6.11-1"

by adding the '-1'

pi@Richard-RPi:~/phd2_2.6.11/debian $ debuild -us -uc
debuild: found debian/changelog for package phd2 in the directory
  /home/pi/phd2_2.6.11
but this directory name does not match the package name according to the
regex  PACKAGE(-.+)?.

To run debuild on this package, see the --check-dirname-level and
--check-dirname-regex options; run debuild --help for more info.

I guess (and this really is a guess) this means that the package I am trying to build has the wrong name.  An empty package called "phd2_2.6.11.orig.tar.gz" exists at /home/pi/phd2_2.6.11/ and I tried simply changing its name in file manager, but that didn't help, I guess (again) because the regex PACKAGE(-.+)? has not been changed.

pi@Richard-RPi:~/phd2_2.6.11/debian $ debuild --check-dirname-regex
debuild: fatal error at line 537:
--check-dirname-regex requires an argument,
run debuild --help for usage information

pi@Richard-RPi:~/phd2_2.6.11/debian $ debuild --help

gave me

--check-dirname-regex REGEX
                What constitutes a matching directory name; REGEX is
                a Perl regular expression; the string `PACKAGE' will
                be replaced by the package name; see manpage for details
                (default: 'PACKAGE(-.+)?')

So I guess there is something required at line 537 of some file.  And from the first debuild result above, something at line 1182 of some other file.

What next?

(a month ago I wouldn't have got this far, your patient guidance in this and CCDC is much appreciated)

BTW I'm getting a couple of messages re deprecated shell commands re locales and so forth, ignoring those for the time being.  Should I pay more attention?

Tks

R

Patrick Chevalley

unread,
Mar 5, 2022, 3:31:15 AM3/5/22
to Open PHD Guiding
There is no line break in the sed command, probably your email reader add that.

I have updated the instruction in the wiki  so this is more easy to read: https://github.com/OpenPHDGuiding/phd2/wiki/BuildingPHD2OnLinux
Before to retry please delete all the files and directory and restart with the "svn export ..."  command.

I am curious why you want to build a deb file instead of just compile and install on your computer?

Patrick

Richard Hornby

unread,
Mar 5, 2022, 4:40:50 AM3/5/22
to Open PHD Guiding
I don't have a need for a .deb - I was following the instructions at the github repo which seemed to be saying I needed to do that.

Now you have changed the instructions, it seems entirely clear and I don't know why I jumped down to the Build Debian Packages section.  I see you have updated the dependencies.

I will just follow the first part of the instructions down to sudo make install.

Before doing that, I think it best to remove everything made so far, as I have covered the file system in part-built stuff.  The current root of the build is at /home/pi/phd2_2.6.11.  If I sudo rm -r that directory, will that do it or could there be stuff in other places?

Tks

R

Richard Hornby

unread,
Mar 5, 2022, 6:51:44 AM3/5/22
to Open PHD Guiding
Apologies Patrick, it seems to be the case that when I ask a question, an answer comes to me shortly afterwards.  I removed the directory and used locate to find some other stuff, deleted that and started at the beginning. 

All is now building nicely.

BTW I see you have released another update for CCDC - I wonder where you get the time.  But am looking forward to using it.  The ARM64 version you made works like a dream on Raspberry OS on my Pi 4B 8Gb under KDE.

Best R

Patrick Chevalley

unread,
Mar 5, 2022, 1:11:39 PM3/5/22
to Open PHD Guiding
Good it work now!

I add a note to the wiki that building a .deb is only useful when one want to install PHD2 on many similar computer.
This part of the wiki is also to document a bit the steps I do to update the Ubuntu PPA with new version.

Patrick


Reply all
Reply to author
Forward
0 new messages