Closed Hattshire closed 3 years ago
newer had any luck building MXE with MSYS2 you are probably better of building in win10 wsl environment since this package is geared more towards crosscompiling from linux to windows.
Not really sure why you need it though since Msys2 allready supports most of what MXE holds ?.
I was also getting Cannot create temporary file in C:\WINDOWS\: Permission denied
whenever C:/msys64/mingw64/bin/gcc.exe
was being run by a Makefile, where I manually ran the Makefile with C:/msys64/usr/bin/make.exe
inside of a terminal.
Whenever I manually ran C:/msys64/mingw64/bin/gcc.exe
inside of a terminal it ran just fine however!
I just had to go into VS Code's properties to always run it as an administrator, see here.
Rebooting my machine works for this issue..
This thing came up when trying to build MXE using msys2's mingw64, however something odd happens when trying to 'make' anything: for some reason instead of compiling or giving a compiler/pre-processor/etc error, it bails out with:
Cannot create temporary file in C:\WINDOWS\: Permission denied
Reproducing:
Way 1: clone mxe/mxe.git@github and run
make nonet-lib
Way 2: Tracing down the making hole I came across this:
/usr/bin/env --ignore-environment /mingw64/bin/gcc /home
It should complain about "/home" being a dir, missing libraries(as msys's /usr/bin/gcc does) or something, but it errors on the tempfile thing 😢.Here is the environment I have from within the makefile (for Way 1)