Results 1 to 5 of 5

Thread: dbus.cpp:(.text+0x8):undefined reference to 'dbus_shutdown'

  1. #1
    Join Date
    Apr 2008
    Posts
    44
    Thanks
    21
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default dbus.cpp:(.text+0x8):undefined reference to 'dbus_shutdown'

    hi, everyone.
    i want to cross compiled Qt/Embedded with dbus support, but i get the error as the title.
    now i describe the situation:
    1. if I cross compiled Qt/Embedded without dbus, i can succeed.
    2. Then i cross compiled the dbus-1.2.4.6 and add "-dbus -I/usr/local/dbus/include/dbus-1.0 -I/usr/local/dbus/lib/dbus-1.0/include -L/usr/local/dbus/lib" in the ./configure. "usr/local/dbus" is the path where i install the dbus.
    But the ./configure cannot succeed.

    thanks very much for any suggestion!!!

  2. #2
    Join Date
    Apr 2008
    Posts
    44
    Thanks
    21
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: dbus.cpp:(.text+0x8):undefined reference to 'dbus_shutdown'

    later, i try the following methods:
    1. add "-ldbus-1" follow with "L/usr/local/dbus/lib", i get error "cannot find -ldbus-1".

    2. configure with " -force-pkg-config " and "export PKG_CONFIG_PATH=/usr/local/dbus/lib/pkgconfig"

    "/usr/local/dbus " is the dir where dbus lib installed . i still get error "cannot find -ldbus-1".

    then i find "-ldbus-1" in my ubuntu and google, i cann't find any information about it.

    could you help me? thanks very much!!

  3. #3
    Join Date
    Apr 2008
    Posts
    44
    Thanks
    21
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Smile Re: dbus.cpp:(.text+0x8):undefined reference to 'dbus_shutdown'

    i have solved the problem. the cross-compile dbus has some problem result in the error.

    1.download dbus-1.2.4.6.tar.gz and expat-2.0.1.tar.gz

    2. cross-compile expat

    Qt Code:
    1. tar zxvf expat-2.0.1.tar.gz
    2. cd expat-2.0.1/
    3. ./configure --host=arm-linux --prefix=/usr/local/expat/ CC=arm-linux-gcc
    4. make; make install
    To copy to clipboard, switch view to plain text mode 

    3. cross-compile dbus
    Qt Code:
    1. tar zxvf dbus-1.2.24.tar.gz
    2. cd dbus-1.2.24
    3. ./configure --prefix=/usr/local/dbus/ --host=arm-linux --with-x=no ac_cv_have_abstract_sockets=yes "CC=arm-linux-gcc -I/usr/local/expat/include -L/usr/local/expat/lib"
    4.  
    5. make;make install;
    To copy to clipboard, switch view to plain text mode 

    4. cross-compile Qt with dbus
    Qt Code:
    1. a.export PKG_CONFIG_PATH=/usr/local/dbus/lib/pkgconfig
    2. b.configure with " -dbus " and " -force-pkg-config "
    To copy to clipboard, switch view to plain text mode 
    Last edited by to_guliang; 18th August 2010 at 08:57.

  4. #4
    Join Date
    Jan 2013
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: dbus.cpp:(.text+0x8):undefined reference to 'dbus_shutdown'

    After I was confronted with this error using qt 4.8.4(for embedded) and dbus 1.4.20 I want to give another solution, which works for me:

    The Error occurs because the test applikation in config.tests/unix/dbus/ is compiled (found Headers) but was not linked against "libdbus-1.so" !
    So when configuring QT add a "-ldbus-1" at end. (same problem occurs with DirectFB: add -ldirect and -ldirectfb)

  5. #5
    Join Date
    Mar 2013
    Posts
    8
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: dbus.cpp:(.text+0x8):undefined reference to 'dbus_shutdown'

    Hi guliang,

    By following your above thread i solved the issue of dbus.

    ./configure -embedded arm -xplatform qws/linux-arm-g++ -qt-kbd-linuxinput -qt-mouse-tslib -webkit -glib -dbus -force-pkg-config -opensource -verbose -R /usr/local/tslib/lib/

    Actually i am trying to give glib support for my QT (I am really need that)

    In that i am getting error

    cc1plus: warning: include location "/usr/include/glib-2.0" is unsafe for cross-compilation
    glib.cpp: In function 'int main(int, char**)':
    glib.cpp:55: warning: 'pollfd' is used uninitialized in this function
    arm-none-linux-gnueabi-g++ -Wl,-O1 -o glib glib.o -L/usr/local/tslib/lib -pthread -lgthread-2.0 -lrt -lglib-2.0
    /opt/codesourcery/arm-2009q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lgthread-2.0
    collect2: ld returned 1 exit status
    make: *** [glib] Error 1
    Glib disabled.
    Glib support cannot be enabled due to functionality tests!

    Turn on verbose messaging (-v) to ./configure to see the final report.
    If you believe this message is in error you may use the continue
    switch (-continue) to ./configure to continue.

    Can u please help me. Waiting for your reply...

    Thanks in Advance,

    Vignesh

Similar Threads

  1. undefined reference
    By digidas in forum Newbie
    Replies: 9
    Last Post: 19th May 2010, 13:04
  2. undefined reference
    By jayreddy in forum Qt Programming
    Replies: 1
    Last Post: 20th November 2009, 13:45
  3. Undefined reference to crt
    By derektaprell in forum Installation and Deployment
    Replies: 0
    Last Post: 20th October 2009, 08:34
  4. Replies: 5
    Last Post: 7th November 2007, 14:46
  5. Undefined reference
    By Salazaar in forum Newbie
    Replies: 12
    Last Post: 23rd May 2007, 10:21

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.