Unable to explicitly choose optional dependencies

Bug #1517184 reported by Pacho Ramos
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Simple Scan
Fix Released
Low
Unassigned
3.18
Fix Released
Low
Unassigned

Bug Description

There are two problems:
- detection of packagekit is automagic instead of configurable via a configure flag:
https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Automagic_dependencies

- Even if packagekit is not present and its support is disabled at configure run phase, it fails to build with:
x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"simple-scan\" -DPACKAGE_TARNAME=\"simple-scan\" -DPACKAGE_VERSION=\"3.18.1\" -DPACKAGE_STRING=\"simple-scan\ 3.18.1\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"simple-scan\" -DVERSION=\"3.18.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SANE_SANE_H=1 -DHAVE_SANE_SANEOPTS_H=1 -I. -w -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/gusb-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libusb-1.0 -pthread -I/usr/include/colord-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DVERSION=\"3.18.1\" -DGETTEXT_PACKAGE=\"simple-scan\" -DLOCALE_DIR=\"/usr/share/locale\" -DUI_DIR=\"/usr/share/simple-scan/\" -DICON_DIR=\"/usr/share/simple-scan/icons\" -DGCONF_DIR=\"/apps/simple-scan\" -DSIMPLE_SCAN_BINARY=\"simple-scan\" -DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE -O2 -pipe -march=native -fno-stack-protector -c -o simple_scan-autosave-manager.o `test -f 'autosave-manager.c' || echo './'`autosave-manager.c
x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"simple-scan\" -DPACKAGE_TARNAME=\"simple-scan\" -DPACKAGE_VERSION=\"3.18.1\" -DPACKAGE_STRING=\"simple-scan\ 3.18.1\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"simple-scan\" -DVERSION=\"3.18.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SANE_SANE_H=1 -DHAVE_SANE_SANEOPTS_H=1 -I. -w -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/gusb-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libusb-1.0 -pthread -I/usr/include/colord-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DVERSION=\"3.18.1\" -DGETTEXT_PACKAGE=\"simple-scan\" -DLOCALE_DIR=\"/usr/share/locale\" -DUI_DIR=\"/usr/share/simple-scan/\" -DICON_DIR=\"/usr/share/simple-scan/icons\" -DGCONF_DIR=\"/apps/simple-scan\" -DSIMPLE_SCAN_BINARY=\"simple-scan\" -DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE -O2 -pipe -march=native -fno-stack-protector -c -o simple_scan-resources.o `test -f 'resources.c' || echo './'`resources.c
ui.c:28:41: fatal error: packagekit-glib2/packagekit.h: No such file or directory
 #include "packagekit-glib2/packagekit.h"
                                         ^
compilation terminated.
Makefile:558: recipe for target 'simple_scan-ui.o' failed
make[1]: *** [simple_scan-ui.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/media-gfx/simple-scan-3.18.1/work/simple-scan-3.18.1/src'
Makefile:379: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Thanks

Revision history for this message
Robert Ancell (robert-ancell) wrote :

I've made these now optional. The issue with the building is due to autotools being stupid - see bug 1462769 for workarounds.

Changed in simple-scan:
status: New → Fix Committed
milestone: none → 3.19.2
importance: Undecided → Low
summary: - simple-scan-3.18.1 fails to build without packagekit
+ Unable to explicitly choose optional dependencies
Revision history for this message
Pacho Ramos (pacho) wrote :

I will try the patch as soon as possible. Thanks a lot!

Revision history for this message
Pacho Ramos (pacho) wrote :
Download full text (3.7 KiB)

Even after applying the patch it fails with:
86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"simple-scan\" -DPACKAGE_TARNAME=\"simple-scan\" -DPACKAGE_VERSION=\"3.18.1\" -DPACKAGE_STRING=\"simple-scan\ 3.18.1\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"simple-scan\" -DVERSION=\"3.18.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SANE_SANE_H=1 -DHAVE_SANE_SANEOPTS_H=1 -I. -w -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/gusb-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libusb-1.0 -pthread -I/usr/include/colord-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DVERSION=\"3.18.1\" -DGETTEXT_PACKAGE=\"simple-scan\" -DLOCALE_DIR=\"/usr/share/locale\" -DUI_DIR=\"/usr/share/simple-scan/\" -DICON_DIR=\"/usr/share/simple-scan/icons\" -DGCONF_DIR=\"/apps/simple-scan\" -DSIMPLE_SCAN_BINARY=\"simple-scan\" -DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE -O2 -pipe -march=native -fno-stack-protector -c -o simple_scan-autosave-manager.o `test -f 'autosave-manager.c' || echo './'`autosave-manager.c
x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"simple-scan\" -DPACKAGE_TARNAME=\"simple-scan\" -DPACKAGE_VERSION=\"3.18.1\" -DPACKAGE_STRING=\"simple-scan\ 3.18.1\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"simple-scan\" -DVERSION=\"3.18.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SANE_SANE_H=1 -DHAVE_SANE_SANEOPTS_H=1 -I. -w -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/gusb-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libusb-1.0 -pthread -I/usr/include/colord-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DVERSION=\"3.18.1\" -DGETTEXT_PACKAGE=\"simple-scan\" -DLOCALE_DIR=\"/usr/share/locale\" -DUI_DIR=\"/usr/share/simple-scan/\" -DICON_DIR=\"/usr/share/simple-scan/icons\" -DGCONF_DIR=\"/apps/simple-scan\" -DSIMPLE_SCAN_BINARY=\"simple-scan\" -DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE -O2 -pipe -march=native -fno-stack-protector -c -o simple_scan-resources.o `test -f 'resources.c' || echo './'`resources.c
ui.c:28:4...

Read more...

Changed in simple-scan:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.