Wfserver 2.04 build error - redefinition

I have seen others have built a headless wfserver in early January. With the March 10 weekly built (2.04) I am getting a redefinition error on compile. I tried removing the offending definition in servermain.h which got rid of the error but got other errors.

 //Q_DECLARE_METATYPE(udpPreferences)

This is building on a RPi 5 with the latest OS following the headless server page steps.

ux-g++ -o servermain.o ../wfview/servermain.cpp
In file included from /usr/include/aarch64-linux-gnu/qt5/QtCore/qobject.h:54,
                 from /usr/include/aarch64-linux-gnu/qt5/QtCore/qcoreapplication.h:46,
                 from /usr/include/aarch64-linux-gnu/qt5/QtCore/QCoreApplication:1,
                 from ../wfview/servermain.h:4,
                 from ../wfview/servermain.cpp:1:
/usr/include/aarch64-linux-gnu/qt5/QtCore/qmetatype.h:2060:12: error: redefinition of ‘struct QMetaTypeId<udpPreferences>’
 2060 |     struct QMetaTypeId< TYPE >                                          \
      |            ^~~~~~~~~~~~~~~~~~~
/usr/include/aarch64-linux-gnu/qt5/QtCore/qmetatype.h:2056:34: note: in expansion of macro ‘Q_DECLARE_METATYPE_IMPL’
 2056 | #define Q_DECLARE_METATYPE(TYPE) Q_DECLARE_METATYPE_IMPL(TYPE)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~
../wfview/servermain.h:292:1: note: in expansion of macro ‘Q_DECLARE_METATYPE’
  292 | Q_DECLARE_METATYPE(udpPreferences)
      | ^~~~~~~~~~~~~~~~~~
/usr/include/aarch64-linux-gnu/qt5/QtCore/qmetatype.h:2060:12: note: previous definition of ‘struct QMetaTypeId<udpPreferences>’
 2060 |     struct QMetaTypeId< TYPE >                                          \
      |            ^~~~~~~~~~~~~~~~~~~
/usr/include/aarch64-linux-gnu/qt5/QtCore/qmetatype.h:2056:34: note: in expansion of macro ‘Q_DECLARE_METATYPE_IMPL’
 2056 | #define Q_DECLARE_METATYPE(TYPE) Q_DECLARE_METATYPE_IMPL(TYPE)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~
../wfview/rigidentities.h:331:1: note: in expansion of macro ‘Q_DECLARE_METATYPE’
  331 | Q_DECLARE_METATYPE(udpPreferences)
      | ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/aarch64-linux-gnu/qt5/QtCore/qobject.h:54,
                 from /usr/include/aarch64-linux-gnu/qt5/QtCore/qcoreapplication.h:46,
                 from /usr/include/aarch64-linux-gnu/qt5/QtCore/QCoreApplication:1,
                 from ../wfview/main.cpp:2:
/usr/include/aarch64-linux-gnu/qt5/QtCore/qmetatype.h:2060:12: error: redefinition of ‘struct QMetaTypeId<udpPreferences>’
 2060 |     struct QMetaTypeId< TYPE >                                          \
      |            ^~~~~~~~~~~~~~~~~~~
/usr/include/aarch64-linux-gnu/qt5/QtCore/qmetatype.h:2056:34: note: in expansion of macro ‘Q_DECLARE_METATYPE_IMPL’
 2056 | #define Q_DECLARE_METATYPE(TYPE) Q_DECLARE_METATYPE_IMPL(TYPE)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~
../wfview/servermain.h:292:1: note: in expansion of macro ‘Q_DECLARE_METATYPE’
  292 | Q_DECLARE_METATYPE(udpPreferences)
      | ^~~~~~~~~~~~~~~~~~
/usr/include/aarch64-linux-gnu/qt5/QtCore/qmetatype.h:2060:12: note: previous definition of ‘struct QMetaTypeId<udpPreferences>’
 2060 |     struct QMetaTypeId< TYPE >                                          \
      |            ^~~~~~~~~~~~~~~~~~~
/usr/include/aarch64-linux-gnu/qt5/QtCore/qmetatype.h:2056:34: note: in expansion of macro ‘Q_DECLARE_METATYPE_IMPL’
 2056 | #define Q_DECLARE_METATYPE(TYPE) Q_DECLARE_METATYPE_IMPL(TYPE)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~
../wfview/rigidentities.h:331:1: note: in expansion of macro ‘Q_DECLARE_METATYPE’
  331 | Q_DECLARE_METATYPE(udpPreferences)
      | ^~~~~~~~~~~~~~~~~~
make: *** [Makefile:943: main.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Makefile:1011: servermain.o] Error 1

Strange, we usually do a test build of both wfview and wfserver on QT5 and QT6 whenever we merge to master, so it could be OS/Distro specific.

I have a Pi4 running the latest PiOS so will test this today.

Thanks

Phil

Just an addition to the error report from above:

I also experience the same on a Raspberry Pi 3 Model B Plus Rev 1.3, 1GB running on Debian GNU/Linux 12 (bookworm) with arm64 and Linux 6.6.74+rpt-rpi-v8 when I try to build wfserver.

Doesn’t matter if I use branch master or other ones…

For me the last working build was from around 20250215.
Is there any revision information included anywhere in the wfview--20250215--23-57-38/build/ folder?
Maybe that also can give a hint what has changed since then…

There is no need, I know exactly what the issue is and will fix it soon.

This should now be fixed in the ‘kenwood’ branch. Assuming no other issues, this should be merged to master at some point today.

I tried it now with the latest changes on the master branch and it works like a charm.
Thanks a lot!

1 Like

Works here now also, thanks.

I first tried building it in the same folder as the clent app but it had 2 failures. So I went back to the headless server web page and downloaded the repo with that URL and it worked.

I was thinking the server would connect via LAN like the client and maybe use the Virtual serial port also, but it looks like it is serial only to the rig and no virtual serial port.

Since I am using wfView as a LAN to serial bridge, I wanted to minimize the CPU by shutting down the spectrum and graphics. I tried -platform startup arg but it did not seem to run in a way I could use it, there was no connection to the radio. Running -platform vnc did however connect to the radio and function so will run with that. I am sitting around 30% on a Pi5 this way.

Yes wfserver is only ever intended to be used as a server for USB (or serial) radios that don’t have a built-in server.