ebruck / radiotray-ng

An Internet radio player for Linux
GNU General Public License v3.0
249 stars 23 forks source link

Building on Ubuntu 23.04 (lunar) halts due to compiler warning #200

Closed langemeijer closed 8 months ago

langemeijer commented 1 year ago
$ cmake .. -DCMAKE_BUILD_TYPE=Release
-- The CXX compiler identification is GNU 12.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.88.1")  
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1") 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found version "1.74.0") found components: filesystem system log program_options thread 
-- wxWidgets: Found gtk3 version, using it.
-- Found wxWidgets: -L/usr/lib/x86_64-linux-gnu;-pthread;;;-lwx_gtk3u_core-3.2;-lwx_baseu-3.2 (found version "3.2.2") 
-- Checking for one of the modules 'jsoncpp'
-- Checking for one of the modules 'gstreamer-1.0'
-- Checking for one of the modules 'libxdg-basedir'
-- Checking for one of the modules 'libbsd'
-- Checking for one of the modules 'appindicator3-0.1'
-- Checking for one of the modules 'ayatana-appindicator3-0.1'
-- Checking for one of the modules 'libnotify'
-- Checking for one of the modules 'glibmm-2.4'
-- Checking for one of the modules 'giomm-2.4'
Building version: 0.2.9-dev for ubuntu 23.04 -- DEB packaging...
-- Configuring done
-- Generating done
-- Build files have been written to: /zzzzz/Projects/radiotray-ng/build
$ make package
[  2%] Generating rtng_user_agent.hpp
[  2%] Built target user-agent
[  7%] Built target appindicator_gui
[ 11%] Built target config
[ 33%] Built target playlist
[ 38%] Built target bookmarks
[ 42%] Built target event_bus
[ 47%] Built target player
[ 52%] Built target notification
[ 57%] Built target media_keys
[ 61%] Built target rtng_dbus
[ 69%] Built target radiotray-ng
[ 71%] Building CXX object src/radiotray-ng/gui/editor/CMakeFiles/rtng-bookmark-editor.dir/station_drop_target.cpp.o
/zzzzz/Projects/radiotray-ng/src/radiotray-ng/gui/editor/station_drop_target.cpp: In member function ‘wxBitmap StationDragAndDrop::makeDragImage(const std::string&, const wxColour*, const wxColour*)’:
/zzzzz/Projects/radiotray-ng/src/radiotray-ng/gui/editor/station_drop_target.cpp:112:73: error: ‘wxFont::wxFont(int, int, int, int, bool, const wxString&, wxFontEncoding)’ is deprecated: use wxFONT{FAMILY,STYLE,WEIGHT}_XXX constants [-Werror=deprecated-declarations]
  112 |         tmp_dc.SetFont(wxFont(DRAG_FONT_POINT, wxSWISS, wxITALIC, wxBOLD));
      |                                                                         ^
In file included from /usr/include/wx-3.2/wx/font.h:631,
                 from /usr/include/wx-3.2/wx/window.h:23,
                 from /usr/include/wx-3.2/wx/wx.h:38,
                 from /zzzzz/Projects/radiotray-ng/src/radiotray-ng/gui/editor/editor_app.hpp:21,
                 from /zzzzz/Projects/radiotray-ng/src/radiotray-ng/gui/editor/station_drop_target.cpp:29:
/usr/include/wx-3.2/wx/gtk/font.h:89:5: note: declared here
   89 |     wxFont(int size,
      |     ^~~~~~
/zzzzz/Projects/radiotray-ng/src/radiotray-ng/gui/editor/station_drop_target.cpp:124:47: error: ‘wxPen::wxPen(const wxColour&, int, int)’ is deprecated: use wxPENSTYLE_XXX constants [-Werror=deprecated-declarations]
  124 |         dc.SetPen(wxPen(*textcolor, 1, wxSOLID));
      |                                               ^
In file included from /usr/include/wx-3.2/wx/pen.h:107,
                 from /usr/include/wx-3.2/wx/generic/statusbr.h:18,
                 from /usr/include/wx-3.2/wx/statusbr.h:244,
                 from /usr/include/wx-3.2/wx/frame.h:19,
                 from /usr/include/wx-3.2/wx/wx.h:42:
/usr/include/wx-3.2/wx/gtk/pen.h:51:5: note: declared here
   51 |     wxPen(const wxColour& col, int width, int style);
      |     ^~~~~
/zzzzz/Projects/radiotray-ng/src/radiotray-ng/gui/editor/station_drop_target.cpp:125:49: error: ‘wxBrush::wxBrush(const wxColour&, int)’ is deprecated: use wxBRUSHSTYLE_XXX constants [-Werror=deprecated-declarations]
  125 |         dc.SetBrush(wxBrush(*background, wxSOLID));
      |                                                 ^
In file included from /usr/include/wx-3.2/wx/brush.h:77,
                 from /usr/include/wx-3.2/wx/dc.h:24,
                 from /usr/include/wx-3.2/wx/wx.h:51:
/usr/include/wx-3.2/wx/gtk/brush.h:41:5: note: declared here
   41 |     wxBrush(const wxColour& col, int style);
      |     ^~~~~~~
/zzzzz/Projects/radiotray-ng/src/radiotray-ng/gui/editor/station_drop_target.cpp:134:69: error: ‘wxFont::wxFont(int, int, int, int, bool, const wxString&, wxFontEncoding)’ is deprecated: use wxFONT{FAMILY,STYLE,WEIGHT}_XXX constants [-Werror=deprecated-declarations]
  134 |         dc.SetFont(wxFont(DRAG_FONT_POINT, wxSWISS, wxITALIC, wxBOLD));
      |                                                                     ^
/usr/include/wx-3.2/wx/gtk/font.h:89:5: note: declared here
   89 |     wxFont(int size,
      |     ^~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [src/radiotray-ng/gui/editor/CMakeFiles/rtng-bookmark-editor.dir/build.make:188: src/radiotray-ng/gui/editor/CMakeFiles/rtng-bookmark-editor.dir/station_drop_target.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:543: src/radiotray-ng/gui/editor/CMakeFiles/rtng-bookmark-editor.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
langemeijer commented 1 year ago

l manually edited build/src/radiotray-ng/gui/editor/CMakeFiles/rtng-bookmark-editor.dir/flags.make, removed -Werror there and got a working Radiotray-NG 0.2.9-dev.

Thank you for your effort, I hope this information is any help to you.

langemeijer commented 1 year ago

Also, as a sidenote for 23.04 compatibility:

In the README.md here: https://github.com/ebruck/radiotray-ng#to-build-on-ubuntu it says to install the libwxgtk3.0-gtk3-dev and libwxgtk3.0-gtk3-0v5 packages.

From 23.04 onward libwxgtk3.2-dev should be used (has dependency on libwxgtk3.2-1)