Qt 5.11 static on Linux, network problem
-
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
-
Hi,
Did you check with
ldd
if you have something unusual ?
What do you have in the plugins folder of your static Qt build ? -
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.
-
I'm thinking about the bearer plugin that might have an influence.
-
I've opened an issue because I found a way to reproduce the problem.
https://bugreports.qt.io/browse/QTBUG-69513