Urgent Help Needed to build Linux distribution


  • Moderators

    @Ram_Thakkar77 Well it seems that the resources were found inside the application directory but there seems to be library incompatibility issues as seen the end.
    Do you already have Qt installed at the default path on deployment machine ?
    I'm too not sure which library is referring to older one. You just need to ldd to check if libraries from default path are referred.



  • @p3c0, yes QT is installed on my machine but for testing purpose i just renamed QT folder. I just need to check that whether without QT folder its working or not??


  • Moderators

    Try. You actually need to find out which new library is referring to default one.



  • @p3c0, Actually i tried a lot but not managed to find out what is the actual cause. Its very urgent, i need to redistribute my qt made application to some one. So please help me out for this problem.


  • Moderators

    @Ram_Thakkar77 Can you post output of ldd QtWebEngineProcess which is present in your application directory ?



  • @p3c0m here is the link for same ldd QtWebEngineProcess


  • Moderators

    @Ram_Thakkar77 Well Sorry reframing.. does the ldd show same dependencies when you run the script ?



  • @p3c0 on terminal I am getting below error :

    root@ashavin-desktop:~# '/root/Desktop/QTEXETesting/QTBrowser.sh' 
    QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
    WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
    Qt WebEngine ICU data not found at /opt/Qt5.7.1/5.7/gcc_64/resources. Trying parent directory...
    Qt WebEngine ICU data not found at /opt/Qt5.7.1/5.7/gcc_64. Trying application directory...
    Installed Qt WebEngine locales directory not found at location /opt/Qt5.7.1/5.7/gcc_64/translations/qtwebengine_locales. Trying application directory...
    Qt WebEngine resources not found at /opt/Qt5.7.1/5.7/gcc_64/resources. Trying parent directory...
    Qt WebEngine resources not found at /opt/Qt5.7.1/5.7/gcc_64. Trying application directory...
    [0215/122421:WARNING:resource_bundle.cc(311)] locale_file_path.empty() for locale 
    Qt WebEngine ICU data not found at /opt/Qt5.7.1/5.7/gcc_64/resources. Trying parent directory...
    Qt WebEngine ICU data not found at /opt/Qt5.7.1/5.7/gcc_64. Trying application directory...
    Installed Qt WebEngine locales directory not found at location /opt/Qt5.7.1/5.7/gcc_64/translations/qtwebengine_locales. Trying application directory...
    Qt WebEngine resources not found at /opt/Qt5.7.1/5.7/gcc_64/resources. Trying parent directory...
    Qt WebEngine resources not found at /opt/Qt5.7.1/5.7/gcc_64. Trying application directory...
    [0215/122422:WARNING:resource_bundle.cc(311)] locale_file_path.empty() for locale 
    Cannot mix incompatible Qt library (version 0x50201) with this library (version 0x50701)
    Aborted (core dumped)
    

  • Moderators

    @Ram_Thakkar77 Can you do ldd on QtWebEngineProcess inside the script because that is where you export library paths and that is where we can find what QtWebEngineProcess uses.



  • @p3c0 here it is:

    Start ldd of QtWebEngineProcess
    /root/Desktop/QTEXETesting/QtWebEngineProcess: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: no version information available (required by /root/Desktop/QTEXETesting/QtWebEngineProcess)
    	linux-vdso.so.1 =>  (0x00007fff59b42000)
    	libQt5WebEngineCore.so.5 => not found
    	libQt5Quick.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5 (0x00007f8a03b03000)
    	libQt5Gui.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007f8a034b5000)
    	libQt5WebChannel.so.5 => not found
    	libQt5Qml.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5 (0x00007f8a02eae000)
    	libQt5Network.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Network.so.5 (0x00007f8a02b69000)
    	libQt5Positioning.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Positioning.so.5 (0x00007f8a02934000)
    	libQt5Core.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007f8a0228e000)
    	libGL.so.1 => /usr/lib/nvidia-340/libGL.so.1 (0x00007f8a01f41000)
    	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8a01d23000)
    	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f8a01a1f000)
    	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8a01718000)
    	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8a01502000)
    	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8a0113d000)
    	libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007f8a00f16000)
    	libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f8a00cc1000)
    	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f8a00aa8000)
    	libicui18n.so.52 => /usr/lib/x86_64-linux-gnu/libicui18n.so.52 (0x00007f8a006a0000)
    	libicuuc.so.52 => /usr/lib/x86_64-linux-gnu/libicuuc.so.52 (0x00007f8a00327000)
    	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8a00123000)
    	libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f89ffe1a000)
    	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f89ffc12000)
    	/lib64/ld-linux-x86-64.so.2 (0x000055d2d4cd5000)
    	libnvidia-tls.so.340.101 => /usr/lib/nvidia-340/tls/libnvidia-tls.so.340.101 (0x00007f89ffa0f000)
    	libnvidia-glcore.so.340.101 => /usr/lib/nvidia-340/libnvidia-glcore.so.340.101 (0x00007f89fcdfa000)
    	libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f89fcac5000)
    	libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f89fc8b3000)
    	libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f89fc60f000)
    	libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007f89fc3e9000)
    	libicudata.so.52 => /usr/lib/x86_64-linux-gnu/libicudata.so.52 (0x00007f89fab7b000)
    	libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f89fa93d000)
    	libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f89fa71d000)
    	libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f89fa519000)
    	libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f89fa313000)
    Finished ldd of QtWebEngineProcess
    QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
    WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
    Qt WebEngine ICU data not found at /opt/Qt5.7.1/5.7/gcc_64/resources. Trying parent directory...
    Qt WebEngine ICU data not found at /opt/Qt5.7.1/5.7/gcc_64. Trying application directory...
    Installed Qt WebEngine locales directory not found at location /opt/Qt5.7.1/5.7/gcc_64/translations/qtwebengine_locales. Trying application directory...
    Qt WebEngine resources not found at /opt/Qt5.7.1/5.7/gcc_64/resources. Trying parent directory...
    Qt WebEngine resources not found at /opt/Qt5.7.1/5.7/gcc_64. Trying application directory...
    [0215/123909:WARNING:resource_bundle.cc(311)] locale_file_path.empty() for locale 
    Qt WebEngine ICU data not found at /opt/Qt5.7.1/5.7/gcc_64/resources. Trying parent directory...
    Qt WebEngine ICU data not found at /opt/Qt5.7.1/5.7/gcc_64. Trying application directory...
    Installed Qt WebEngine locales directory not found at location /opt/Qt5.7.1/5.7/gcc_64/translations/qtwebengine_locales. Trying application directory...
    Qt WebEngine resources not found at /opt/Qt5.7.1/5.7/gcc_64/resources. Trying parent directory...
    Qt WebEngine resources not found at /opt/Qt5.7.1/5.7/gcc_64. Trying application directory...
    [0215/123909:WARNING:resource_bundle.cc(311)] locale_file_path.empty() for locale 
    Cannot mix incompatible Qt library (version 0x50201) with this library (version 0x50701)
    Aborted (core dumped)
    
    

  • Moderators

    @Ram_Thakkar77 Are you sure this was after exporting new LD_LIBRARY_PATH because QtWebEngineProcess is using Qt libraries installed at default path and not your deployed libraries.



  • @p3c0 I m really very for silly mistake here is my .sh file code and output which i got from terminal:

    QtBrowser.sh code

    #!/bin/sh
    appname=`basename $0 | sed s,\.sh$,,`
    
    dirname=`dirname $0`
    tmp="${dirname#?}"
    
    if [ "${dirname%$tmp}" != "/" ]; then
    dirname=$PWD/$dirname
    fi
    LD_LIBRARY_PATH=$dirname
    export LD_LIBRARY_PATH
    export QT_PLUGIN_PATH=$dirname/plugins
    
    echo 'Start ldd of QtWebEngineProcess'
    ldd $dirname/QtWebEngineProcess
    echo 'Finished ldd of QtWebEngineProcess'
    
    $dirname/$appname "$@"
    

    Terminal Output

    root@ashavin-desktop:~# '/root/Desktop/QTEXETesting/QTBrowser.sh' 
    Start ldd of QtWebEngineProcess
    	linux-vdso.so.1 =>  (0x00007ffcb7bed000)
    	libQt5WebEngineCore.so.5 => /root/Desktop/QTEXETesting/libQt5WebEngineCore.so.5 (0x00007ff87e586000)
    	libQt5Quick.so.5 => /root/Desktop/QTEXETesting/libQt5Quick.so.5 (0x00007ff87df95000)
    	libQt5Gui.so.5 => /root/Desktop/QTEXETesting/libQt5Gui.so.5 (0x00007ff87d808000)
    	libQt5WebChannel.so.5 => /root/Desktop/QTEXETesting/libQt5WebChannel.so.5 (0x00007ff87d5eb000)
    	libQt5Qml.so.5 => /root/Desktop/QTEXETesting/libQt5Qml.so.5 (0x00007ff87cff3000)
    	libQt5Network.so.5 => /root/Desktop/QTEXETesting/libQt5Network.so.5 (0x00007ff87cc94000)
    	libQt5Positioning.so.5 => /root/Desktop/QTEXETesting/libQt5Positioning.so.5 (0x00007ff87ca55000)
    	libQt5Core.so.5 => /root/Desktop/QTEXETesting/libQt5Core.so.5 (0x00007ff87c337000)
    	libGL.so.1 => /usr/lib/nvidia-340/libGL.so.1 (0x00007ff87bfd2000)
    	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff87bdb4000)
    	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff87bab0000)
    	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff87b7a9000)
    	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff87b593000)
    	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff87b1ce000)
    	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ff87afc5000)
    	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff87adc1000)
    	libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007ff87ab70000)
    	libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007ff87a867000)
    	libsmime3.so => /usr/lib/x86_64-linux-gnu/libsmime3.so (0x00007ff87a63b000)
    	libnss3.so => /usr/lib/x86_64-linux-gnu/libnss3.so (0x00007ff87a2fe000)
    	libnssutil3.so => /usr/lib/x86_64-linux-gnu/libnssutil3.so (0x00007ff87a0d0000)
    	libnspr4.so => /usr/lib/x86_64-linux-gnu/libnspr4.so (0x00007ff879e93000)
    	libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007ff879c57000)
    	libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007ff8799b3000)
    	libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007ff87967e000)
    	libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007ff87946e000)
    	libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007ff879263000)
    	libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007ff879051000)
    	libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007ff878e4b000)
    	libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007ff878c40000)
    	libXcomposite.so.1 => /usr/lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007ff878a3d000)
    	libasound.so.2 => /usr/lib/x86_64-linux-gnu/libasound.so.2 (0x00007ff87874d000)
    	libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007ff878549000)
    	libXtst.so.6 => /usr/lib/x86_64-linux-gnu/libXtst.so.6 (0x00007ff878343000)
    	libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007ff8780fe000)
    	libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007ff877d96000)
    	libxslt.so.1 => /usr/lib/x86_64-linux-gnu/libxslt.so.1 (0x00007ff877b59000)
    	/lib64/ld-linux-x86-64.so.2 (0x000055b5c9a48000)
    	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ff87793f000)
    	libicui18n.so.56 => /root/Desktop/QTEXETesting/libicui18n.so.56 (0x00007ff8774a5000)
    	libicuuc.so.56 => /root/Desktop/QTEXETesting/libicuuc.so.56 (0x00007ff8770ec000)
    	libicudata.so.56 => /root/Desktop/QTEXETesting/libicudata.so.56 (0x00007ff875709000)
    	libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007ff875507000)
    	libnvidia-tls.so.340.101 => /usr/lib/nvidia-340/tls/libnvidia-tls.so.340.101 (0x00007ff875303000)
    	libnvidia-glcore.so.340.101 => /usr/lib/nvidia-340/libnvidia-glcore.so.340.101 (0x00007ff8726ef000)
    	libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007ff8724e6000)
    	libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007ff8722a8000)
    	libplc4.so => /usr/lib/x86_64-linux-gnu/libplc4.so (0x00007ff8720a3000)
    	libplds4.so => /usr/lib/x86_64-linux-gnu/libplds4.so (0x00007ff871e9e000)
    	libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007ff871c74000)
    	libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007ff871a4d000)
    	libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007ff87182e000)
    	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007ff87160b000)
    	libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007ff871407000)
    	libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007ff871200000)
    Finished ldd of QtWebEngineProcess
    QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
    WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
    Qt WebEngine ICU data not found at /opt/Qt5.7.1/5.7/gcc_64/resources. Trying parent directory...
    Qt WebEngine ICU data not found at /opt/Qt5.7.1/5.7/gcc_64. Trying application directory...
    Installed Qt WebEngine locales directory not found at location /opt/Qt5.7.1/5.7/gcc_64/translations/qtwebengine_locales. Trying application directory...
    Qt WebEngine resources not found at /opt/Qt5.7.1/5.7/gcc_64/resources. Trying parent directory...
    Qt WebEngine resources not found at /opt/Qt5.7.1/5.7/gcc_64. Trying application directory...
    [0215/124437:WARNING:resource_bundle.cc(311)] locale_file_path.empty() for locale 
    Qt WebEngine ICU data not found at /opt/Qt5.7.1/5.7/gcc_64/resources. Trying parent directory...
    Qt WebEngine ICU data not found at /opt/Qt5.7.1/5.7/gcc_64. Trying application directory...
    Installed Qt WebEngine locales directory not found at location /opt/Qt5.7.1/5.7/gcc_64/translations/qtwebengine_locales. Trying application directory...
    Qt WebEngine resources not found at /opt/Qt5.7.1/5.7/gcc_64/resources. Trying parent directory...
    Qt WebEngine resources not found at /opt/Qt5.7.1/5.7/gcc_64. Trying application directory...
    [0215/124437:WARNING:resource_bundle.cc(311)] locale_file_path.empty() for locale 
    Cannot mix incompatible Qt library (version 0x50201) with this library (version 0x50701)
    Aborted (core dumped)
    root@ashavin-desktop:~# 
    
    

  • Moderators

    @Ram_Thakkar77 Sorry Im too out of options. May be some else can be of help from here.
    I would suggest you to ask this question on the Qt mailing list.



  • @p3c0 , Do me one favor. According my requirement can you suggest me how to make a qt application in fresh system?

    Below are few points according my requirement:

    1. Want to build linux executable using qtwebengine to play some html5 webgl content.
    2. using same project if i can manage to play .mp4 video file then its huge advantage for me.
    3. Need to distribute my qt app.

    If require i will also take one fresh system and will install Qt on that system. So suggest me right direction for same.


  • Moderators

    @Ram_Thakkar77 Actually no new suggestions as compared to older posts in this thread.
    As said earlier you need to follow these 2 carefully:
    http://doc.qt.io/qt-5/linux-deployment.html
    http://doc.qt.io/qt-5/qtwebengine-deploying.html

    If require i will also take one fresh system and will install Qt on that system.

    That is a very good idea. Also please make sure you don't have any version of Qt already installed.



  • @p3c0 I m using qt-opensource-linux-x64-5.7.1 version so is it okay or have to take another version?? Is there any sample application which i can try??


  • Moderators



  • @p3c0 and @jsulm

    Thanks a lot both of you for your throughout support. Unfortunately i didn't manage to short it out my problem. In future i will try again with QT. For time being i implemented work around solution with Google chrome and my client is also agreed with same. I liked QT very much but i think building linux executable is very tedious process compare to windows. So its my suggestion to QT teams that there must be a way to make it simple.

    Thanks one again both of you.


  • Moderators

    @Ram_Thakkar77 Don't give up just. Try asking it on the mailing list as said earlier.
    I personally have never deployed any Linux application which included WebEngine so I might have fell short there. I have done other deployments which didn't use WebEngine and those worked according to the official Qt Linux deployment documents.
    I'm sure you will get a solution on the mailing list.
    Also there is an unofficial linux deployment tool named linuxdeployqt. Like androiddeployqt and windeployqt it should also fetch all the application dependencies and package them. Worth trying I guess.


  • Moderators

    @Ram_Thakkar77 It sounds like you just don't understand linux properly. It isn't that it is harder than windows (and in a lot of cases it's actually easier), it's just that you don't understand how the program is run and how ld finds your libraries.

    There's a term in windows called dll hell which I'm sure you've heard. You are basically just running into a similar situation in Linux but have no idea how it works or how to solve it.

    I recommend you stick with it as once you figure it out it's quite easy. The info p3c0 and jsulm gave should have helped you get your distribution ready, but you kept missing libraries and not setting your custom LD path properly. If you do this correctly it is not only quite easy but can all be easily automated in a small bash script.

    I definitely wouldn't blame Qt for this as you have a "distributing linux binary" problem, not a Qt one. That would have happened to you no matter what development toolkit you used. It has nothing to do with Qt at all.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.