... wksp_tool.cpp:159:61: error: no matching function for call to 'CSG_File::Open(const wxScopedWCharBuffer, ESG_File_Flags_Open)' if( Stream.Open(FileName.GetFullPath().wc_str(), SG_FILE_R) && Stream.Read(Description, Stream.Length()) ) ^ In file included from ../saga_api/geo_tools.h:77:0, from ../saga_api/mat_tools.h:77, from ../saga_api/dataobject.h:84, from ../saga_api/table.h:77, from ../saga_api/grid.h:77, from ../saga_api/parameters.h:77, from ../saga_api/tool.h:76, from ../saga_api/tool_library.h:77, from ../saga_api/saga_api.h:118, from res_commands.h:78, from wksp_tool.cpp:67: ../saga_api/api_core.h:955:13: note: candidate: bool CSG_File::Open(const CSG_String&, int, bool, int) bool Open (const CSG_String &File_Name, int Mode = SG_FILE_R, bool bBinary = true, int Encoding = SG_FILE_ENCODING_CHAR); ^~~~ ../saga_api/api_core.h:955:13: note: no known conversion for argument 1 from 'const wxScopedWCharBuffer {aka const wxScopedCharTypeBuffer<wchar_t>}' to 'const CSG_String&' wksp_tool.cpp:166:61: error: no matching function for call to 'CSG_File::Open(const wxScopedWCharBuffer, ESG_File_Flags_Open)' if( Stream.Open(FileName.GetFullPath().wc_str(), SG_FILE_R) && Stream.Read(Description, Stream.Length()) ) ^ In file included from ../saga_api/geo_tools.h:77:0, from ../saga_api/mat_tools.h:77, from ../saga_api/dataobject.h:84, from ../saga_api/table.h:77, from ../saga_api/grid.h:77, from ../saga_api/parameters.h:77, from ../saga_api/tool.h:76, from ../saga_api/tool_library.h:77, from ../saga_api/saga_api.h:118, from res_commands.h:78, from wksp_tool.cpp:67: ../saga_api/api_core.h:955:13: note: candidate: bool CSG_File::Open(const CSG_String&, int, bool, int) bool Open (const CSG_String &File_Name, int Mode = SG_FILE_R, bool bBinary = true, int Encoding = SG_FILE_ENCODING_CHAR); ^~~~ ../saga_api/api_core.h:955:13: note: no known conversion for argument 1 from 'const wxScopedWCharBuffer {aka const wxScopedCharTypeBuffer<wchar_t>}' to 'const CSG_String&' *** Error code 1 ...
Probably this can be fixed by change: if( Stream.Open(FileName.GetFullPath().wc_str(), SG_FILE_R) && Stream.Read(Description, Stream.Length()) ) to if( Stream.Open(static_cast<const wchar_t*>(FileName.GetFullPath().wc_str()), SG_FILE_R) && Stream.Read(Description, Stream.Length()) )
Created attachment 188600 [details] patch to fix This fix build
Comment on attachment 188600 [details] patch to fix I can confirm, that this patch also builds and runs fine with wxGtk30 3.0.2, the version that is actually in the ports. Isn't this patch a good candidate for upstream sources?
(In reply to Rainer Hurling from comment #3) I think yes, this is just simple type cast. Can you report it to upstream?
I suggested the SAGA GIS developers to put your patch upstream and it is already accepted and committed in a slightly different version r6e1444 [1]. This will be integrated in an upcoming SAGA GIS version > 6.1.0. For the case, that x11-toolkits/wxgtk30 will be updated to version 3.0.3.1, before SAGA GIS 6.2.0 is out, we should use r6e1444 as a patch under files in the FreeBSD port. I will try to keep an eye on it. Many thanks again for pointing this up. [1] https://sourceforge.net/p/saga-gis/code/ci/6e14443b30ce2c8e284617840bc49e249c63afc1/
A commit references this bug: Author: jbeich Date: Sun Jan 21 02:22:17 UTC 2018 New revision: 459566 URL: https://svnweb.freebsd.org/changeset/ports/459566 Log: math/saga: unbreak build with wxWidgets 3.0.3 wksp_tool.cpp: In member function 'virtual wxString CWKSP_Tool::Get_Description()': wksp_tool.cpp:159:61: error: no matching function for call to 'CSG_File::Open(const wxScopedWCharBuffer, ESG_File_Flags_Open)' if( Stream.Open(FileName.GetFullPath().wc_str(), SG_FILE_R) && Stream.Read(Description, Stream.Length()) ) ^ In file included from ../saga_api/geo_tools.h:77:0, from ../saga_api/mat_tools.h:77, from ../saga_api/dataobject.h:84, from ../saga_api/table.h:77, from ../saga_api/grid.h:77, from ../saga_api/parameters.h:77, from ../saga_api/tool.h:76, from ../saga_api/tool_library.h:77, from ../saga_api/saga_api.h:118, from res_commands.h:78, from wksp_tool.cpp:67: ../saga_api/api_core.h:955:13: note: candidate: bool CSG_File::Open(const CSG_String&, int, bool, int) bool Open (const CSG_String &File_Name, int Mode = SG_FILE_R, bool bBinary = true, int Encoding = SG_FILE_ENCODING_CHAR); ^~~~ ../saga_api/api_core.h:955:13: note: no known conversion for argument 1 from 'const wxScopedWCharBuffer {aka const wxScopedCharTypeBuffer<wchar_t>}' to 'const CSG_String&' wksp_tool.cpp:166:61: error: no matching function for call to 'CSG_File::Open(const wxScopedWCharBuffer, ESG_File_Flags_Open)' if( Stream.Open(FileName.GetFullPath().wc_str(), SG_FILE_R) && Stream.Read(Description, Stream.Length()) ) ^ In file included from ../saga_api/geo_tools.h:77:0, from ../saga_api/mat_tools.h:77, from ../saga_api/dataobject.h:84, from ../saga_api/table.h:77, from ../saga_api/grid.h:77, from ../saga_api/parameters.h:77, from ../saga_api/tool.h:76, from ../saga_api/tool_library.h:77, from ../saga_api/saga_api.h:118, from res_commands.h:78, from wksp_tool.cpp:67: ../saga_api/api_core.h:955:13: note: candidate: bool CSG_File::Open(const CSG_String&, int, bool, int) bool Open (const CSG_String &File_Name, int Mode = SG_FILE_R, bool bBinary = true, int Encoding = SG_FILE_ENCODING_CHAR); ^~~~ ../saga_api/api_core.h:955:13: note: no known conversion for argument 1 from 'const wxScopedWCharBuffer {aka const wxScopedCharTypeBuffer<wchar_t>}' to 'const CSG_String&' PR: 223758 Submitted by: rozhuk.im@gmail.com Obtained from: upstream Approved by: Rainer Hurling (maintainer) Changes: head/math/saga/Makefile head/math/saga/files/patch-git_6e14443b30ce
A commit references this bug: Author: jbeich Date: Sun Jan 21 02:22:42 UTC 2018 New revision: 459567 URL: https://svnweb.freebsd.org/changeset/ports/459567 Log: security/veracrypt: unbreak build with wxWidgets 3.0.3 TextUserInterface.cpp:122:5: error: const_cast from 'const wxScopedWCharBuffer' (aka 'const wxScopedCharTypeBuffer<wchar_t>') to 'wchar_t *' is not allowed const_cast <wchar_t *> (passwordStr.wc_str())[i] = L'X'; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PR: 223758 Submitted by: rozhuk.im@gmail.com Approved by: maintainer timeout (2 months) Changes: head/security/veracrypt/Makefile head/security/veracrypt/files/patch-src_Main_TextUserInterface.cpp
Thanks. Landed. It appears I've typo'd PR number in comment 7.
And comment 6 wasn't enough: https://clbin.com/kYl6z grid_to_kml.cpp: In member function 'bool CGrid_from_KML::Load_Overlay(const wchar_t*, const CSG_MetaData&)': grid_to_kml.cpp:585:49: error: conversion from 'const wxScopedWCharBuffer {aka const wxScopedCharTypeBuffer<wchar_t>}' to non-scalar type 'CSG_String' requested CSG_String FullPath = fn.GetFullPath().wc_str(); ~~~~~~~~~~~~~~~~~~~~~~~^~
Created attachment 189950 [details] build fix again Try now.
(In reply to rozhuk.im from comment #10) Thanks for the attachment 189950 [details]. I created an update of math/saga to version 6.3.0 and integrated the patch in bug #227901.
A commit references this bug: Author: jbeich Date: Wed May 2 23:33:20 UTC 2018 New revision: 468893 URL: https://svnweb.freebsd.org/changeset/ports/468893 Log: math/saga: unbreak build with wxWidgets 3.0.3 (try#2) grid_to_kml.cpp: In member function 'bool CGrid_from_KML::Load_Overlay(const wchar_t*, const CSG_MetaData&)': grid_to_kml.cpp:585:49: error: conversion from 'const wxScopedWCharBuffer {aka const wxScopedCharTypeBuffer<wchar_t>}' to non-scalar type 'CSG_String' requested CSG_String FullPath = fn.GetFullPath().wc_str(); ~~~~~~~~~~~~~~~~~~~~~~~^~ PR: 223758 Submitted by: rozhuk.im@gmail.com Approved by: Rainer Hurling (maintainer) Changes: head/math/saga/files/patch-src_tools_io_io__grid__image_grid__to__kml.cpp
Thanks. Landed. I've initially waited for maintainer approval or upstream review but didn't notice timeout.