Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-69513

dlopen using static Qt causes segmentation fault

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P4: Low P4: Low
    • None
    • 5.6, 5.11
    • Build System
    • None
    • Linux/X11

      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.

      It only crash if I connect to a server using a name while using an IP it works fine.

      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.

       

      EDIT:

      It seems dlopen is the problem, look at this comment

        1. teststatic2.tar.gz
          6.85 MB
        2. teststatic.tar.gz
          9.98 MB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            thiago Thiago Macieira
            lucag Luca
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes