dannagle / PacketSender

Network utility for sending / receiving TCP, UDP, SSL, HTTP
https://packetsender.com
GNU General Public License v2.0
2.3k stars 360 forks source link

[Request] 32bit Linux command line #119

Closed frakman1 closed 5 years ago

frakman1 commented 5 years ago

What OS?

Description of issue

I would love to use this tool, however, my development is almost always on a 32-bit Linux machine. This particular one is:

$uname -a
Linux kubuntu14 4.4.0-59-generic #80~14.04.1-Ubuntu SMP Fri Jan 6 18:02:23 UTC 2017 i686 i686 i686 GNU/Linux

I tried to compile from source but the version of qmake and Qt were too old. I don't really need the whole GUI. Just the command line version will do, so perhaps it can be compiled without QT if there is an option for that.

The binary you provide for Linux is only for 64bit machines. Would you kindly provide a 32bit version of your excellent tool?

Thank you.

dannagle commented 5 years ago

Removing Qt would be very difficult, even for just command line.

What version Qt and qmake do you have?

qmake --version

I don't have the bandwidth to support 32-bit Linux officially. You could possibly go back in time in the repo and find a version you can compile.

The command line version uses semi-recent command-line functions (QCommandLineParser from Qt 5.2, late 2016) and may lose some useful functionality if you go back too far. However, perhaps even the extra-old will be good enough for you.

You could also try to upgrade Qt directly: https://www.qt.io/download-thank-you?os=linux32

frakman1 commented 5 years ago

Thank you for writing back Dan. It's too bad the command-line tool is not available as a stand-alone utility.

Here's some information you requested :

$qmake --version
QMake version 3.0
Using Qt version 5.2.1 in /usr/lib/i386-linux-gnu
$cmake --version
cmake version 2.8.12.2

(various QT related packages):
qt4-linguist-tools/trusty-updates,trusty-security,now 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 i386 [installed,automatic]
qt4-qmake/trusty-updates,trusty-security,now 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 i386 [installed,automatic]
qt5-default/trusty-updates,trusty-security,now 5.2.1+dfsg-1ubuntu14.3 i386 [installed]
qt5-qmake/trusty-updates,trusty-security,now 5.2.1+dfsg-1ubuntu14.3 i386 [installed,automatic]
qtbase5-dev/trusty-updates,trusty-security,now 5.2.1+dfsg-1ubuntu14.3 i386 [installed,automatic]
qtbase5-dev-tools/trusty-updates,trusty-security,now 5.2.1+dfsg-1ubuntu14.3 i386 [installed,automatic]
qtchooser/trusty,now 39-g4717841-3 i386 [installed,automatic]
qtcore4-l10n/trusty-updates,trusty-security,now 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 all [installed,automatic]
dannagle commented 5 years ago

That should be recent enough to compile the command-line version.

Clone or download the repo. Then...

cd src/
qmake PacketSenderCLI.pro
make

Note that qmake generates Makefile and result needs make (not cmake). Where is it failing? Perhaps some extra stuff could be commented out (like the more recent SSL stuff).

frakman1 commented 5 years ago

Ahh, the parameter to qmake was what I was missing. I tried it but now it complains about a missing header file.:

$cd src
$qmake PacketSenderCLI.pro
$make
/usr/lib/i386-linux-gnu/qt5/bin/uic mainwindow.ui -o ui_mainwindow.h
mainwindow.ui: Warning: The name 'layoutWidget' (QWidget) is already in use, defaulting to 'layoutWidget1'.
/usr/lib/i386-linux-gnu/qt5/bin/uic brucethepoodle.ui -o ui_brucethepoodle.h
/usr/lib/i386-linux-gnu/qt5/bin/uic persistentconnection.ui -o ui_persistentconnection.h
/usr/lib/i386-linux-gnu/qt5/bin/uic settings.ui -o ui_settings.h
settings.ui: Warning: The name 'horizontalLayout_12' (QHBoxLayout) is already in use, defaulting to 'horizontalLayout_121'.
/usr/lib/i386-linux-gnu/qt5/bin/uic about.ui -o ui_about.h
/usr/lib/i386-linux-gnu/qt5/bin/uic subnetcalc.ui -o ui_subnetcalc.h
/usr/lib/i386-linux-gnu/qt5/bin/uic cloudui.ui -o ui_cloudui.h
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/i386-linux-gnu/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -I. -o main.o main.cpp
main.cpp:18:26: fatal error: QDeadlineTimer: No such file or directory
 #include <QDeadlineTimer>
                          ^
compilation terminated.
make: *** [main.o] Error 1
dannagle commented 5 years ago

QDeadlineTimer is Qt 5.8, which you don't have. I added it to the code as a bug fix to the timeout calculation for receiving TCP responses. My old timing method had a flaw that caused the CLI to occasionally hang.

If that fix is not critical to you, you can try using the older main.cpp that used timers: https://raw.githubusercontent.com/dannagle/PacketSender/1d9ead72f26c35ea069a15bce8f5eeb1f0cb8263/src/main.cpp

frakman1 commented 5 years ago

Thank you!

I got a little further. I first ran into this error:

$make
/usr/lib/i386-linux-gnu/qt5/bin/uic mainwindow.ui -o ui_mainwindow.h
mainwindow.ui: Warning: The name 'layoutWidget' (QWidget) is already in use, defaulting to 'layoutWidget1'.
/usr/lib/i386-linux-gnu/qt5/bin/uic brucethepoodle.ui -o ui_brucethepoodle.h
/usr/lib/i386-linux-gnu/qt5/bin/uic persistentconnection.ui -o ui_persistentconnection.h
/usr/lib/i386-linux-gnu/qt5/bin/uic settings.ui -o ui_settings.h
settings.ui: Warning: The name 'horizontalLayout_12' (QHBoxLayout) is already in use, defaulting to 'horizontalLayout_121'.
/usr/lib/i386-linux-gnu/qt5/bin/uic about.ui -o ui_about.h
/usr/lib/i386-linux-gnu/qt5/bin/uic subnetcalc.ui -o ui_subnetcalc.h
/usr/lib/i386-linux-gnu/qt5/bin/uic cloudui.ui -o ui_cloudui.h
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/i386-linux-gnu/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -I. -o main.o main.cpp
In file included from packetnetwork.h:31:0,
                 from mainwindow.h:26,
                 from main.cpp:19:
./threadedtcpserver.h:15:9: warning: identifier ‘nullptr’ is a keyword in C++11 [-Wc++0x-compat]
         explicit ThreadedTCPServer(QObject *parent = nullptr);
         ^
./threadedtcpserver.h:15:54: error: ‘nullptr’ was not declared in this scope
         explicit ThreadedTCPServer(QObject *parent = nullptr);
                                                      ^
main.cpp: In function ‘int main(int, char**)’:
main.cpp:122:35: error: ‘sslLibraryBuildVersionString’ is not a member of ‘QSslSocket’
             versionBuilder.append(QSslSocket::sslLibraryBuildVersionString());
                                   ^
main.cpp:382:58: error: ‘sslLibraryBuildVersionString’ is not a member of ‘QSslSocket’
             OUTIF() << "The expected SSL version is " << QSslSocket::sslLibraryBuildVersionString();
                                                          ^
main.cpp:521:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 while (now.elapsed() <= wait && (sock.state() == QAbstractSocket::ConnectedState)) {
                                         ^
main.cpp:597:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             while (now.elapsed() <= wait) {
                                     ^
make: *** [main.o] Error 1

... and noticed that it was addressed in this issue

I then ran into this error:

$make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/i386-linux-gnu/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -I. -o main.o main.cpp
main.cpp: In function ‘int main(int, char**)’:
main.cpp:122:35: error: ‘sslLibraryBuildVersionString’ is not a member of ‘QSslSocket’
             versionBuilder.append(QSslSocket::sslLibraryBuildVersionString());
                                   ^
main.cpp:382:58: error: ‘sslLibraryBuildVersionString’ is not a member of ‘QSslSocket’
             OUTIF() << "The expected SSL version is " << QSslSocket::sslLibraryBuildVersionString();
                                                          ^
main.cpp:521:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 while (now.elapsed() <= wait && (sock.state() == QAbstractSocket::ConnectedState)) {
                                         ^
main.cpp:597:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             while (now.elapsed() <= wait) {
                                     ^
make: *** [main.o] Error 1

... so I just changed it to a static string because I don't really care about the version number.

Then, I got this error:

$make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/i386-linux-gnu/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -I. -o main.o main.cpp
main.cpp: In function ‘int main(int, char**)’:
main.cpp:521:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 while (now.elapsed() <= wait && (sock.state() == QAbstractSocket::ConnectedState)) {
                                         ^
main.cpp:597:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             while (now.elapsed() <= wait) {
                                     ^
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/i386-linux-gnu/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -I. -o mainwindow.o mainwindow.cpp
mainwindow.cpp:998:6: warning: unused parameter ‘sessionPacket’ [-Wunused-parameter]
 void MainWindow::saveSession(Packet sessionPacket)
      ^
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/i386-linux-gnu/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -I. -o packetnetwork.o packetnetwork.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/i386-linux-gnu/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -I. -o packet.o packet.cpp
packet.cpp: In static member function ‘static QString Packet::byteArrayToHex(QByteArray)’:
packet.cpp:461:42: error: no matching function for call to ‘QString::resize(int, char)’
     returnString.resize(datasize * 3, ' ');
                                          ^
packet.cpp:461:42: note: candidate is:
In file included from /usr/include/qt5/QtCore/qobject.h:49:0,
                 from /usr/include/qt5/QtCore/QObject:1,
                 from packet.h:13,
                 from packet.cpp:11:
/usr/include/qt5/QtCore/qstring.h:237:10: note: void QString::resize(int)
     void resize(int size);
          ^
/usr/include/qt5/QtCore/qstring.h:237:10: note:   candidate expects 1 argument, 2 provided
make: *** [packet.o] Error 1

... which looks like another older Qt incompatibility.

So I tried changing it to this (which I think is the intent):

    returnString.resize(datasize * 3);
    returnString = ' ';

and then ran into this error:

g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/i386-linux-gnu/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -I. -o tcpthread.o tcpthread.cpp
tcpthread.cpp: In member function ‘virtual void TCPThread::run()’:
tcpthread.cpp:535:93: error: ‘qEnvironmentVariableIntValue’ was not declared in this scope
         const int env = qEnvironmentVariableIntValue("QT_SSL_USE_TEMPORARY_KEYCHAIN", &envOk);
                                                                                             ^
make: *** [tcpthread.o] Error 1

I tried a bunch of things before settling on this (which is probably wrong):

const int env = qgetenv("QT_SSL_USE_TEMPORARY_KEYCHAIN").toHex().toInt(&envOk, 16);

Now, I get this error:

$make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/i386-linux-gnu/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -I. -o tcpthread.o tcpthread.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/i386-linux-gnu/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -I. -o persistentconnection.o persistentconnection.cpp
persistentconnection.cpp: In member function ‘void PersistentConnection::on_sendFileButton_clicked()’:
persistentconnection.cpp:473:17: warning: unused variable ‘showWarning’ [-Wunused-variable]
     static bool showWarning = true;
                 ^
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/i386-linux-gnu/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -I. -o settings.o settings.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/i386-linux-gnu/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -I. -o about.o about.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/i386-linux-gnu/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -I. -o subnetcalc.o subnetcalc.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/i386-linux-gnu/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -I. -o threadedtcpserver.o threadedtcpserver.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/i386-linux-gnu/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -I. -o cloudui.o cloudui.cpp
In file included from cloudui.cpp:1:0:
cloudui.h:73:21: error: ‘QUrlQuery’ has not been declared
         void doPost(QUrlQuery postData);
                     ^
cloudui.cpp: In member function ‘void CloudUI::on_loginButton_clicked()’:
cloudui.cpp:358:20: error: no matching function for call to ‘CloudUI::doPost(QUrlQuery&)’
     doPost(postData);
                    ^
cloudui.cpp:358:20: note: candidate is:
In file included from cloudui.cpp:1:0:
cloudui.h:73:14: note: void CloudUI::doPost(int)
         void doPost(QUrlQuery postData);
              ^
cloudui.h:73:14: note:   no known conversion for argument 1 from ‘QUrlQuery’ to ‘int’
cloudui.cpp: At global scope:
cloudui.cpp:363:6: error: prototype for ‘void CloudUI::doPost(QUrlQuery)’ does not match any in class ‘CloudUI’
 void CloudUI::doPost(QUrlQuery postData)
      ^
In file included from cloudui.cpp:1:0:
cloudui.h:73:14: error: candidate is: void CloudUI::doPost(int)
         void doPost(QUrlQuery postData);
              ^
cloudui.cpp: In member function ‘void CloudUI::on_saveToCloudButton_clicked()’:
cloudui.cpp:406:20: error: no matching function for call to ‘CloudUI::doPost(QUrlQuery&)’
     doPost(postData);
                    ^
cloudui.cpp:406:20: note: candidate is:
In file included from cloudui.cpp:1:0:
cloudui.h:73:14: note: void CloudUI::doPost(int)
         void doPost(QUrlQuery postData);
              ^
cloudui.h:73:14: note:   no known conversion for argument 1 from ‘QUrlQuery’ to ‘int’
cloudui.cpp: At global scope:
cloudui.cpp:451:6: warning: unused parameter ‘checked’ [-Wunused-parameter]
 void CloudUI::on_makePublicCheck_clicked(bool checked)
      ^
cloudui.cpp: In member function ‘void CloudUI::on_deletePacketButton_clicked()’:
cloudui.cpp:535:24: error: no matching function for call to ‘CloudUI::doPost(QUrlQuery&)’
         doPost(postData);
                        ^
cloudui.cpp:535:24: note: candidate is:
In file included from cloudui.cpp:1:0:
cloudui.h:73:14: note: void CloudUI::doPost(int)
         void doPost(QUrlQuery postData);
              ^
cloudui.h:73:14: note:   no known conversion for argument 1 from ‘QUrlQuery’ to ‘int’
make: *** [cloudui.o] Error 1

At that point, I gave up as I really don't know anything about Qt. Do you think this is something that I can also get around?

dannagle commented 5 years ago

QString::resize was introduced in Qt 5.7. You said are running Qt 5.2.

You will need a workaround for that function. Here is a git blame to help you find the old way I did it: ee1ebaf7 (Dan Nagle 2017-10-05 14:08:32 -0500 461) returnString.resize(datasize * 3, ' ');

Afterwards, you can start aggressively deleting large chunks of GUI code (like CloudUI). I thought I had that stuff isolated with the PacketSenderCLI.pro versus PacketSender.pro files, but maybe I did not. You can purge SSL code too if that is causing you problems too.

I did not realize how deep this rabbit hole was going to go. You may want to start rolling back the entire project with my older releases: https://github.com/dannagle/PacketSender/releases

You may not find a version that cleanly builds. My very first open source release was in 2015 using Qt 5.4. It is possible that I did not using anything particular from Qt 5.4, but I don't know. It may not be too difficult to isolate the CLI by deleting large chunks of GUI code until it compiles.

frakman1 commented 5 years ago

Thank you for writing back and for the suggestions. I think I should try to manually update my Qt. I used the link you sent earlier and installed version 5.5 (the latest it allowed) using the GUI. Now that it is installed, how do I point to the new installation. qmake --version still points to the old one (5.2)

frakman1 commented 5 years ago

OK. I reverted to this point in time (just before some major ssl work)

I also tried to build it with the Qt IDE for the first time. Miraculously, it worked! I zipped it and put it on my github page here. Is it naïve of me to think that the binary will run on another Linux 32bit machine as-is, or does it need supporting libraries etc?

frakman1 commented 5 years ago

Update Although I didn't change the path, I learned that the new one was installed to: /home/username/Qt/5.5/gcc/bin/qmake

I also learned that the QT IDE GUI lets me choose the Qt version when I opened thePacketSender.pro file. That's how I was able to compile it correctly

Finally, I learned that using readelf -d PacketSender shows me the dependencies:

 0x00000001 (NEEDED)                     Shared library: [libQt5Widgets.so.5]
 0x00000001 (NEEDED)                     Shared library: [libQt5Gui.so.5]
 0x00000001 (NEEDED)                     Shared library: [libQt5Network.so.5]
 0x00000001 (NEEDED)                     Shared library: [libQt5Core.so.5]
 0x00000001 (NEEDED)                     Shared library: [libstdc++.so.6]
 0x00000001 (NEEDED)                     Shared library: [libgcc_s.so.1]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]

I wonder if there is a way to build using the IDE that compiles everything into the binary (i.e make it a fat binary with statically linked libraries)

dannagle commented 5 years ago

That is very cool you got it to work! Yes, Qt is the only required dependency for Packet Sender. That was intentional. Fewer dependencies makes setting up compilers easier.

Yes, you can compile Qt to statically link everything. I did this once on Windows with my (aging) Cryptoknife project and decided a directory of DLLs is a lot easier to maintain. The app launches faster when using DLLs too. I have not bothered to static-link on Linux since the AppImage method seems to work well enough for most, and the source code is available if it doesn't.