Menu

#416 conky fails to build with audacious

git
closed-fixed
nobody
Code (277)
5
2012-07-07
2012-07-02
No

When building conky with -DBUILD_AUDACIOUS=ON it fails with:

[ 84%] Building CXX object src/CMakeFiles/conky.dir/audacious.cc.o
cd /media/system/tmp/portage/app-admin/conky-9999/work/conky-9999_build/src && /usr/lib/ccache/bin/i686-pc-linux-gnu-g++ -D_GNU_SOURCE -std=c++0x -ggdb -Wall -W -Wextra -Wunused -pedantic -Werror -Wno-format -I/media/system/tmp/portage/app-admin/conky-9999/work/conky-9999_build -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -I/media/system/tmp/portage/app-admin/conky-9999/work/conky-9999_build/data -o CMakeFiles/conky.dir/audacious.cc.o -c /media/system/tmp/portage/app-admin/conky-9999/work/conky-9999/src/audacious.cc
In file included from /media/system/tmp/portage/app-admin/conky-9999/work/conky-9999/src/audacious.cc:38:0:
/usr/include/audacious/audctrl.h:24:28: fatal error: dbus/dbus-glib.h: No such file or directory
compilation terminated.

This is probably due to /usr/include/audacious/audctrl.h including dbus/dbus-glib.h which is located under /usr/include/dbus-1.0/dbus/dbus-glib.h. I don't know if this is the correct fix but adding /usr/include/dbus-1.0 to the audacious include paths in ConkyPlatformChecks.cmake fixes the issue for me.

Attached is the full build log and the patch.

Discussion

  • Daniel Pielmeier

    conky build log

     
  • Daniel Pielmeier

    patch fixing the issue

     
  • pavelo

    pavelo - 2012-07-05

    What exact cmake options are you using? I can't seem to reproduce this. -I /usr/include/dbus-1.0 appears in my include directories automatically.

    regards

     
  • Daniel Pielmeier

    The cmake options are included in the build log (line 32).

     
  • pavelo

    pavelo - 2012-07-07

    ahh... i guess submitting the build log has some use after all :D

    I have fixed this in git. I did not like the hard-wiring of the include path so I added an additional check for dbus in cmake.
    ps: I am not sure how pkg-config is supposed to work, but I was under the impression it should automagically add the necessary command line options for all the dependencies. Is that so? Because if it is, then this should be a bug in pkg-config/audacious.

     
  • pavelo

    pavelo - 2012-07-07
    • status: open --> closed-fixed
     
  • Daniel Pielmeier

    I also had the intention that this is a bug in audacious but I only took a look at the audctrl.h files history for changes. Now I think I found the relevant commit in audacious [1] which causes this issue. I don't know if this should be addressed in audacious or conky. conky 1.9.0 however builds fine because it checks for dbus-glib-1 in configure.ac.in. Maybe you should change "pkg_check_modules(DBUS REQUIRED dbus-1)" to "pkg_check_modules(DBUS REQUIRED dbus-glib-1)" in the master branch as well.

    [1] https://github.com/audacious-media-player/audacious/commit/b4d235858a2a5cea1a110a4e3a346ac0ebc30484

     
  • Daniel Pielmeier

    I don't know why I did not recognize this before but now conky fails with the following error:

    Linking CXX executable conky
    cd /media/system/tmp/portage/app-admin/conky-9999/work/conky-9999_build/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/conky.dir/link.txt --verbose=1
    /usr/lib/ccache/bin/i686-pc-linux-gnu-g++ -std=c++0x -ggdb -Wall -W -Wextra -Wunused -pedantic -Werror -Wno-format -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,--hash-style=gnu CMakeFiles/conky.dir/c++wrap.cc.o CMakeFiles/conky.dir/colours.cc.o CMakeFiles/conky.dir/combine.cc.o CMakeFiles/conky.dir/common.cc.o CMakeFiles/conky.dir/conky.cc.o CMakeFiles/conky.dir/core.cc.o CMakeFiles/conky.dir/diskio.cc.o CMakeFiles/conky.dir/entropy.cc.o CMakeFiles/conky.dir/exec.cc.o CMakeFiles/conky.dir/fs.cc.o CMakeFiles/conky.dir/mail.cc.o CMakeFiles/conky.dir/mixer.cc.o CMakeFiles/conky.dir/net_stat.cc.o CMakeFiles/conky.dir/template.cc.o CMakeFiles/conky.dir/mboxscan.cc.o CMakeFiles/conky.dir/read_tcpip.cc.o CMakeFiles/conky.dir/scroll.cc.o CMakeFiles/conky.dir/specials.cc.o CMakeFiles/conky.dir/tailhead.cc.o CMakeFiles/conky.dir/temphelper.cc.o CMakeFiles/conky.dir/text_object.cc.o CMakeFiles/conky.dir/timeinfo.cc.o CMakeFiles/conky.dir/top.cc.o CMakeFiles/conky.dir/algebra.cc.o CMakeFiles/conky.dir/prioqueue.cc.o CMakeFiles/conky.dir/proc.cc.o CMakeFiles/conky.dir/user.cc.o CMakeFiles/conky.dir/luamm.cc.o CMakeFiles/conky.dir/data-source.cc.o CMakeFiles/conky.dir/lua-config.cc.o CMakeFiles/conky.dir/setting.cc.o CMakeFiles/conky.dir/llua.cc.o CMakeFiles/conky.dir/update-cb.cc.o CMakeFiles/conky.dir/linux.cc.o CMakeFiles/conky.dir/users.cc.o CMakeFiles/conky.dir/sony.cc.o CMakeFiles/conky.dir/i8k.cc.o CMakeFiles/conky.dir/audacious.cc.o CMakeFiles/conky.dir/tcp-portmon.cc.o CMakeFiles/conky.dir/x11.cc.o CMakeFiles/conky.dir/fonts.cc.o CMakeFiles/conky.dir/ccurl_thread.cc.o CMakeFiles/conky.dir/rss.cc.o CMakeFiles/conky.dir/prss.cc.o CMakeFiles/conky.dir/imlib2.cc.o CMakeFiles/conky.dir/iconv_tools.cc.o CMakeFiles/conky.dir/nc.cc.o -o conky -rdynamic -lpthread -lrt -lm -lncurses -lSM -lICE -lX11 -lXext -lXdamage -lXfixes -lXft -lXext -llua -lm -laudclient -lImlib2 -lglib-2.0 -lcurl -lxml2 -ltolua++ libtcp-portmon.a -lXdamage -lXfixes -lXft -llua -lm -laudclient -lImlib2 -lglib-2.0 -lcurl -lxml2 -ltolua++
    /usr/lib/gcc/i686-pc-linux-gnu/4.5.3/../../../../i686-pc-linux-gnu/bin/ld: CMakeFiles/conky.dir/audacious.cc.o: undefined reference to symbol 'dbus_g_bus_get'
    /usr/lib/gcc/i686-pc-linux-gnu/4.5.3/../../../../i686-pc-linux-gnu/bin/ld: note: 'dbus_g_bus_get' is defined in DSO /usr/lib/libdbus-glib-1.so.2 so try adding it to the linker command line
    /usr/lib/libdbus-glib-1.so.2: could not read symbols: Invalid operation
    collect2: ld returned 1 exit status
    make[2]: *** [src/conky] Error 1
    make[2]: Leaving directory `/media/system/tmp/portage/app-admin/conky-9999/work/conky-9999_build'
    make[1]: *** [src/CMakeFiles/conky.dir/all] Error 2
    make[1]: Leaving directory `/media/system/tmp/portage/app-admin/conky-9999/work/conky-9999_build'
    make: *** [all] Error 2

     
  • Daniel Pielmeier

    As the original message is about dbus-glib and not dbus the patch should probably look different. Looks like I can not add files anymore if the bug is closed so I put it here inline:

    --- ConkyPlatformChecks.cmake.orig 2012-08-25 09:23:23.184754257 +0200
    +++ ConkyPlatformChecks.cmake 2012-08-25 09:22:11.913346956 +0200
    @@ -258,12 +258,12 @@
    pkg_check_modules(NEW_AUDACIOUS audacious>=1.4.0)
    if(NEW_AUDACIOUS_FOUND)
    pkg_check_modules(AUDACIOUS REQUIRED audclient>=1.4.0)
    - pkg_check_modules(DBUS REQUIRED dbus-1)
    + pkg_check_modules(DBUS_GLIB REQUIRED dbus-glib-1)
    else(NEW_AUDACIOUS_FOUND)
    pkg_check_modules(AUDACIOUS REQUIRED audacious<1.4.0)
    endif(NEW_AUDACIOUS_FOUND)
    - set(conky_libs ${conky_libs} ${AUDACIOUS_LIBRARIES})
    - set(conky_includes ${conky_includes} ${AUDACIOUS_INCLUDE_DIRS} ${DBUS_INCLUDE_DIRS})
    + set(conky_libs ${conky_libs} ${AUDACIOUS_LIBRARIES} ${DBUS_GLIB_LIBRARIES})
    + set(conky_includes ${conky_includes} ${AUDACIOUS_INCLUDE_DIRS} ${DBUS_GLIB_INCLUDE_DIRS})
    endif(BUILD_AUDACIOUS)

    if(BUILD_BMPX)

     
  • pavelo

    pavelo - 2012-08-25

    hm... since the problem was about a missing include dir, I just added dbus-1, since that was the first one that I found and it provided the correct include. I'm not sure why it worked when I tested it, but anyway, I have included your patch. Could you confirm that it now builds correctly (I haven't tested it as I don't have audacious installed atm)?

    thanks

     
  • Daniel Pielmeier

    Well if I remember correctly it worked for me as well with the first patch. Now it builds fine. Thanks a lot.

     

Log in to post a comment.

MongoDB Logo MongoDB