Reputation: 167
I am trying to build emacs with native compilation from source in MYSY2 on Windows 11, on my first try I got some warnings when running ./configure, nevertheless I tried to continue, then invoking make and make install, as far as I could see I got no errors, but the process did not generate any executable anywhere.
Then I tried again after cleaning the previous attempt with make distclean
, but now it seems like the necessary programs are not cited in $PATH anymore, as trying to run ./configure now gives me an error of not finding any compiler. To try to solve this I simply typed packman -S gcc
and after that the ./configure found gcc, but then it gave an error about not finding a library of imagemagick ( I was building with --with-imagemagick) but running pacman -S mingw-w64-x86_64-imagemagick I got that I already had imagemagick installed, pacman reinstalled imagemagick but the same error persisted, then I decided to remove --with-imagemagick.
Now it gives a error saying that to build with native compilation I need zlib, but by checking with pacman -S mingw-w64-x86_64-zlib
it also said that I already had zlib, it kept giving the error, then I decided to run packman -S zlib
which worked in installing or re-installing the package (I am not sure), but I keep getting the error about missing the zlib library.
Hence it seems that the installed libraries and programs appear to have been taken out of $PATH. Actually, looking again at the results I got, it seems that I should be using the mingw-w64-x86_64-gcc package instead of simply gcc I have mingw-w64-x86_64-gcc installed since before using ./configure the first time, when I was setting up the necessary tools to build emacs (as I did mingw-w64-x86_64-zlib and mingw-w64-x86_64-imagemagick). And, in fact when running ./configure it checks for mingw-w64-x86_64-gcc but doesn't find, finding only the gcc that I installed after running make distclean.
How can I make ./configure find the programs and libraries that it needs to make the MAKEFILEs?
Upvotes: 0
Views: 174
Reputation: 167
For some reason MSYS2 doesn't try to add the folder in which the Linux adapted programs end up in PATH
.
So doing a simple export PATH=/mingw64/bin:$PATH
solved my problem. Also I uninstalled the non-mingw gcc. Not sure if the mingw gcc and the program that installs as gcc are different, they probably are, but what sense does it make to make available a incompatible version of gcc?
Upvotes: 0