-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scons: mingw-w64-gcc fails due to permission denied (bad environment) #235
Comments
Look into mingw-w64-mesa package. |
Minimalistic example
Produces:
|
As for mesa, its |
Here is a patch that works for me: https://gist.github.com/elieux/fd63e62fda6a05778004 |
lututui
added a commit
to OpenKore/openkore
that referenced
this issue
Oct 22, 2023
On certain gcc distribuitions, if TEMP/TMP are unset, it defaults to writing to the root Windows OS directory (C:/Windows) msys2/MSYS2-packages#235
lututui
added a commit
to OpenKore/openkore
that referenced
this issue
Oct 23, 2023
On certain gcc distribuitions, if TEMP/TMP are unset, it defaults to writing to the root Windows OS directory (C:/Windows) msys2/MSYS2-packages#235
lututui
added a commit
to OpenKore/openkore
that referenced
this issue
Oct 23, 2023
On certain gcc distribuitions, if TEMP/TMP are unset, it defaults to writing to the root Windows OS directory (C:/Windows) msys2/MSYS2-packages#235
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
During an attempt to build mingw-w64-nsis, I found out scons has a problem with invoking native programs. Scons, in pursue of reproducible builds, tries to clean up the environment before running its detection (configure-like) tests, but mingw-w64-gcc need some of these environment variables to work reliably.
The problem I observed was that gcc was getting permission denied errors while trying to write to
C:\Windows
. I checked the environment that this gcc had and it was very small (includingMSYSTEM
,PATH
and few other) and lackedTEMP
andTMP
, so gcc didn't know where to put its temporary files.The
win32.py
platform initializer knows this and passes some vars through to the build environment, see https://bitbucket.org/scons/scons/src/d83ec49e287da9d6cfa22d968ebc24ae3ad8882d/src/engine/SCons/Platform/win32.py?at=default#cl-373. I'd say that ourmsys.py
platform script also needs this, but maybe I'm wrong -- is there a better way of compiling with mingw-w64 from MSYS2 using scons?The text was updated successfully, but these errors were encountered: