lince-1.2 fails build without dbus/libnotify present

Bug #604318 reported by Stanislav Ochotnicky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Lince
Fix Released
Low
Fernando Tarín Morales

Bug Description

Configure suggests that lince can be built without dbus support. Website states that libnotify and dbus support are optional. Even source code seems to have lot of #ifdef DBUS parts. But when dbus is not present, lince fails to build (after successful configure)

lince-1.2 # ./configure --help | grep dbus
  --with-dbus dbus support [default=check]

When libnotify/dbus is present on the system and --with-dbus=0 is passed to configure the build fails because of misplaced ifdef/ifndef. I could file another bugreport but first question is: Does lince still support functioning without dbus/libnotify or is the configure option deprecated and website outdated? Libnotify seems to have moved to non-optional requirements (because without libnotify even configure fails). And since libnotify has dbus as a dependency...

Last lines from build when dbus is not present on the system:

/bin/sh ../libtool --tag=CXX --mode=link g++ -g -O2 -o lince BaseTab.o ClientsInfoNoteBookTab.o FilesInfoNoteBookTab.o GeneralInfoNoteBookTab.o GuiSetupManager.o InfoNoteBook.o LoadTorrentDialog.o LogTab.o main.o MainWindow.o MakeTorrent.o MenuBar.o NoteBookManager.o Notifications.o OptionsInfoNoteBookTab.o OptionsTab.o OptionsWindows.o PiecesInfoNoteBookTab.o StatisticsTab.o StatusBar.o TorrentInfoTab.o TorrentsTab.o TorrentsWindow.o Utils.o XMLReader.o XMLWriter.o GraphStatsTab.o DataStatsTab.o SystemTray.o EditTrackersDialog.o SearchTab.o LoadOneTorrentDialog.o SearchTabResults.o -pthread -lgtkmm-2.4 -latkmm-1.6 -lgdkmm-2.4 -lgiomm-2.4 -lpangomm-1.4 -lgtk-x11-2.0 -lglibmm-2.4 -lcairomm-1.0 -lsigc-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lxml2 -lcairomm-1.0 -lcairo -lsigc-2.0 -lgthread-2.0 -L../lib -llince-1
libtool: link: g++ -g -O2 -o .libs/lince BaseTab.o ClientsInfoNoteBookTab.o FilesInfoNoteBookTab.o GeneralInfoNoteBookTab.o GuiSetupManager.o InfoNoteBook.o LoadTorrentDialog.o LogTab.o main.o MainWindow.o MakeTorrent.o MenuBar.o NoteBookManager.o Notifications.o OptionsInfoNoteBookTab.o OptionsTab.o OptionsWindows.o PiecesInfoNoteBookTab.o StatisticsTab.o StatusBar.o TorrentInfoTab.o TorrentsTab.o TorrentsWindow.o Utils.o XMLReader.o XMLWriter.o GraphStatsTab.o DataStatsTab.o SystemTray.o EditTrackersDialog.o SearchTab.o LoadOneTorrentDialog.o SearchTabResults.o -pthread /usr/lib64/libgtkmm-2.4.so /usr/lib64/libatkmm-1.6.so /usr/lib64/libgdkmm-2.4.so /usr/lib64/libgiomm-2.4.so /usr/lib64/libpangomm-1.4.so /usr/lib64/libgtk-x11-2.0.so /usr/lib64/libglibmm-2.4.so /usr/lib64/libgdk-x11-2.0.so /usr/lib64/libatk-1.0.so /usr/lib64/libgio-2.0.so /usr/lib64/libpangoft2-1.0.so /usr/lib64/libgdk_pixbuf-2.0.so /usr/lib64/libpangocairo-1.0.so /usr/lib64/libpango-1.0.so /usr/lib64/libfreetype.so /usr/lib64/libfontconfig.so /usr/lib64/libgobject-2.0.so /usr/lib64/libgmodule-2.0.so -lrt /usr/lib64/libglib-2.0.so /usr/lib64/libxml2.so /usr/lib64/libcairomm-1.0.so /usr/lib64/libcairo.so /usr/lib64/libsigc-2.0.so /usr/lib64/libgthread-2.0.so -L/tmp/lince-1.2/lib /tmp/lince-1.2/lib/.libs/liblince-1.so -pthread
Notifications.o: In function `Notifications::notifyMessage(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
/tmp/lince-1.2/src/Notifications.cc:92: undefined reference to `notify_notification_new_with_status_icon'
/tmp/lince-1.2/src/Notifications.cc:100: undefined reference to `notify_notification_set_timeout'
/tmp/lince-1.2/src/Notifications.cc:102: undefined reference to `notify_notification_show'
/tmp/lince-1.2/src/Notifications.cc:96: undefined reference to `notify_notification_new'
/tmp/lince-1.2/src/Notifications.cc:97: undefined reference to `notify_notification_set_icon_from_pixbuf'
Notifications.o: In function `Notifications':
/tmp/lince-1.2/src/Notifications.cc:48: undefined reference to `notify_init'
/tmp/lince-1.2/src/Notifications.cc:48: undefined reference to `notify_init'
collect2: ld returned 1 exit status
make[2]: *** [lince] Error 1
make[2]: Leaving directory `/tmp/lince-1.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/lince-1.2'
make: *** [all] Error 2

Revision history for this message
Fernando Tarín Morales (icemanf) wrote :

Libnotify is required and has always been that way but nobody noticed about the dependencies. That should be changed. The main problem is that I am the only developer and right now I don't have a lot of free time.

Changed in lince:
importance: Undecided → Low
assignee: nobody → Fernando Tarín Morales (icemanf)
Revision history for this message
Fernando Tarín Morales (icemanf) wrote :

Ok I have created a patch to allow lince to build without libnotify and therfore without dbus, but before uploading it to the trunk, I have been reviewing the features that will be lost and the extra code I have to maintain to keep dbus and libnotify optional. Why is important to keep them optional?

Revision history for this message
Stanislav Ochotnicky (sochotnicky+lp) wrote :

Oh, sorry I should have been more clear about reasons. I am one of maintainers of lince for Gentoo Linux. Previous versions had "dbus" USE flag that made it possible for users to disable this feature if they didn't like dbus for some reason :-) With version 1.1_beta it was possible to compile lince without it linking to dbus/libnotify.

I greatly appreciate that you took time to actually create this patch, but don't feel obligated to put more maintenance pressure on you than is necessary. If you think you can easily keep dbus and libnotify optional: great. If not...the world is not gonna end.

As a side note: From quick scanning of code it seemed that dbus is used for other things, not just as a libnotify dependency. But maybe I was completely wrong...

For reference this is our original bugreport: https://bugs.gentoo.org/show_bug.cgi?id=320809

Revision history for this message
Fernando Tarín Morales (icemanf) wrote :

Yes dbus is used to manage several things, mainly to interact with other apps, e.g load torrents from firefox. It also checks other things. In linux dbus should be mandatory its just optional because lince was intended to run also in windows. I think i'm going to to upload the pach for now, if it bothers it can always be removed.
Please test it and send me some feedback

Changed in lince:
status: New → Fix Released
tags: added: dbus libnotify
tags: added: lince-1.2
Changed in lince:
status: Fix Released → In Progress
Revision history for this message
Fernando Tarín Morales (icemanf) wrote :

Patch commited

Changed in lince:
status: In Progress → 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.