Page 1 of 2 12 LastLast
Results 1 to 20 of 21

Thread: Mysql drivers install problems

  1. #1
    Join Date
    Jan 2008
    Posts
    58
    Thanks
    3
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Mysql drivers install problems

    Hi guys,

    I'm new in the world of QT and I like it allready.
    But I'm developing a program that needs mysql drivers, so I searched the net and found the documentation on the Trolltech site, but I can't get it done.

    I've downloaded the mysql-5.0.51a-macosx-universal.tar.bz from the mysql site (174 MB) and dropped it in the folder /usr/local/mysql-5.0.51a/ and I ran the sudo ./configure command without succes.

    Afterwards I followed the Trolltech documentation and ran the following commands:
    sudo cd /usr/local/Trolltech/Qt*/plugins/sqldrivers/
    sudo mkdir mysql
    cd mysql

    sudo qmake -project
    sudo qmake -o Makefile "INCLUDEPATH+=/usr/local/mysql-5.0.51a/include" "LIBS+=-L/usr/local/mysql-5.0.51a/lib -lmysqlclient_r" mysql.pro
    sudo make
    But it doesn't work I get the message:
    make: Nothing to be done for `first'.
    Can somebody help me, I trying for two days but it won't work.

    Thanks,

    Cyberboy
    Last edited by jpn; 31st January 2008 at 15:59. Reason: reformatted to look better

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

    Default Re: Mysql drivers install problems

    Quote Originally Posted by cyberboy View Post
    Afterwards I followed the Trolltech documentation and ran the following commands:
    sudo cd /usr/local/Trolltech/Qt*/plugins/sqldrivers/
    sudo mkdir mysql
    cd mysql

    sudo qmake -project
    Could you post a link to the part of Qt docs that say you should run these commands?

    Do you have Qt sources installed?

  3. #3
    Join Date
    Jan 2008
    Posts
    58
    Thanks
    3
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Mysql drivers install problems

    This is the documentation link:

    And how can I see if I have the QT sources installed?

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

    Default Re: Mysql drivers install problems

    There was no $QTDIR/src/plugins/sqldrivers/mysql? I don't see any step including mkdir in the docs. Neither should you run qmake -project which destroys the project file..
    J-P Nurmi

  5. #5
    Join Date
    Jan 2008
    Posts
    58
    Thanks
    3
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Mysql drivers install problems

    hmm... I know but.. It seems to be a logical step, because qmake -o Makefile etc.. didn't work without the project file.

    But how can I solve this?

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

    Default Re: Mysql drivers install problems

    My point was, that the plugin dir, including main.cpp and mysql.pro project file should have been there in the first place. You might need to restore the original project file. Running "qmake -project" overrode the project file with so called default project file.
    J-P Nurmi

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

    Default Re: Mysql drivers install problems

    Quote Originally Posted by cyberboy View Post
    But how can I solve this?
    First you need Qt sources. How did you install Qt on your system?

  8. #8
    Join Date
    Jan 2008
    Posts
    58
    Thanks
    3
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Mysql drivers install problems

    I read the instructions from the Trolltech site

    All the examples and all the tools are installed, so I used the make command.

  9. #9
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Mysql drivers install problems

    Quote Originally Posted by cyberboy View Post
    I read the instructions from the Trolltech site



    All the examples and all the tools are installed, so I used the make command.
    Take a look of this.
    http://doc.trolltech.com/4.3/sql-dri...x-and-mac-os-x
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

  10. #10
    Join Date
    Jan 2008
    Posts
    58
    Thanks
    3
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Mysql drivers install problems

    cd $QTDIR/src/plugins/sqldrivers/mysql
    This would be in my case cd /usr/local/Trolltech/Qt*/src/plugins/sqldrivers/mysql/
    But this directory doesn't exist, but I found the /usr/local/Trolltech/Qt*/plugins/sqldrivers/
    directory and I did the sudo mkdir mysql, now I have the directory.

    qmake -o Makefile "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
    This would be in my case sudo qmake -o Makefile "INCLUDEPATH+=/usr/local/mysql*/include" "LIBS+=-L/usr/local/mysql*/lib -lmysqlclient_r" mysql.pro
    But than I get the message : "Cannot find file: mysql.pro."

    So I ran the sudo qmake -project command to get a mysql.pro file.
    Afterwards I ran the sudo qmake -o Makefile.... command, with succes.
    And than the make command, but I get the message "make: Nothing to be done for `first'."

    So I'm really messing up something but what?
    Last edited by cyberboy; 1st February 2008 at 10:30. Reason: typos

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

    Default Re: Mysql drivers install problems

    As Jacek already pointed out, you need the sources. You can't just make an empty dir and pretend they're there...
    J-P Nurmi

  12. #12
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Mysql drivers install problems

    Use the Seprate source for it as JPN suggested.
    And then,
    qmake -o Makefile "INCLUDEPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/mysql -lmysqlclient_r" mysql.pro
    I had compiled with this. Because the corresponding header and .so files are in my system in that location. So, Try with this. I hope it's help.
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

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

    Default Re: Mysql drivers install problems

    Quote Originally Posted by cyberboy View Post
    I read the instructions from the Trolltech site
    http://doc.trolltech.com/4.3/install-mac.html
    If you were following these instructions, then the Qt sources should be in /tmp/qt-mac-.../ directory. Could you check if they're still there?

  14. #14
    Join Date
    Jan 2008
    Posts
    58
    Thanks
    3
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Mysql drivers install problems

    I downloaded a new file qt-4.3.2 from the Trolltech site. I copied the source directory from the download into my current installation.

    The next thing I did was installing the x86 version from mysql.com. (mysql 5.0.51a)

    And I did what the Trolltech QMYSQL guide said.

    But after I ran the command : sudo make I get this
    sudo make
    Password:
    make -f Makefile.Debug
    c++ -c -pipe -g -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -fPIC -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../mkspecs/macx-g++ -I. -I../../../../lib/QtCore.framework/Versions/4/Headers -I../../../../include/QtCore -I../../../../include/QtCore -I../../../../lib/QtSql.framework/Versions/4/Headers -I../../../../include/QtSql -I../../../../include/QtSql -I../../../../include -I/usr/include/mysql -Idebug -I. -F/usr/local/Trolltech/Qt-4.3.2/lib -o debug/main.o main.cpp
    In file included from main.cpp:41:
    ../../../sql/drivers/mysql/qsql_mysql.h:49:19: error: mysql.h: No such file or directory
    ../../../sql/drivers/mysql/qsql_mysql.h:100: error: expected `)' before '*' token
    make[1]: *** [debug/main.o] Error 1
    make: *** [debug] Error 2
    But if I run the command nano ../../../sql/drivers/mysql/qsql_mysql.h from the same location as make. I'm in the qsql_mysql.h file.
    So it does exist!?

    I'm a little bit confused right now, the make files says that the directory doesn't exist but the nano command says it does.

    What do I have to do know?
    Last edited by cyberboy; 1st February 2008 at 17:53. Reason: add information

  15. #15
    Join Date
    Jan 2007
    Posts
    30
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    MacOS X

    Wink Re: Mysql drivers install problems

    Quote Originally Posted by cyberboy View Post
    Hi guys,
    I've downloaded the mysql-5.0.51a-macosx-universal.tar.bz from the mysql site (174 MB) and dropped it in the folder /usr/local/mysql-5.0.51a/ and I ran the sudo ./configure command without succes.


    First Silly Question: Do you have a working MySQL ? Sounds like you do not because you said the configure command ran without succes.

    Next Silly Question: Did you install Qt by using qt-mac-opensource-4.3.2.dmg ? If so, that is not source. You need to get qt-mac-opensource-src-4.3.2.tar.gz and build it.

  16. #16
    Join Date
    Jan 2008
    Posts
    58
    Thanks
    3
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Mysql drivers install problems

    All right, the first install of mysql was messed up, so I download the pkg file from mysql.com and ran it.
    With succes, I think, because afterward the directory /usr/local/mysql exists

    And I don't know if I installed the QT source version, but I downloaded the qt-mac-opensource-src-4.3.2.tar.gz and copied the src folder into my installation.

    And than I did what I said in my previous post

  17. #17
    Join Date
    Jan 2007
    Posts
    30
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    MacOS X

    Question Re: Mysql drivers install problems

    Quote Originally Posted by cyberboy View Post
    I downloaded the qt-mac-opensource-src-4.3.2.tar.gz and copied the src folder into my installation.
    Did you build it ? As described here ?

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

    Default Re: Mysql drivers install problems

    Quote Originally Posted by cyberboy View Post
    And I don't know if I installed the QT source version, but I downloaded the qt-mac-opensource-src-4.3.2.tar.gz and copied the src folder into my installation.
    Don't copy any directories. Configure the sources, build the plugin and then copy only the plugin.

  19. #19
    Join Date
    Jan 2008
    Posts
    58
    Thanks
    3
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Mysql drivers install problems

    Okay, now I'm installing Qt-4.3.3 with the this configure flags on:
    ./configure -qt-sql-mysql -qt-sql-odbc -qt-sql-sqlite -universal

    And allmost everything went fine except for mysql this is the message I get:

    MySQL 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.
    And this is the message with the verbose flag turned on:
    Creating qmake. Please wait...
    make: Nothing to be done for `first'.
    floatmath auto-detection... ()
    c++ -c -pipe -Os -Wall -W -I/usr/local/Trolltech/Qt-4.3.2/mkspecs/macx-g++ -I. -I. -o floatmath.o floatmath.cpp
    floatmath.cpp:3: warning: unused parameter 'argc'
    floatmath.cpp:3: warning: unused parameter 'argv'
    c++ -headerpad_max_install_names -o floatmath.app/Contents/MacOS/floatmath floatmath.o
    floatmath disabled.
    mmx auto-detection... ()
    c++ -c -pipe -mmmx -Os -Wall -W -I/usr/local/Trolltech/Qt-4.3.2/mkspecs/macx-g++ -I. -I. -o mmx.o mmx.cpp
    c++ -headerpad_max_install_names -o mmx.app/Contents/MacOS/mmx mmx.o -mmmx
    mmx disabled.
    3dnow auto-detection... ()
    c++ -c -pipe -m3dnow -Os -Wall -W -I/usr/local/Trolltech/Qt-4.3.2/mkspecs/macx-g++ -I. -I. -o 3dnow.o 3dnow.cpp
    c++ -headerpad_max_install_names -o 3dnow.app/Contents/MacOS/3dnow 3dnow.o -m3dnow
    3dnow disabled.
    sse auto-detection... ()
    c++ -c -pipe -msse -Os -Wall -W -I/usr/local/Trolltech/Qt-4.3.2/mkspecs/macx-g++ -I. -I. -o sse.o sse.cpp
    c++ -headerpad_max_install_names -o sse.app/Contents/MacOS/sse sse.o -msse
    sse disabled.
    sse2 auto-detection... ()
    c++ -c -pipe -msse2 -Os -Wall -W -I/usr/local/Trolltech/Qt-4.3.2/mkspecs/macx-g++ -I. -I. -o sse2.o sse2.cpp
    c++ -headerpad_max_install_names -o sse2.app/Contents/MacOS/sse2 sse2.o -msse2
    sse2 disabled.
    zlib auto-detection... ()
    c++ -c -pipe -Os -Wall -W -I/usr/local/Trolltech/Qt-4.3.2/mkspecs/macx-g++ -I. -I. -o zlib.o zlib.cpp
    c++ -headerpad_max_install_names -o zlib zlib.o -lz
    zlib enabled.
    libjpeg auto-detection... ()
    c++ -c -pipe -Os -Wall -W -I/usr/local/Trolltech/Qt-4.3.2/mkspecs/macx-g++ -I. -I. -o libjpeg.o libjpeg.cpp
    libjpeg.cpp:4:21: error: jpeglib.h: No such file or directory
    libjpeg.cpp: In function 'int main(int, char**)':
    libjpeg.cpp:9: error: 'j_compress_ptr' was not declared in this scope
    libjpeg.cpp:9: error: expected `;' before 'cinfo'
    libjpeg.cpp:10: error: 'cinfo' was not declared in this scope
    libjpeg.cpp:10: error: 'jpeg_create_compress' was not declared in this scope
    make: *** [libjpeg.o] Error 1
    libjpeg disabled.
    libtiff auto-detection... ()
    c++ -c -pipe -Os -Wall -W -I/usr/local/Trolltech/Qt-4.3.2/mkspecs/macx-g++ -I. -I. -o libtiff.o libtiff.cpp
    libtiff.cpp:1:20: error: tiffio.h: No such file or directory
    libtiff.cpp:4:6: error: #error "Required libtiff not found"
    libtiff.cpp: In function 'int main(int, char**)':
    libtiff.cpp:11: error: 'tdata_t' was not declared in this scope
    libtiff.cpp:11: error: expected `;' before 'buffer'
    libtiff.cpp:12: error: 'buffer' was not declared in this scope
    libtiff.cpp:12: error: '_TIFFfree' was not declared in this scope
    make: *** [libtiff.o] Error 1
    libtiff disabled.
    libmng auto-detection... ()
    c++ -c -pipe -Os -Wall -W -I/usr/local/Trolltech/Qt-4.3.2/mkspecs/macx-g++ -I. -I. -o libmng.o libmng.cpp
    libmng.cpp:1:20: error: libmng.h: No such file or directory
    libmng.cpp:9:2: error: #error System libmng version is less than 1.0.9; using built-in version instead.
    libmng.cpp: In function 'int main(int, char**)':
    libmng.cpp:5: error: 'mng_handle' was not declared in this scope
    libmng.cpp:5: error: expected `;' before 'hMNG'
    libmng.cpp:6: error: 'hMNG' was not declared in this scope
    libmng.cpp:6: error: 'mng_cleanup' was not declared in this scope
    make: *** [libmng.o] Error 1
    libmng disabled.
    libpng auto-detection... ()
    c++ -c -pipe -Os -Wall -W -I/usr/local/Trolltech/Qt-4.3.2/mkspecs/macx-g++ -I. -I. -o libpng.o libpng.cpp
    libpng.cpp:1:17: error: png.h: No such file or directory
    libpng.cpp:4:4: error: #error "Required libpng version 1.0.17 not found."
    libpng.cpp: In function 'int main(int, char**)':
    libpng.cpp:9: error: 'png_structp' was not declared in this scope
    libpng.cpp:9: error: expected `;' before 'png_ptr'
    libpng.cpp:10: error: 'png_ptr' was not declared in this scope
    libpng.cpp:10: error: 'PNG_LIBPNG_VER_STRING' was not declared in this scope
    libpng.cpp:10: error: 'png_create_read_struct' was not declared in this scope
    make: *** [libpng.o] Error 1
    libpng disabled.
    InterBase auto-detection... ()
    c++ -c -pipe -Os -Wall -W -I/usr/local/Trolltech/Qt-4.3.2/mkspecs/macx-g++ -I. -I. -o ibase.o ibase.cpp
    ibase.cpp:1:19: error: ibase.h: No such file or directory
    make: *** [ibase.o] Error 1
    InterBase disabled.
    MySQL (thread-safe) auto-detection... ()
    c++ -c -pipe -Os -Wall -W -I/usr/local/Trolltech/Qt-4.3.2/mkspecs/macx-g++ -I. -I. -o mysql.o ../mysql/mysql.cpp
    ../mysql/mysql.cpp:1:19: error: mysql.h: No such file or directory
    make: *** [mysql.o] Error 1
    MySQL (thread-safe) disabled.
    MySQL (thread-unsafe) auto-detection... ()
    c++ -c -pipe -Os -Wall -W -I/usr/local/Trolltech/Qt-4.3.2/mkspecs/macx-g++ -I. -I. -o mysql.o mysql.cpp
    mysql.cpp:1:19: error: mysql.h: No such file or directory
    make: *** [mysql.o] Error 1
    MySQL (thread-unsafe) disabled.
    MySQL 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.
    And that's just crazy he's now looking in the old qtdir?

  20. #20
    Join Date
    Jan 2008
    Posts
    58
    Thanks
    3
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Mysql drivers install problems

    Hmm.... the ./configure succeed, but therefore I had to remove the -qt-sql-mysql parameter and I replaced the qt-sql-<driver> by -plugin-sql-<driver>

    Right now I'm running the make, I hope that I've got the sqlite drivers installed right know so I can do at least something with a database

    P.S. This is an installation of the qt-mac-opensource-src-4.3.2

Similar Threads

  1. QMake make install problems
    By cookiem in forum Qt Programming
    Replies: 12
    Last Post: 4th December 2008, 15:34
  2. Mac OS X install problems
    By rickbsgu in forum Installation and Deployment
    Replies: 4
    Last Post: 7th October 2006, 06:31
  3. Issues regarding QMySql drivers and mysql database
    By bera82 in forum Qt Programming
    Replies: 2
    Last Post: 10th August 2006, 17:50
  4. Problems building mysql plugin for Qt 4.1.2 on windows XP
    By Philip_Anselmo in forum Installation and Deployment
    Replies: 3
    Last Post: 17th May 2006, 15:38

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.