Results 1 to 13 of 13

Thread: Problem compiling ibase driver

  1. #1
    Join Date
    Jun 2007
    Posts
    28
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Problem compiling ibase driver

    Hi all,
    i'm trying to compile QT with the iBase support.
    Somewhere i read to use -plugin-sql-qibase but it is not recognized by the ./configure. I used -plugin-sql-ibase as stated by the 'configure --help'.

    Compiling it i receive an error: ibase.h not found, so i added the option -I/opt/firebird/include.

    Now i receive the error
    Qt Code:
    1. cannot find -lgds
    2. collect2: ld returned 1 exit status
    3. make: *** [ibase] Error 1
    4. InterBase disabled.
    To copy to clipboard, switch view to plain text mode 

    I searched for gds library but i did not able to find it

    Thanks !!
    SteM

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Problem compiling ibase driver

    I must admit I'm not familiar with iBase nor "gds" but perhaps libGDS?
    J-P Nurmi

  3. #3
    Join Date
    Jun 2007
    Posts
    28
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem compiling ibase driver

    I don't know.
    There is a '-lgds' option on gcc command line.
    SteM

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem compiling ibase driver

    Quote Originally Posted by SteM View Post
    so i added the option -I/opt/firebird/include.
    Then maybe you need -L /opt/firebird/lib too?

  5. #5
    Join Date
    Jun 2007
    Posts
    28
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem compiling ibase driver

    I got it, but in that folder the library is not present !!
    SteM

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem compiling ibase driver

    Quote Originally Posted by SteM View Post
    I got it, but in that folder the library is not present !!
    Have you tried this?
    If you are using Firebird, the Firebird library has to be set explicitely:
    cd $QTDIR/src/plugins/sqldrivers/ibase
    qmake -o Makefile "INCLUDEPATH+=/opt/interbase/include" "LIBS+=-L/opt/interbase/lib -lfbclient" ibase.pro
    make
    (these instructions are for building the plugin only, but you can try to pass the INCLUDEPATH as -I and LIBS as -L to the configure script).

    Note that for Firebird you need fbclient library, not gds.

  7. #7
    Join Date
    Jun 2007
    Posts
    28
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem compiling ibase driver

    OK, but the -lgds is added by the ibase.pro !!

    I discovered that are present two items /usr/lib/libgds.so[.0] that are links to /opt/firebird/lib/libfbclient.so !

    So I included -L /usr/lib and now i receive:

    Qt Code:
    1. ld: warning: libstdc++.so.5, needed by /usr/lib/libgds.so, may conflict with libstdc++.so.6
    2. /usr/lib/libgds.so: undefined reference to `pthread_key_create'
    3. /usr/lib/libgds.so: undefined reference to `pthread_rwlock_rdlock'
    4. /usr/lib/libgds.so: undefined reference to `pthread_getspecific'
    5. /usr/lib/libgds.so: undefined reference to `pthread_mutexattr_destroy'
    6. /usr/lib/libgds.so: undefined reference to `pthread_rwlock_wrlock'
    7. /usr/lib/libgds.so: undefined reference to `pthread_create'
    8. /usr/lib/libgds.so: undefined reference to `pthread_mutexattr_init'
    9. /usr/lib/libgds.so: undefined reference to `pthread_rwlockattr_setkind_np'
    10. /usr/lib/libgds.so: undefined reference to `pthread_rwlock_destroy'
    11. /lib/libc.so.6: undefined reference to `_dl_out_of_memory@GLIBC_PRIVATE'
    12. /usr/lib/libgds.so: undefined reference to `pthread_rwlockattr_init'
    13. /usr/lib/libgds.so: undefined reference to `pthread_rwlock_init'
    14. /usr/lib/libgds.so: undefined reference to `pthread_rwlock_unlock'
    15. /usr/lib/libgds.so: undefined reference to `pthread_key_delete'
    16. /usr/lib/libgds.so: undefined reference to `pthread_detach'
    17. /usr/lib/libgds.so: undefined reference to `pthread_setspecific'
    18. /usr/lib/libgds.so: undefined reference to `pthread_rwlockattr_destroy'
    19. collect2: ld returned 1 exit status
    20. make: *** [ibase] Error 1
    21. InterBase disabled.
    To copy to clipboard, switch view to plain text mode 

    but i'm crosscompiling ... so i think i should not point to /usr/lib but to the relative crosscompiled ... but in that one i have NOT libgds !!!!
    SteM

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem compiling ibase driver

    Quote Originally Posted by SteM View Post
    OK, but the -lgds is added by the ibase.pro !!
    Not quite:
    unix:!contains( LIBS, .*gds.* ):!contains( LIBS, .*libfb.* ):LIBS *= -lgds

    win32:!contains( LIBS, .*gds.* ):!contains( LIBS, .*fbclient.* ) {
    !win32-borland:LIBS *= -lgds32_ms
    win32-borland:LIBS += gds32.lib
    }
    If you tell Qt to use fbclient, it won't use gds.

    Quote Originally Posted by SteM View Post
    ld: warning: libstdc++.so.5, needed by /usr/lib/libgds.so, may conflict with libstdc++.so.6
    How did you compile that library?

  9. #9
    Join Date
    Jun 2007
    Posts
    28
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem compiling ibase driver

    Quote Originally Posted by jacek View Post
    Not quite:

    If you tell Qt to use fbclient, it won't use gds.


    How did you compile that library?

    Ok, but libgds --> libfdclient, so that's the same thing !

    I did not compile that lib ! I downloaded the tar.gz file and i installed (as test) on my host (CentOS).
    When i crosscompiled QT for my target (i586 based) i pointed same libraries used by the host maybe to have a consistent situation is better to download the source files and compile them from the scratch for both the platform (even if they are very similar)
    SteM

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem compiling ibase driver

    Quote Originally Posted by SteM View Post
    When i crosscompiled QT for my target (i586 based) i pointed same libraries used by the host maybe to have a consistent situation is better to download the source files and compile them from the scratch for both the platform (even if they are very similar)
    Yes, I think you should try compiling from source. Even if both platforms are simmilar, they still different and might use different versions of other libraries.

  11. #11
    Join Date
    Jun 2007
    Posts
    28
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem compiling ibase driver

    Hi all,
    now i have the crosscompiiiled version of the libraries but when i run sql browser i have the message:
    "This demo requires at least one Qt database driver. Please check the documentation how to build the Qt SQL plugins."
    So, both the iBase and SqlLite libraries i provided are not loaded

    Is there a way to debug this situation? Any log?

    I put the libraries on the Qt folder:

    Qt Code:
    1. root@192.168.197.128:~# ls -l /usr/local/Trolltech/Qt-4.2.2/plugins/sqldrivers/
    2. total 2088
    3. -rwxr-xr-x 1 root staff 94969 Sep 5 14:30 libqsqlibase.so
    4. -rwxr-xr-x 1 root staff 1525107 Sep 5 14:32 libqsqlite.so
    5. -rwxr-xr-x 1 root staff 490047 Sep 5 14:32 libqsqlpsql.so
    To copy to clipboard, switch view to plain text mode 
    SteM

  12. #12
    Join Date
    Jun 2007
    Posts
    28
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem compiling ibase driver

    I found an old message where it was suggested to trace the system calls by strace. I did the same and i found the problem:

    Qt Code:
    1. root@192.168.197.128:~/sqlbrowser# ./strace ./sqlbrowser 2>&1 | grep plugin
    2. stat64("/root/seadragon/workspace_sd/qt/plugins", 0x8060e0c) = -1 ENOENT (No such file or directory)
    3. lstat64("/root/seadragon/workspace_sd/qt/plugins", 0xbfa9dd68) = -1 ENOENT (No such file or directory)
    To copy to clipboard, switch view to plain text mode 

    That path was the one i choose when i crosscompile QT, the location where to save the crosscompiled output but it is NOT the path where QT will be located on the target !!!

    How can i solve?
    I need a location on the host where to save the output of the crosscompile and the standard QT location on the final target !!!
    Last edited by SteM; 17th September 2007 at 16:07.
    SteM

  13. #13
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem compiling ibase driver

    Quote Originally Posted by SteM View Post
    That path was the one i choose when i crosscompile QT, the location where to save the crosscompiled output but it is NOT the path where QT will be located on the target !!!
    You can use qt.conf file to tell Qt where to look for plugins.

Similar Threads

  1. Replies: 7
    Last Post: 28th June 2007, 18:18
  2. IBASE driver not found ?
    By vieraci in forum Installation and Deployment
    Replies: 10
    Last Post: 22nd May 2007, 14:56
  3. My Mysql 5 and Qt 4.2.2 Problem (Driver not loaded)
    By fengtian.we in forum Qt Programming
    Replies: 4
    Last Post: 9th February 2007, 09:11
  4. Replies: 7
    Last Post: 1st August 2006, 22:15
  5. Replies: 10
    Last Post: 28th April 2006, 16:48

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.