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. Qt 5.11 static on Linux, network problem

Qt 5.11 static on Linux, network problem

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 1.1k 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.
  • L Offline
    L Offline
    luca
    wrote on last edited by
    #1

    Hi all,
    I built Qt 5.11 for linux statically with:

    ./configure -static -release -openssl-linked -no-xcb -nomake tests -nomake examples -skip qtwebengine -prefix /opt/qt5111-static -no-opengl
    

    It built without problem and I can build my app using the static Qt but I have problems when the application try to connect to remote server using:

    QTcpSocket::connectToHost()
    

    the application crashes while it works fine using dynamic Qt link version.
    Running the app with gdb I get:

    [2018-07-17 17:19:11] Debug:    QAbstractSocket::HostLookupState
    [New Thread 0x7ffff6d65700 (LWP 11891)]
    
    Thread 3 "Thread (pooled)" received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x7ffff6d65700 (LWP 11891)]
    0x00007ffff79925e8 in __GI___inet_aton (cp=0x7ffff6d62717 "\n", cp@entry=0x7ffff6d6270b "172.28.172.1\n", addr=addr@entry=0x7ffff6d626e4) at inet_addr.c:158
    158     inet_addr.c: No such file or directory.
    

    It seems static Qt version doesn't link correctly some network system library.

    Where do I wrong?

    Thanks

    1 Reply Last reply
    0
    • L Offline
      L Offline
      luca
      wrote on last edited by
      #2

      EDIT:
      it seems that using an ip address works fine while using a "name" doesn't works. (with static Qt)

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

        Hi,

        Did you check with ldd if you have something unusual ?
        What do you have in the plugins folder of your static Qt build ?

        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
        • L Offline
          L Offline
          luca
          wrote on last edited by
          #4

          Hi,
          I don't think it's related to plugins because it works if I try to connect to a server using an IP address while it crashes if I tra to connect using a server name (for example www.google.it) .
          Being a static build, ldd give me no result as expected.

          I'm considering it could be a BUG but I'd like to be sure before creating an issue on bugreport.

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

            I'm thinking about the bearer plugin that might have an influence.

            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
            1
            • L Offline
              L Offline
              luca
              wrote on last edited by aha_1980
              #6

              I've opened an issue because I found a way to reproduce the problem.
              https://bugreports.qt.io/browse/QTBUG-69513

              1 Reply Last reply
              1

              • Login

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