I'm trying to build fish 3.6.0 for Cygwin. The build fails on re.cpp.o, with cannot convert ‘PCRE2_UCHAR32*’ {aka ‘unsigned int*’} to ‘PCRE2_UCHAR16*’ {aka ‘short unsigned int*’}:
[45/118] Building CXX object CMakeFiles/fishlib.dir/src/re.cpp.o
FAILED: CMakeFiles/fishlib.dir/src/re.cpp.o
/usr/bin/g++.exe -DBINDIR=L\"/usr/bin\" -DCMAKE_BINARY_DIR=\"/home/ASchulma/dev/cygwin/fish/fish-3.6.0-1.x
86_64/build\" -DCMAKE_SOURCE_DIR=\"/home/ASchulma/dev/cygwin/fish/fish-3.6.0-1.x86_64/src/fish-3.6.0\" -DD
ATADIR=L\"/usr/share\" -DDOCDIR=L\"/usr/share/doc/fish\" -DLOCALEDIR=\"/usr/share/locale\" -DPREFIX=L\"/us
r\" -DSYSCONFDIR=L\"/etc\" -D_ATFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOUR
CE -D_REENTRANT -D_UNICODE=1 -I/home/ASchulma/dev/cygwin/fish/fish-3.6.0-1.x86_64/build -Wno-comment -fdeb
ug-prefix-map=/home/ASchulma/dev/cygwin/fish/fish-3.6.0-1.x86_64/build=/usr/src/debug/fish-3.6.0-1 -fdebug
-prefix-map=/home/ASchulma/dev/cygwin/fish/fish-3.6.0-1.x86_64/src/fish-3.6.0=/usr/src/debug/fish-3.6.0-1
-Wredundant-move -O2 -g -DNDEBUG -UNDEBUG -fdiagnostics-color=always -Wall -Wextra -Wno-comment -Wno-add
ress -fno-exceptions -std=gnu++11 -MD -MT CMakeFiles/fishlib.dir/src/re.cpp.o -MF CMakeFiles/fishlib.dir/src/re.cpp.o.d -o CMakeFiles/fishlib.dir/src/re.cpp.o -c /home/ASchulma/dev/cygwin/fish/fish-3.6.0-1.x86_64/src/fish-3.6.0/src/re.cpp
/home/ASchulma/dev/cygwin/fish/fish-3.6.0-1.x86_64/src/fish-3.6.0/src/re.cpp: In member function ‘maybe_t<std::basic_string<wchar_t> > re::regex_t::substitute(const wcstring&, const wcstring&, re::sub_flags_t, size_t, re::re_error_t*, int*) const’:
/home/ASchulma/dev/cygwin/fish/fish-3.6.0-1.x86_64/src/fish-3.6.0/src/re.cpp:254:46: error: cannot convert ‘PCRE2_UCHAR32*’ {aka ‘unsigned int*’} to ‘PCRE2_UCHAR16*’ {aka ‘short unsigned int*’}
254 | replacement.size(), reinterpret_cast<PCRE2_UCHAR32 *>(buffer), &bufflen);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| PCRE2_UCHAR32* {aka unsigned int*}
In file included from /home/ASchulma/dev/cygwin/fish/fish-3.6.0-1.x86_64/src/fish-3.6.0/src/re.cpp:15:
/usr/include/pcre2.h:939:1: note: initializing argument 10 of ‘int pcre2_substitute_16(const pcre2_code_16*, PCRE2_SPTR16, size_t, size_t, uint32_t, pcre2_match_data_16*, pcre2_match_context_16*, PCRE2_SPTR16, size_t, PCRE2_UCHAR16*, size_t*)’
939 | PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
| ^
/home/ASchulma/dev/cygwin/fish/fish-3.6.0-1.x86_64/src/fish-3.6.0/src/re.cpp:273:51: error: cannot convert ‘PCRE2_UCHAR32*’ {aka ‘unsigned int*’} to ‘PCRE2_UCHAR16*’ {aka ‘short unsigned int*’}
273 | replacement.size(), reinterpret_cast<PCRE2_UCHAR32 *>(&res[0]),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| PCRE2_UCHAR32* {aka unsigned int*}
In file included from /home/ASchulma/dev/cygwin/fish/fish-3.6.0-1.x86_64/src/fish-3.6.0/src/re.cpp:15:
/usr/include/pcre2.h:939:1: note: initializing argument 10 of ‘int pcre2_substitute_16(const pcre2_code_16*, PCRE2_SPTR16, size_t, size_t, uint32_t, pcre2_match_data_16*, pcre2_match_context_16*, PCRE2_SPTR16, size_t, PCRE2_UCHAR16*, size_t*)’
939 | PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
| ^
Any thoughts or suggestions? The build succeeded with fish 3.5.1.
I'm trying to build fish 3.6.0 for Cygwin. The build fails on re.cpp.o, with
cannot convert ‘PCRE2_UCHAR32*’ {aka ‘unsigned int*’} to ‘PCRE2_UCHAR16*’ {aka ‘short unsigned int*’}:Any thoughts or suggestions? The build succeeded with fish 3.5.1.