Results 1 to 4 of 4

Thread: Qt app with MySQL works in developing machine but not in deploying one

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: Qt app with MySQL works in developing machine but not in deploying one

    You can try running your application in an environment that has variable QT_DEBUG_PLUGINS set to 1, making Qt's plugin loading code log what it is doing.

    Possible causes can be things like a plugin of a different Qt version being found before the correct one.

    Cheers,
    _

  2. The following user says thank you to anda_skoa for this useful post:

    Laureta (12th April 2015)

  3. #2
    Join Date
    Jan 2015
    Location
    Tremp, Spain
    Posts
    14
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android
    Thanks
    6

    Default Re: Qt app with MySQL works in developing machine but not in deploying one

    Quote Originally Posted by anda_skoa View Post
    You can try running your application in an environment that has variable QT_DEBUG_PLUGINS set to 1
    Well, I did that; and the first thing I saw was that I was using a debug plugin.
    It's my fault, my laziness, I tried to compile the plugin from Qt Creator without realizing it was in debug mode !!!!
    So, I rolled my sleeves up to find the libraries and headers through the file system, and finally I get compiled the plugin from console.

    These are the log's relevant parts on my dev machine (working) log.txt
    And this is the complete log on the deploy machine log_deploy.txt
    Here you can see the application's folder tree on the deploy machine folders_snapshot.png

    As you can see, the mysql plugin is not loaded on deploy machine. What might be the cause?

    Also, I get a warning when platform plugin is loaded: the plugin <path-to-application-platforms> libqxcb.so uses incompatible Qt library (5.4.1) [release].

    In deploy machine, there are Qt 4.8 and Qt 5.1 shared libraries (at /usr/lib/i386-linux-gnu). How can I force to load the libraries distributed with my application, instead of those earlier?

  4. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: Qt app with MySQL works in developing machine but not in deploying one

    You can set an override search path for the runtime linker using the LD_LIBRARY_PATH environment variable in your start script:
    Qt Code:
    1. export LD_LIBRARY_PATH=/your/library/path:$LD_LIBRARY_PATH
    To copy to clipboard, switch view to plain text mode 

    If you do that in a shell, ldd will also use it, so you can verify which Qt is picked up for your application.

    Cheers,
    _

  5. The following user says thank you to anda_skoa for this useful post:

    Laureta (13th April 2015)

Similar Threads

  1. No printer after deploying application on another machine
    By worluk in forum Installation and Deployment
    Replies: 1
    Last Post: 13th November 2013, 09:39
  2. Replies: 3
    Last Post: 5th June 2013, 05:35
  3. Replies: 4
    Last Post: 11th June 2010, 19:27
  4. Deploying with MySQL and FTP
    By josepvr in forum Qt Programming
    Replies: 2
    Last Post: 9th April 2009, 08:16
  5. Deploying application on Linux machine without Qt
    By will49 in forum Installation and Deployment
    Replies: 2
    Last Post: 10th July 2008, 22:41

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
  •  
Qt is a trademark of The Qt Company.