While trying to build veracrypt_1.0f-1, with gcc 4.9.2, on a 64bits linux host:
Compiling TextUserInterface.cpp
TextUserInterface.cpp: In member function 'virtual VeraCrypt::SharedPtr<veracrypt::volumepassword> VeraCrypt::TextUserInterface::AskPassword(const wxString&, bool) const':
TextUserInterface.cpp:119:49: error: invalid const_cast from type 'const wxScopedWCharBuffer {aka const wxScopedCharTypeBuffer<wchar_t>}' to type 'wchar_t*'
const_cast <wchar_t *=""> (passwordStr.wc_str())[i] = L'X';
^
/home/guillaume/rpmbuild/BUILD/veracrypt-1.0f~1/src/Build/Include/Makefile.inc:20: recipe for target 'TextUserInterface.o' failed
make[1]: *** [TextUserInterface.o] Error 1
Makefile:287: recipe for target 'all' failed
make: *** [all] Error 2</wchar_t></wchar_t></veracrypt::volumepassword>
VeraCrypt requires wxWidgets 3.0. Are you sure that you are linking against it and not wxWidgets 2.8 provided by default by most Linux Distributions?
Try installing devel package for wxWidgets 3.0.
Official VeraCrypt are linked statically against wxWidgets 3.0.2 in order to be able to run across all Linux Distributions.
I'm using wxWidgets 3.0.2. With wxWidgets 2.8, the first build error occurs way earlier.
Clearly you are not using wxXWidgets 3.0 headers. The code in TextUserInterface.cpp compiles cleanly on various Linux distributions and the class wxScopedCharTypeBuffer<wchar_t></wchar_t> which causes the error in your build does have a wchar_t* conversion operator as documented in the official wxWidgets documentation: http://docs.wxwidgets.org/3.0/classwx_scoped_char_type_buffer.html#ac99fcaf848d1a724e926373055573c6d
You should check your build environement and purge it from any wxWidgets 2.8 headers.
what's your distribution by the way so I can check myself?
That's mageia cauldron, the development version. And you're unlikely to be able to check yourself directly, as the shipped version of wxWidget is 3.0.1, I updated it locally before reporting the issue. The message was the same, tough.
I'm suspecting an issue with the wxWidget package, I'm investigating this way.
Just to check if you have any update on this.
Closing this ticket since there no problems compiling VeraCrypt for RPM against wxWidgets 3.0 as it was done by others like here: https://copr-be.cloud.fedoraproject.org/results/drlinux/VeraCrypt/
The issue is related to the usage of --enable-utf8 build option in mageia package. I just reported a bug, but the low impact of the issue on a widely used package will probably prevent a quick fix, especially in current pre-release period:
https://bugs.mageia.org/show_bug.cgi?id=15661