SCons resets the PATH. So gcc-config cannot find whatever it is looking for (the exports are my prints). scons: done reading SConscript files. scons: Building targets ... /tmp/mingw32-gcc -o build/release/AdvSplash/advsplash.o -c -Os -Wall -fno-strict-aliasing -Ibuild/release/AdvSplash -IContrib/AdvSplash Contrib/AdvSplash/advsplash.c export OLDPWD export PATH="/usr/local/bin:/opt/bin:/bin:/usr/bin" export PWD="/var/tmp/portage/dev-util/nsis-2.33/work/nsis-2.33-src" export SHLVL="2" export _="/tmp/mingw32-gcc" gcc-config error: Could not run/locate "mingw32-gcc" scons: *** [build/release/AdvSplash/advsplash.o] Error 1 At: SCons/Tools/crossmingw.py::generate The nsis scripts tries to add the path of mingw32-gcc to the PATH, but on Gentoo it needs to add something like: /usr/i686-pc-linux-gnu/mingw32/gcc-bin/4.2.2 Or more correctly the output of: gcc-config --print-environ mingw32-4.2.2 I am not sure what is the best way to achieve this.
nsis search for any mingw32 compiler found in PATH, as long as it has a well known name. These names are {,i{6,5,4,3}86-}mingw32-gcc. What crossdev command you used to install mingw32? For instance, I used crossdev i686-mingw32 and, as a result, I have a /usr/bin/i686-mingw32-gcc executable.
I use: [I--] [ ] sys-devel/crossdev-0.9.18-r6 (0) [I--] [ ] sys-devel/gcc-config-1.4.0-r4 (0) [I--] [ ~] cross-mingw32/binutils-2.18-r1 (mingw32) [I--] [ ~] cross-mingw32/gcc-4.2.2 (mingw32-4.2) [I--] [ ~] cross-mingw32/mingw-runtime-3.13 (0) [I--] [ ~] cross-mingw32/w32api-3.10 (0) I do have /usr/bin/mingw32-gcc, but apparently this is not enough. Notice that from the output I sent, it DO find the mingw32-gcc, but then some Gentoo configuration complains.
All I see from your original comment is that scons try to run /tmp/mingw32-gcc (?!?) while on my box the first line after "Building targets..." begins (as it should) with "i686-mingw32-gcc -o ...".
Oh!!! Sorry, I modified the script to run /tmp/ so I can print out the environment.
Well, I still don't understand why it doesn't find mingw32-gcc since you obviously have /usr/bin in your PATH.
It does find... Please try the following: $ PATH="/usr/bin:/bin" mingw32-gcc gcc-config error: Could not run/locate "mingw32-gcc" BTW: Which gcc-config do you use?
I have sys-devel/gcc-config-1.3.15-r1. Time to call heavy cavalry... :P
works fine for me make sure you run `gcc-config -f` on the mingw toolchain first to make sure it has the most recent version
Thanks! It was solved. Anyway I should have known to run it? Maybe on some upgrade it should have done automatically?
gcc-config already does for the native compiler, but not for any other targets
Why not do a simple loop for all installed configurations? I guess I am not the only one who have this issue...
it's easy to say "just make a simple loop" when you havent tried coding it feel free to submit a patch
Created attachment 139757 [details, diff] gcc-config-1.4.0-r4.ebuild.diff What do you think about this one?
that isnt ok ... that will temporarily screw with the system compiler which will break other things which will be running at the same time ... it's also wasteful as you only need to refresh the wrappers once per target, not for every version
One time event can be wasteful. Maybe you can add a parameter to gcc-config to refresh without switch?
"it only gets run once" is not a valid reason to make it crappy
OK. Whatever you think... But it is better than breaking people machines...
Hi, I also have the same problem In my case i did root> gcc-config -f i686-mingw32-4.3.1 but it still doesn't work. But it works normally as root. root>i686-mingw32-gcc i686-mingw32-gcc: no input files user>i686-mingw32-gcc gcc-config error: Could not run/locate "i686-mingw32-gcc" I have /usr/bin on my $PATH.
Well don't know how, I just reinstalled and it started working. no comments...
This hasn't gone anywhere, and doesn't look like it will.
i plan on doing it at some point
this is fixed in gcc-config-1.5