I am trying to build Debian package evince, on Debian Buster, using the Debian build process:
apt-get source evince
and then
cd evince-3.30.2/
dpkg-buildpackage --build=binary --no-sign
The build process is successful when I build the package with dbus (default setting).
When I change the configuration and add --disable-dbus, the build process fails with following error:
ev-application.c: In function ‘ev_application_new’:
ev-application.c:106:42: error: ‘APPLICATION_NAME’ undeclared (first use in this function); did you mean ‘G_APPLICATION_CLASS’?
"application-id", APPLICATION_NAME,
^~~~~~~~~~~~~~~~
G_APPLICATION_CLASS
ev-application.c:106:42: note: each undeclared identifier is reported only once for each function it appears in
ev-application.c:109:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
Bellow is snippet from the debian/rules file that works:
override_dh_auto_configure:
dh_auto_configure -- \
--libexecdir=/usr/lib/evince \
--enable-djvu \
--enable-dvi \
--enable-ps \
--enable-introspection \
--enable-gtk-doc \
--disable-libgnome-desktop \
--disable-multimedia \
--disable-nautilus \
--disable-browser-plugin \
--without-keyring
and here is the the one that does not (the only change is added --disable-dbus):
override_dh_auto_configure:
dh_auto_configure -- \
--libexecdir=/usr/lib/evince \
--enable-djvu \
--enable-dvi \
--enable-ps \
--enable-introspection \
--enable-gtk-doc \
--disable-dbus \
--disable-libgnome-desktop \
--disable-multimedia \
--disable-nautilus \
--disable-browser-plugin \
--without-keyring
What does the error mean, and how can I fix it ?
UPDATE 2021-09-01
I have fixed the APPLICATION_NAME as suggested by @cody.
I have also removed one-line reference to dbus in debian/evince.install
But building with --disable-dbus now ends with another error:
/usr/bin/ld: .libs/evince-scan.o: in function `get_object_types':
./help/reference/shell/evince-scan.c:43: undefined reference to `ev_media_player_keys_get_type'
collect2: error: ld returned 1 exit status
make[5]: *** [Makefile:867: scan-build.stamp] Error 1
make[4]: *** [Makefile:506: all-recursive] Error 1
make[3]: *** [Makefile:591: all-recursive] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:730: all-recursive] Error 1
make[1]: *** [Makefile:595: all] Error 2
dh_auto_build: make -j4 returned exit code 2
make: *** [debian/rules:11: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2