drowe67 / freedv-gui

GUI Application for FreeDV – open source digital voice for HF radio
https://freedv.org/
GNU Lesser General Public License v2.1
206 stars 52 forks source link

Error while building version 1.8.7 #343

Closed wkazubski closed 1 year ago

wkazubski commented 1 year ago

Hello! While building release 1.8.7 of freedv on openSUSE, I got this error:

/home/wk/rpmbuild/BUILD/freedv-gui-1.8.7/src/dlg_easy_setup.cpp: In member function 'void EasySetupDialog::OnTest(wxCommandEvent&)': /home/wk/rpmbuild/BUILD/freedv-gui-1.8.7/src/dlg_easy_setup.cpp:785:54: error: cannot convert 'wxString' to 'const char*' 785 if (!hamlibTestObject_->connect(rig, serialPort, rate, civHexAddress)) ^~~~~~
wxString
In file included from /home/wk/rpmbuild/BUILD/freedv-gui-1.8.7/src/dlg_easy_setup.h:28, from /home/wk/rpmbuild/BUILD/freedv-gui-1.8.7/src/main.h:75, from /home/wk/rpmbuild/BUILD/freedv-gui-1.8.7/src/dlg_easy_setup.cpp:27: /home/wk/rpmbuild/BUILD/freedv-gui-1.8.7/src/hamlib.h:26:58: note: initializing argument 2 of 'bool Hamlib::connect(unsigned int, const char*, int, int)' 26 bool connect(unsigned int rig_index, const char *serial_port, const int serial_rate, const int civ_hex = 0); ~~^~~~~ /home/wk/rpmbuild/BUILD/freedv-gui-1.8.7/src/dlg_easy_setup.cpp:806:25: error: cannot convert 'wxString' to 'const char*' 806 serialPort, ^~~~~~
wxString

In file included from /home/wk/rpmbuild/BUILD/freedv-gui-1.8.7/src/dlg_easy_setup.h:29: /home/wk/rpmbuild/BUILD/freedv-gui-1.8.7/src/serialport.h:32:34: note: initializing argument 1 of 'bool Serialport::openport(const char*, bool, bool, bool, bool)' 32 | bool openport(const char port[], bool useRTS, bool RTSPos, bool useDTR, bool DTRPos); | ~~~^~ make[2]: *** [src/CMakeFiles/freedv.dir/build.make:93: src/CMakeFiles/freedv.dir/dlg_easy_setup.cpp.o] Error 1 make[2]: Leaving directory '/home/wk/rpmbuild/BUILD/freedv-gui-1.8.7/build

The previous relase was building OK, but there files dlg_easy_setup.* were not there.

tmiw commented 1 year ago

Can you confirm what version of wxWidgets and openSUSE you're running? I remember it building fine on recent Ubuntu but I could be running a different version of something.

wkazubski commented 1 year ago

I noticed this error both on openSUSE Leap 15.4 (wxWidgets 3.0.5) and openSUSE Tumbleweed (wxWidgets 3.2.1)

tmiw commented 1 year ago

I'm not sure why I was still able to build Windows and macOS binaries (using Clang) without any problems and why the GitHub build actions worked, but PR #344 compiles for me on Tumbleweed. Please go ahead and confirm and I can merge. Thanks for reporting! 👍

wkazubski commented 1 year ago

The patch helps for both openSUSE distributions. OK to merge. Thanks