OK, I sent an email to the R-package-devel group regarding to this issue. And the following is the reply, and it does work!
Answer from Zhe Liu on Stack Overflow
Please adapt your BINPREF variable in R/etc/$Arch/Makeconf files appropriately to point to the coresponding compiler for each architecture - this is new with the new toolchain we use with R >= 3.3.0.
OK, I sent an email to the R-package-devel group regarding to this issue. And the following is the reply, and it does work!
Please adapt your BINPREF variable in R/etc/$Arch/Makeconf files appropriately to point to the coresponding compiler for each architecture - this is new with the new toolchain we use with R >= 3.3.0.
If you don't want to edit the Makefile directly (as of R 3.6.3 at least), you can set BINPREF as an environment variable pointing to the appropiate mingw_{32,64}/bin/ path
Couple of gotcha's on Windows to note:
- Need to use forward slahes in the path (and so can't use any
environment variables like
%LocalAppData%in there) - Trailing forward
slash after
bin
Unable to find gcc installing rstan on Windows 10
windows - R CMD check not looking for gcc in Rtools directory - Stack Overflow
/bin/sh: gcc: command not found
base-devel installed? pacman -S base-devel
More on reddit.comgcc: command not found?
Maybe simple...
sudo apt-get install gcc
... could be enough?
Do this: open a terminal and type gcc --version. Does anything come up?
Alternatively, search for the gcc executable, which should be located in /usr/bin.
Do ls /usr/bin | grep gcc. What output do you get from that command?
If you get no output from either command, then you need to find your gcc executable wherever you installed it (somewhere in /usr/share maybe?). When found, do cd /usr/bin && ln -s [ABSOLUTE PATH OF GCC].
If you got no output from the first, but output from the second, then you have serious trouble, because /usr/bin is not in your PATH. Edit the file /etc/environment and ADD the following line to the end of the document: PATH="$PATH:/usr/bin".
If you got output from the first, then there is a problem somewhere with bash not reading its own PATH. I think hell would freeze before the first works, but watch you prove me wrong and freeze hell for me. :)
Hope this helps! +1 me if it does!
I'm also getting the same for cc and pkg-config. I was trying to compile a kernel and install something from AUR. Searching around didn't give me any answers that I felt comfortable following as I couldn't establish that the contexts in which the issues occurred were similar enough. Any help appreciated.`
I've got source that builds fine on my computer (M1 mac) with make all; it's all C under there, afaik. I'm trying to wrap it in a flake and get nix to build it. nix build on my flake, however, fails with line 1: gcc: command not found.
I was under the impression, though, that gcc was always available for builds. When I go into nix develop and which gcc, I get /usr/bin/gcc, not some massive nix hash. Is this perhaps the problem, or an indication of the problem?
My flake is here; it's pretty much the same as the nixpkgs default.nix here, except that the source url and platforms are changed. Perhaps this is a linux/mac thing?
I tried to compile a default key map and get the error message "sh: avr-gcc: comand not found".
When using make iris/rev2:default following error message appeared.
$ make iris/rev2:default QMK Firmware 0.6.246 Making iris/rev2 with keymap default /bin/sh: avr-gcc: command not found sh: avr-gcc: command not found sh: avr-gcc: command not found make[1]: *** [tmk_core/rules.mk:256: gccversion] Error 127 Make finished with errors make: *** [Makefile:544: iris/rev2:default] Error 1
I use windows10 and Msys2 64bit with "MSYS2 MinGW 64-bit".
I tried following to solve this error, but didn't solve the problem.
reinstall msys2 and qmk
rerun util/qmk_install.sh
run echo 'export PATH="/usr/local/opt/avr-gcc@7/bin:$PATH"' >> ~/.bash_profile and restart terminal
run pacman -S avr-gcc and "Error target not found: avr-gcc" appeared.
This is my first time of building key map, then I'm a beginner.
Any information would greatly help.