Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. macdeployqt for a daemon process
QtWS25 Last Chance

macdeployqt for a daemon process

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 582 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • vivianV Offline
    vivianV Offline
    vivian
    wrote on last edited by
    #1

    I was hoping to create a pkg for a daemon process. I am building a websocket server using the https://doc.qt.io/qt-5/qtwebsockets-sslechoserver-example.html example from the docs.

    When I ran macdeployqt, I got the follwing error.

    | => macdeployqt WebSocketServer
    Empty filename passed to function
    ERROR: Could not find bundle binary for "WebSocketServer"
    ERROR: "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: '': No such file or directory\n"
    ERROR: "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: '': No such file or directory\n"
    ERROR: "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: '': No such file or directory\n"
    WARNING:
    WARNING: Could not find any external Qt frameworks to deploy in "WebSocketServer"
    WARNING: Perhaps macdeployqt was already used on "WebSocketServer" ?
    WARNING: If so, you will need to rebuild "WebSocketServer" before trying again.
    Empty filename passed to function
    ERROR: Could not find bundle binary for "WebSocketServer"
    ERROR: "error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: can't open file:  (No such file or directory)\n"
    ERROR: ""
    

    I assumed that it must be a tool only for a GUI and not exactly a console application.
    Luckily I found the following: https://vincent.bernat.ch/en/blog/2013-autoconf-osx-packaging However, it is not specific to Qt and also I found: https://forum.qt.io/topic/60991/understanding-qt-and-mac-pkg-setups which was a lot more specific to Qt but it just did not work. I do now know how to add resources.

    Any suggestions here? Perhaps similar to windeployqt, macdeployqt will at least pull in all the libraries that need to be packaged perhaps.

    Is there an example of a packaged application of the SSL EchoServer example? Any help is appreciated, please.

    1 Reply Last reply
    0
    • vivianV Offline
      vivianV Offline
      vivian
      wrote on last edited by
      #2

      I think I am able to package this now using the blog post by Vincent.

      Stuck in a slightly different situation.

      So the otool output is the following:

      | => otool -L WebSocketServer
      WebSocketServer:
      	@rpath/QtWebSockets.framework/Versions/5/QtWebSockets (compatibility version 5.12.0, current version 5.12.0)
      	@rpath/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.12.0, current version 5.12.0)
      	@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.12.0, current version 5.12.0)
      	/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
      	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
      	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.4)
      	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5)
      

      I do know I have to copy a few frameworks from Qt while packaging. The thing is while deploying, do I copy this in to the same folder as the daemon?

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        A daemon like you describe has no associated bundle, therefore macdeployqt can't to its job.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved