dannagle / PacketSender

Network utility for sending / receiving TCP, UDP, SSL, HTTP

Home Page:https://packetsender.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Can't build in Debian with GCC 11

eribertomota opened this issue · comments

What OS?

  • Windows
  • Mac
  • Linux (Which distro?) Debian
  • iOS (phone or ipad?)
  • Android (phone or tablet?)

Description of issue

When trying to build version 7.2.3 in Debian Sid with GCC 11, I got the following errors:

/usr/bin/c++ -g -O2 -ffile-prefix-map=/PKGS/packetsender/packetsender=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now -rdynamic CMakeFiles/PacketSender.dir/PacketSender_autogen/mocs_compilation.cpp.o CMakeFiles/PacketSender.dir/qrc_packetsender.cpp.o CMakeFiles/PacketSender.dir/moc_about.cpp.o CMakeFiles/PacketSender.dir/moc_brucethepoodle.cpp.o CMakeFiles/PacketSender.dir/moc_mainwindow.cpp.o CMakeFiles/PacketSender.dir/moc_persistentconnection.cpp.o CMakeFiles/PacketSender.dir/moc_settings.cpp.o CMakeFiles/PacketSender.dir/moc_udpflooding.cpp.o CMakeFiles/PacketSender.dir/about.cpp.o CMakeFiles/PacketSender.dir/brucethepoodle.cpp.o CMakeFiles/PacketSender.dir/cloudui.cpp.o CMakeFiles/PacketSender.dir/main.cpp.o CMakeFiles/PacketSender.dir/mainwindow.cpp.o CMakeFiles/PacketSender.dir/multicastsetup.cpp.o CMakeFiles/PacketSender.dir/packet.cpp.o CMakeFiles/PacketSender.dir/packetlogmodel.cpp.o CMakeFiles/PacketSender.dir/packetnetwork.cpp.o CMakeFiles/PacketSender.dir/persistentconnection.cpp.o CMakeFiles/PacketSender.dir/sendpacketbutton.cpp.o CMakeFiles/PacketSender.dir/settings.cpp.o CMakeFiles/PacketSender.dir/subnetcalc.cpp.o CMakeFiles/PacketSender.dir/tcpthread.cpp.o CMakeFiles/PacketSender.dir/threadedtcpserver.cpp.o CMakeFiles/PacketSender.dir/udpflooding.cpp.o -o PacketSender  /usr/lib/x86_64-linux-gnu/libQt5Network.so.5.15.2 /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.2 /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.15.2 /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.2 
/usr/bin/ld: CMakeFiles/PacketSender.dir/mainwindow.cpp.o: in function `MainWindow::on_genPostDataButton_clicked()':
./obj-x86_64-linux-gnu/./src/mainwindow.cpp:2485: undefined reference to `PostDataGen::PostDataGen(QWidget*, QString)'
/usr/bin/ld: ./obj-x86_64-linux-gnu/./src/mainwindow.cpp:2488: undefined reference to `PostDataGen::postGenerated(QString)'
/usr/bin/ld: CMakeFiles/PacketSender.dir/mainwindow.cpp.o: in function `MainWindow::on_genPostDataButton_clicked()':
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:347: undefined reference to `PostDataGen::staticMetaObject'
/usr/bin/ld: CMakeFiles/PacketSender.dir/mainwindow.cpp.o: in function `MainWindow::on_actionPanel_Generator_triggered()':
./obj-x86_64-linux-gnu/./src/mainwindow.cpp:2544: undefined reference to `PanelGenerator::PanelGenerator(QWidget*)'
/usr/bin/ld: ./obj-x86_64-linux-gnu/./src/mainwindow.cpp:2545: undefined reference to `PanelGenerator::initAutoLaunchOrEditMode()'
/usr/bin/ld: CMakeFiles/PacketSender.dir/mainwindow.cpp.o: in function `MainWindow::on_generatePanelButton_clicked()':
./obj-x86_64-linux-gnu/./src/mainwindow.cpp:2532: undefined reference to `PanelGenerator::PanelGenerator(QWidget*)'
/usr/bin/ld: ./obj-x86_64-linux-gnu/./src/mainwindow.cpp:2538: undefined reference to `PanelGenerator::init(QList<Packet>)'
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/PacketSender.dir/build.make:570: PacketSender] Error 1
make[3]: Leaving directory '/PKGS/packetsender/packetsender/obj-x86_64-linux-gnu'
make[2]: *** [CMakeFiles/Makefile2:99: CMakeFiles/PacketSender.dir/all] Error 2
make[2]: Leaving directory '/PKGS/packetsender/packetsender/obj-x86_64-linux-gnu'
make[1]: *** [Makefile:174: all] Error 2
make[1]: Leaving directory '/PKGS/packetsender/packetsender/obj-x86_64-linux-gnu'

Is it a source code fail or a mistake of mine?

Thanks in advance.

I added some big updates to the development branch.

It is probably one or both of these...

  • A panel building system was added (which means new source files, such as panelgenerator.*, postdatagen.*, etc )
  • I had to move a couple things around to make the Ubuntu snap CI/CD system happy. It is possible I fixed the snap build but broken something on Debian. It'd be great if I could support both.

Sorry if one of those disrupted the workflow.

Do you intend fix it soon?

I can try. It may be a week before I can get to it. If I get it to pass the CI pipeline that you added with the PR, will that fix this issue?

Sure! If the pipeline works, all Linux will be able to build your code. Thanks!

Ah, the CI tests works for branches too. You can start a branch for test and delete it after find a solution, to make a new branch with a more clean work.

This looks completely isolated from what I am trying to do in development. I may add it directly to development and then fork another branch from there to fix it. It could be a week or so before I have time.

No problem for me.

Hi @dannagle,

The 8.0.9 version builds fine. I will close this issue.

Thanks a log for your work.