Dear Kevin, Thank you for the link to the patch, I had a look at it, but in fact there is a simpler solution to fix this, simply add «#define _INTL_NO_DEFINE_MACRO_PRINTF» at the beginning of common/config.hpp.
With this addition the compilation goes farther, but then it stops again with this error : libtool: compile: g++ -DHAVE_CONFIG_H -I. -I./gen -I./gen -I./common -I./interfaces/cc/ -I./modules/speller/default/ -DLOCALEDIR=/mingw64/share/locale -I/mingw64/include -g -O2 -fno-exceptions -MT modules/speller/default/language.lo -MD -MP -MF modules/speller/default/.deps/language.Tpo -c modules/speller/default/language.cpp -DDLL_EXPORT -DPIC -o modules/speller/default/.libs/language.o modules/speller/default/language.cpp:24:12: fatal error: langinfo.h: No such file or directory 24 | # include <langinfo.h> | ^~~~~~~~~~~~ compilation terminated. So finally, what I did is run again configure with option --disable-nls, and I could compile aspell (with --disable-nls, compilation is successful even w/o the addition «#define _INTL_NO_DEFINE_MACRO_PRINTF»). So bad, I can't have the interface in French. Vincent ________________________________ De : Kevin Atkinson <kev...@gnu.org> Envoyé : vendredi 9 mai 2025 17:07 À : Vincent Belaïche <vincent....@hotmail.fr> Cc : aspell-devel@gnu.org <aspell-devel@gnu.org> Objet : RE: ASPELL aspell-0.60.8.1 compilation failure on MSYS2 + MINGW64 On Fri, 9 May 2025, Vincent Belaïche wrote: > The compilation nows goes a bit further but fails on: > > common/config.cpp:1170:9: error: 'class acommon::OStream' has no member named > '__printf__'; did you mean 'vprintf'? > 1170 | out.printf("add-%s %s\n", name, buf); > | ^~~~~~ It looks like printf is being defined as a macro and that is conflicting with my usage as a method. Undefining the printf macro might help. MSYS2 is not really supported, however it should work with some modulations. You mighty want to have a look at https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-aspell to see how the official MSYS2 package is built. It looks like there is a patch to fix the printf problem. I might try building it myself when I have access to a windows machine. But it might take a week or two before I do that. > Thank you anyway for the patch, for some reason I had to apply it manually (« > git apply » did not work). I attached the log. I didn't use git to create the patch. > > Vincent. > > > ________________________________ > De : Kevin Atkinson <kev...@gnu.org> > Envoyé : vendredi 9 mai 2025 05:51 > À : Vincent Belaïche <vincent....@hotmail.fr> > Cc : aspell-devel@gnu.org <aspell-devel@gnu.org> > Objet : Re: ASPELL aspell-0.60.8.1 compilation failure on MSYS2 + MINGW64 > > On Tue, 6 May 2025, Vincent Belaïche wrote: > >> Hello, >> Here is what I get when compiling from sources on MINGW64 (attached >> config.log and compilation log) : >> >> ========================================================== >> libtool: compile: g++ -DHAVE_CONFIG_H -I. -I./gen -I./gen -I./common >> -I./interfaces/cc/ -I./modules/speller/default/ >> -DLOCALEDIR=/mingw64/share/locale -I/mingw64/include -g -O2 -fno-exceptions >> -MT common/file_util.lo -MD -MP -MF common/.deps/file_util.Tpo -c >> common/file_util.cpp -DDLL_EXPORT -DPIC -o common/.libs/file_util.o >> common/file_util.cpp: In function 'bool acommon::need_dir(ParmString)': >> common/file_util.cpp:49:13: error: 'asc_isalpha' was not declared in this >> scope; did you mean 'isalpha'? >> 49 | || (asc_isalpha(file[0]) && file[1] == ':') >> | ^~~~~~~~~~~ >> | isalpha >> common/file_util.cpp:56:3: warning: control reaches end of non-void function >> [-Wreturn-type] >> 56 | } >> | ^ >> make[1]: *** [Makefile:1524: common/file_util.lo] Error 1 >> make[1]: Leaving directory >> '/c/Users/vincentbelaiche/Downloads/aspell-0.60.8.1' >> make: *** [Makefile:1657: all-recursive] Error 1 >> ========================================================== > > asc_isalpha is defined in "asc_ctype.hpp" but it is only used if WIN32 is > defined so it's not normally included. I don't have easy access to a Windows > machine right now but the attached patch should fix your complication problem. > > Kevin > >