Results 1 to 17 of 17

Thread: Qt 5 - Linux deployment - can you dynamically link dependencies?

Hybrid View

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

    Default Re: Qt 5 - Linux deployment - can you dynamically link dependencies?

    Which output do you get for ldd when you setup LD_LIRBARY_PATH on the deployment machine?

    e.g. something like

    Qt Code:
    1. # Run your app
    2. export LD_LIBRARY_PATH=$LIBS:"$LD_LIBRARY_PATH"
    3. ldd $BIN > /tmp/ldd-output.txt
    4. $BIN $@
    To copy to clipboard, switch view to plain text mode 

    Cheers,
    _

  2. #2
    Join Date
    Feb 2013
    Posts
    65
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt 5 - Linux deployment - can you dynamically link dependencies?

    Here's what I get using the ldd addition to the script on the deployment machine:

    linux-gate.so.1 => (0xb77b7000)
    libQt5Widgets.so.5 => ./data/libs_32/libQt5Widgets.so.5 (0xb718d000)
    libQt5Gui.so.5 => ./data/libs_32/libQt5Gui.so.5 (0xb6d76000)
    libQt5Core.so.5 => ./data/libs_32/libQt5Core.so.5 (0xb692c000)
    libstdc++.so.6 => ./data/libs_32/libstdc++.so.6 (0xb6843000)
    libgcc_s.so.1 => ./data/libs_32/libgcc_s.so.1 (0xb6825000)
    libc.so.6 => ./data/libs_32/libc.so.6 (0xb667b000)
    libpthread.so.0 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libpthread.so.0 (0xb665f000)
    libgobject-2.0.so.0 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libgobject-2.0.so.0 (0xb660f000)
    libglib-2.0.so.0 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libglib-2.0.so.0 (0xb6513000)
    libX11.so.6 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libX11.so.6 (0xb63dd000)
    libm.so.6 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libm.so.6 (0xb63b0000)
    libGL.so.1 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libGL.so.1 (0xb6352000)
    libicui18n.so.49 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libicui18n.so.49 (0xb613a000)
    libicuuc.so.49 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libicuuc.so.49 (0xb5fc0000)
    libdl.so.2 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libdl.so.2 (0xb5fbb000)
    libgthread-2.0.so.0 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libgthread-2.0.so.0 (0xb5fb7000)
    librt.so.1 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/librt.so.1 (0xb5fae000)
    /lib/ld-linux.so.2 (0xb77b8000)
    libffi.so.6 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libffi.so.6 (0xb5fa7000)
    libpcre.so.3 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libpcre.so.3 (0xb5f67000)
    libxcb.so.1 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libxcb.so.1 (0xb5f44000)
    libglapi.so.0 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libglapi.so.0 (0xb5f2e000)
    libXext.so.6 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libXext.so.6 (0xb5f1c000)
    libXdamage.so.1 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libXdamage.so.1 (0xb5f18000)
    libXfixes.so.3 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libXfixes.so.3 (0xb5f11000)
    libX11-xcb.so.1 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libX11-xcb.so.1 (0xb5f0e000)
    libxcb-glx.so.0 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libxcb-glx.so.0 (0xb5ef5000)
    libXxf86vm.so.1 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libXxf86vm.so.1 (0xb5eef000)
    libdrm.so.2 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libdrm.so.2 (0xb5ee2000)
    libicudata.so.49 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libicudata.so.49 (0xb4dc1000)
    libXau.so.6 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libXau.so.6 (0xb4dbc000)
    libXdmcp.so.6 => /home/tom/LotteryAnalyzerExpertQL_32bit/./data/libs_32/libXdmcp.so.6 (0xb4db5000)

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt 5 - Linux deployment - can you dynamically link dependencies?

    So what exactly is the problem? It seems all dependencies are resolved.

    Note that you will probably want to deploy some plugins as well.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Feb 2013
    Posts
    65
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt 5 - Linux deployment - can you dynamically link dependencies?

    When i click on the script, I choose RUN, and nothing happens. I have the platforms folder in the binary directory. Are there any other plugins that I need?

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt 5 - Linux deployment - can you dynamically link dependencies?

    "Nothing happens" is a bit vague description of a problem. Maybe you are using some relative paths in your program?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    Join Date
    Feb 2013
    Posts
    65
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt 5 - Linux deployment - can you dynamically link dependencies?

    The program doesn't execute or start. I'm using QStandardPaths::HomeLocation to create user files and QCoreApplication::applicationDirPath to initially find user files and copy them to HomeLocation. The program then uses HomeLocation to operate from, both input and output files. The GUI should still execute since I check in the program for existence of needed files. If the program is executing then I should get a GUI and a "Cannot find input file" message box.
    Last edited by te777; 10th March 2013 at 12:12.

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt 5 - Linux deployment - can you dynamically link dependencies?

    Quote Originally Posted by te777 View Post
    The program doesn't execute or start.
    How did you verify that?

    If the program is executing then I should get a GUI and a "Cannot find input file" message box.
    Not if it crashes before reaching this code.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #8
    Join Date
    Feb 2013
    Posts
    65
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt 5 - Linux deployment - can you dynamically link dependencies?

    I tend to not think the program is crashing. The script works on the development machine where Qt 5 is installed. The program works correctly there in every way. I tend to think there is a dependency problem. Maybe I'm wrong. How do I verify if the program is executing at all?

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt 5 - Linux deployment - can you dynamically link dependencies?

    Quote Originally Posted by te777 View Post
    Maybe I'm wrong. How do I verify if the program is executing at all?
    One way would be to replace its main() function with something that returns a known error code and check in the script that the code returned is or is not equal to what you expect.

    Something along the lines of

    bash Code:
    1. ...
    2.  
    3. $BIN $@
    4. if [ $? eq "42" ] ...
    To copy to clipboard, switch view to plain text mode 

    and

    Qt Code:
    1. int main() { return 42; }
    To copy to clipboard, switch view to plain text mode 

    Another would be to intercept and log stderr of the script in a well known place.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  10. #10
    Join Date
    Feb 2013
    Posts
    65
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt 5 - Linux deployment - can you dynamically link dependencies?

    I installed Qt 5 on the test machine and the application works perfectly. So it is a dependency issue. Now just to figure out what else is needed.

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt 5 - Linux deployment - can you dynamically link dependencies?

    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 0
    Last Post: 16th November 2012, 08:36
  2. Replies: 3
    Last Post: 11th February 2011, 12:59
  3. Linux deployment issue, dependency not satisfiable.
    By skepticalgeek in forum General Programming
    Replies: 1
    Last Post: 29th November 2010, 13:23
  4. How to link a Qt .exe to a dll dynamically?
    By babygal in forum Newbie
    Replies: 5
    Last Post: 18th November 2010, 17:33
  5. Linux dependencies
    By LMZ in forum Qt Programming
    Replies: 6
    Last Post: 21st May 2007, 07:54

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.