Results 1 to 17 of 17

Thread: Issue in QT 5.2.1 app in linking libquazip.so library in making ubuntu .deb package

  1. #1
    Join Date
    Jun 2014
    Posts
    24
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Issue in QT 5.2.1 app in linking libquazip.so library in making ubuntu .deb package

    I am making .deb package for the QT 5 .2.1 desktop app for ubuntu 14.04 64 bit. I have installed QT 5.2.1 on Ubuntu 14.04 and made a demo app for the testing purpose in which I have used quazip library. During making the .deb package of the app I am getting the below issue.

    dpkg-shlibdeps: error: couldn’t find library libquazip.so.1 needed by debian/demoapp/usr/bin/DemoApp1 (ELF format: ‘elf64-x86-64’; RPATH: ‘’)
    dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/demoapp/usr/bin/DemoApp1 was not linked against libz.so.1 (it uses none of the library’s symbols)

    dpkg-shlibdeps: error: cannot continue due to the error above
    Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file.
    To help dpkg-shlibdeps find private libraries, you might need to use -l.
    dh_shlibdeps: dpkg-shlibdeps -Tdebian/demoapp.substvars debian/demoapp/usr/bin/DemoApp1 returned exit code 2
    make: *** [binary-predeb-IMPL/demoapp] Error 2
    dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
    debuild: fatal error at line 1364:
    dpkg-buildpackage -rfakeroot -D -us -uc failed

    When I copy the libquazip.so.1 at the path /usr/lib in my machine then I got the below issue
    .

    dpkg-shlibdeps: error: no dependency information found for /usr/lib/libquazip.so.1 (used by debian/demoapp/usr/bin/DemoApp1)
    dh_shlibdeps: dpkg-shlibdeps -Tdebian/demoapp.substvars debian/demoapp/usr/bin/DemoApp1 returned exit code 2
    make: *** [binary-predeb-IMPL/demoapp] Error 2
    dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
    debuild: fatal error at line 1364:
    dpkg-buildpackage -rfakeroot -D -us -uc failed

    My cmakelist.txt file as per below.

    cmake_minimum_required(VERSION 2.8.9)
    project(DemoApp1)
    set (CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} “;/opt/Qt5.2.1/5.2.1/gcc_64/lib/cmake;”)
    find_package(Qt5Widgets REQUIRED)
    include_directories(/home/manojpatidar/Manoj/Work/QT_WORK/Linux_Package/demoapp-1.0/lib/quazip-0.5.1/quazip)
    link_directories(/home/manojpatidar/Manoj/Work/QT_WORK/Linux_Package/demoapp-1.0/lib/quazip-0.5.1)
    add_executable(DemoApp1 main.cpp mainwindow.cpp moc_mainwindow.cpp mainwindow.ui)
    target_link_libraries(DemoApp1 quazip z)
    install(TARGETS DemoApp1 RUNTIME DESTINATION bin)
    qt5_use_modules(DemoApp1 Widgets)

    My Debian control file is as per below .

    Source: demoapp
    Section: games
    Priority: extra
    Maintainer: Manoj Patidar <manojpatidar@cdnsol.com>
    Build-Depends: debhelper (>= 8.0.0), cmake, qtbase5-dev, cdbs
    Standards-Version: 3.9.4
    #Vcs-Git: git://git.debian.org/collab-maint/demoapp.git
    #Vcs-Browser: http://git.debian.org/?p=collab-main....git;a=summary

    Package: demoapp
    Architecture: any
    Depends: ${shlibsepends}, ${miscepends}
    Description: Description
    Description will come here

    I think I need to add some dependencies for quazip at the line “Depends: ${shlibsepends}, ${miscepends}” . Is there anything I have missed ? . Please have look into the issue and let me know where I did wrong.

    Thanks

  2. #2
    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: Issue in QT 5.2.1 app in linking libquazip.so library in making ubuntu .deb packa

    Is this quazip library something you built yourself?

    Cheers,
    _

  3. #3
    Join Date
    Jun 2014
    Posts
    24
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Re: Issue in QT 5.2.1 app in linking libquazip.so library in making ubuntu .deb packa

    Quote Originally Posted by anda_skoa View Post
    Is this quazip library something you built yourself?

    Cheers,
    _
    Thanks for you reply.
    Yes I built this quazip library and put the required .so files at the right path. It is working fine and unzip the zip files when I run the app in QT simulator but got the issue when I tried to make the .deb package of the app.

    Path of quazip libs in .pro file as per below.

    LIBS += -L$$PWD/lib/quazip-0.5.1/ -lquazip
    INCLUDEPATH += $$PWD/lib/quazip-0.5.1/quazip/
    DEPENDPATH += $$PWD/lib/quazip-0.5.1/quazip/

    And path of zlib libs in .pro file as per below.

    LIBS += -L$$PWD/lib/zlib/lib/ -lz
    INCLUDEPATH += $$PWD/lib/zlib/include/

  4. #4
    Join Date
    Jun 2014
    Posts
    24
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Re: Issue in QT 5.2.1 app in linking libquazip.so library in making ubuntu .deb packa

    Can anyone please let me know how can I add quazip build dependency in debian control file at the line Build-Depends: and Depends: like quazip-0.5.1 (>=0.5.1) ? I am using quazip-0.5.1. I think I have missed to add this in control file.
    Last edited by manojpatidar; 21st June 2014 at 09:49.

  5. #5
    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: Issue in QT 5.2.1 app in linking libquazip.so library in making ubuntu .deb packa

    If you build it yourself it should be part of your package.

    Debian package dependencies are for libraries that are from other Debian packages.

    Cheers,
    _

  6. #6
    Join Date
    Jun 2014
    Posts
    24
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Re: Issue in QT 5.2.1 app in linking libquazip.so library in making ubuntu .deb packa

    Thanks for your quick reply.

    Yes the quazip is part of my package . Please have a look on my above thread in which I have mentioned the path of quazip in the .pro file and in cmakelist.txt.
    If quazip is part of my package the why I am gettng the above issue during the packaging of the app ? Any idea ?
    If you want any other thing from me then please let me know.

  7. #7
    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: Issue in QT 5.2.1 app in linking libquazip.so library in making ubuntu .deb packa

    Ok, does your make and make install process correctly create and install the library?

    Cheers,
    _

  8. #8
    Join Date
    Jun 2014
    Posts
    24
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Re: Issue in QT 5.2.1 app in linking libquazip.so library in making ubuntu .deb packa

    Quote Originally Posted by anda_skoa View Post
    Ok, does your make and make install process correctly create and install the library?

    Cheers,
    _
    Thanks, for your reply. Yes I have make and make install the quazip-0.6.2 corretly on 2 days before (on saturday). Header files are installed at the path /include/quazip/ path and .so files are installed at the path /usr/lib/. Till yet I was taking reference of quazip version 0.5.1 but now I will take the reference of new version 0.6.2.

  9. #9
    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: Issue in QT 5.2.1 app in linking libquazip.so library in making ubuntu .deb packa

    Do you build and install quazip as part of your program or do you intend to package it separately into its on .deb?

    Cheers,
    _

  10. #10
    Join Date
    Jun 2014
    Posts
    24
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Re: Issue in QT 5.2.1 app in linking libquazip.so library in making ubuntu .deb packa

    Quote Originally Posted by anda_skoa View Post
    Do you build and install quazip as part of your program or do you intend to package it separately into its on .deb?

    Cheers,
    _
    First I installed the quazip into my machine then I put the quazip binary source folder in my QT applcation folder. Then I build the quazip libtatry into QT creator and put the built .so files at the right path into the quazip QT project.

    Then I included the them in my QT app in .pro file like below.

    LIBS += -L$$PWD/lib/quazip-0.6.2/ -lquazip
    INCLUDEPATH += $$PWD/lib/quazip--0.6.2/quazip/
    DEPENDPATH += $$PWD/lib/quazip--0.6.2/quazip/

    And path of zlib libs in .pro file as per below.

    LIBS += -L$$PWD/lib/zlib/lib/ -lz
    INCLUDEPATH += $$PWD/lib/zlib/include/

    the I run the QT app in simulator successfully. After that I made the debian package by copyig the whole all files and folders of the QT app which also contain the quazip binary package.


    Added after 40 minutes:


    One more thing I want to share with you that When cmake takes the reference to the my debian package's quazip header files and .so files then app can extract the zip files successfully when I run the app from the cmake by command lline but got the above issue (dpkg-shlibdeps: error: no dependency information found for /usr/lib/libquazip.so.1 (used by debian/demoapp/usr/bin/DemoApp1)) during making .deb package.

    And one more case when cmake takes the reference to the my machine's (Which I installed ) quazip header files and installed .so files then app unable extract the zip files I run the app from the cmake by command lline and but did not get the above issue (dpkg-shlibdeps: error: no dependency information found for /usr/lib/libquazip.so.1 (used by debian/demoapp/usr/bin/DemoApp1)) and made the .deb package successfully. But when installed the app by .deb package and run the app then in this case app can not extract the zip files and app crashes.

    So If I get success in one case the another fails and vice-versa.
    Last edited by manojpatidar; 23rd June 2014 at 08:44.

  11. #11
    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: Issue in QT 5.2.1 app in linking libquazip.so library in making ubuntu .deb packa

    The Debian packaking tools, as far as I understand, track which files get installed to the fake root when installing the package's sources.

    So the convenient way to incorporate libraries is to build and install them as part of the package.

    You could try to do that by making quazip a sub project of your application.

    Anyway, this is clearly beyond Qt, you'll find more suitable help on a Debian/Ubuntu developer channel.

    Cheers,
    _

  12. #12
    Join Date
    Jun 2014
    Posts
    24
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Re: Issue in QT 5.2.1 app in linking libquazip.so library in making ubuntu .deb packa

    Quote Originally Posted by anda_skoa View Post
    The Debian packaking tools, as far as I understand, track which files get installed to the fake root when installing the package's sources.

    So the convenient way to incorporate libraries is to build and install them as part of the package.

    You could try to do that by making quazip a sub project of your application.

    Anyway, this is clearly beyond Qt, you'll find more suitable help on a Debian/Ubuntu developer channel.

    Cheers,
    _
    Quazip is already a sub project of my application and I build the quazip .so files by running this quazip project into QT creator and then I referenced this .so file in my QT app. BTW have you read my above recent post which describe the cases, I faced.

    I have asked the same issue on below links also but still I did not get any help.

    http://stackoverflow.com/questions/2...ng-deb-package
    http://askubuntu.com/questions/48592...ng-deb-package
    http://qt-project.org/forums/viewthread/44029/

    Can you please send me the ubuntu/debian forum link where I can post this debian package related issue ?

    Thanks for your cooperation.
    Last edited by manojpatidar; 23rd June 2014 at 09:19.

  13. #13
    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: Issue in QT 5.2.1 app in linking libquazip.so library in making ubuntu .deb packa

    Quote Originally Posted by manojpatidar View Post
    Quazip is already a sub project of my application and I build the quazip .so files by running this quazip project into QT creator and then I referenced this .so file in my QT app.
    Ah. Your phrasing suggested that you build quazip separately and then manually copy the headers and .so files which of course is something entirely different.

    Your other error seems to come from a previous installation attempt. It finds /usr/lib/libquazip.so.1 and can't locate which package it came from.
    Have you tried without any previous version of your package being installed? This should make sure that there is no /usr/lib/libquazip.so.1

    Also make sure that you don't have accidentally copied that file manually. The packaging process should only pick up libraries from /usr/lib that have been installed by other packages.

    Quote Originally Posted by manojpatidar View Post
    Can you please send me the ubuntu/debian forum link where I post this debian package related issue ? Thanks for your coordination.
    I don't know, but this could be appropriate: http://ubuntuforums.org/forumdisplay.php?f=310

    Cheers,
    _

  14. #14
    Join Date
    Jun 2014
    Posts
    24
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Re: Issue in QT 5.2.1 app in linking libquazip.so library in making ubuntu .deb packa

    Quote Originally Posted by anda_skoa View Post
    Ah. Your phrasing suggested that you build quazip separately and then manually copy the headers and .so files which of course is something entirely different.
    _
    Yes I have build separately. Can you please let me know I need to refer the these separately builded .so library or the libs which I installed at the path /libs/ ( not the usr/libs) in my machine

    Quote Originally Posted by anda_skoa View Post
    Your other error seems to come from a previous installation attempt. It finds /usr/lib/libquazip.so.1 and can't locate which package it came from.
    _
    In this case I have manuully copied this libquazip.so.1 at this path from the separately builded .so library path.

    Quote Originally Posted by anda_skoa View Post
    Have you tried without any previous version of your package being installed? This should make sure that there is no /usr/lib/libquazip.so.1
    _
    Yes I have tried for this and got the same issue. I have deleted the libs /usr/lib/libquazip.so.1 which I have copied manually. Still getting the same issue.

    Quote Originally Posted by anda_skoa View Post
    Also make sure that you don't have accidentally copied that file manually. The packaging process should only pick up libraries from /usr/lib that have been installed by other packages.
    _
    Ok I will not copy this manually. My quazip libs are installed at the path /lib/ and not at the usr/lib.

    Quote Originally Posted by anda_skoa View Post
    I don't know, but this could be appropriate: http://ubuntuforums.org/forumdisplay.php?f=310
    Cheers,
    _
    Thanks for the link.

  15. #15
    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: Issue in QT 5.2.1 app in linking libquazip.so library in making ubuntu .deb packa

    Quote Originally Posted by manojpatidar View Post
    Yes I have build separately.
    You could try building as part of your project.
    A lot of programs have their own libraries so the tools should be able to deal with that.

    Quote Originally Posted by manojpatidar View Post
    Can you please let me know I need to refer the these separately builded .so library or the libs which I installed at the path /libs/ ( not the usr/libs) in my machine
    An important step is to make sure that the launcher script sets LD_LIBRARY_PATH correctly, so the the lib path is found by the runtime linker.

    Quote Originally Posted by manojpatidar View Post
    In this case I have manuully copied this libquazip.so.1 at this path from the separately builded .so library path.
    Never manually copy something into /usr/, this path is basically reserved for them system's installation mechanism. In this case DPKG.

    Cheers,
    _

  16. #16
    Join Date
    Jun 2014
    Posts
    24
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Re: Issue in QT 5.2.1 app in linking libquazip.so library in making ubuntu .deb packa

    After done a lot R&D I found that (If I am not wrong) that dynamic linker can not search the libquazip.so.1 into the machine.
    Because it searches by default in path /lib the usr/lib and I deleted libquazip.so from these paths ( at which I installed by mannually before).

    So I think the solution is that I need to link this third party shared library by using -rpath and $ORIGIN . But I do not know how exactly I can link libquazip.so.1 third party shared library to the -rpath by using $ORIGIN variable.

    I have go through the below links for the same but could not get the succees.

    http://stackoverflow.com/questions/6...rary-recursive
    http://stackoverflow.com/questions/6...ion-rpath-with
    http://serverfault.com/questions/279...the-executable
    http://doc.qt.digia.com/qq/qq11-unix-deployment.html

    Please have look into the issue and suggest me what should I do to resolve the issue ?

    Thanks,

  17. #17
    Join Date
    Jun 2014
    Posts
    24
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default dpkg-shlibdeps: error: couldn't find library libquazip.so.1

    I am getting the below error during making the .deb package of the QT 5.2.1 app .

    dpkg-shlibdeps: error: couldn't find library libquazip.so.1 needed by debian/demoapp/usr/bin/DemoApp1 (ELF format: 'elf64-x86-64'; RPATH: '')
    dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/demoapp/usr/bin/DemoApp1 was not linked against libz.so.1 (it uses none of the library's symbols)
    dpkg-shlibdeps: error: cannot continue due to the error above
    Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file.
    To help dpkg-shlibdeps find private libraries, you might need to use -l.
    dh_shlibdeps: dpkg-shlibdeps -Tdebian/demoapp.substvars debian/demoapp/usr/bin/DemoApp1 returned exit code 2
    make: *** [binary-predeb-IMPL/demoapp] Error 2
    dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
    debuild: fatal error at line 1364:
    dpkg-buildpackage -rfakeroot -D -us -uc failed

    After done a lot R&D I found that (If I am not wrong) that dynamic linker can not search the libquazip.so.1 into the machine.
    Because it searches by default in path /lib the usr/lib and I deleted libquazip.so from these paths ( at which I installed by mannually before).

    So I think the solution is that I need to link this third party shared library by using -rpath and $ORIGIN . But I do not know how exactly I can link libquazip.so.1 third party shared library to the -rpath by using $ORIGIN variable.

    I have go through the below links for the same but could not get the succees.

    http://stackoverflow.com/questions/6...rary-recursive
    http://stackoverflow.com/questions/6...ion-rpath-with
    http://serverfault.com/questions/279...the-executable
    http://serverfault.com/questions/279...the-executable
    http://doc.qt.digia.com/qq/qq11-unix-deployment.html

    Please have look into the issue and suggest me what should I do to resolve the issue ?

    Thanks,

Similar Threads

  1. Getting issue in making .deb package of QT 5.2.1 app to deploy on Ubuntu 14.04
    By manojpatidar in forum Installation and Deployment
    Replies: 1
    Last Post: 17th June 2014, 07:14
  2. Replies: 1
    Last Post: 19th October 2012, 02:11
  3. making installation package for windows
    By manmohan in forum Qt Programming
    Replies: 0
    Last Post: 5th May 2010, 05:57
  4. (In-)official Debian/Ubuntu Qt 4.5 package?
    By BastiBense in forum Installation and Deployment
    Replies: 0
    Last Post: 11th March 2009, 10:47
  5. QT4 build debian/ubuntu package 4.2
    By patrik08 in forum Installation and Deployment
    Replies: 3
    Last Post: 21st September 2006, 08:01

Tags for this Thread

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.