Skip to content
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

Failure to make #4318

Closed
daltanious opened this issue Nov 1, 2018 · 22 comments

Comments

@daltanious
Copy link

commented Nov 1, 2018

I run

make planck/rev5:default

and get

Making planck/rev5 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:242: gccversion] Error 127
Make finished with errors
make: *** [Makefile:544: planck/rev5:default] Error 1

I'm thinking that I've unzipped the git file and put it in the wrong hierarchy. I've got it in C:\keebs\qmk\qmk_firmware for reference.
Also, I've followed Chokkan's excellent videos in the past with success, but I'm stumped here.

@drashna

This comment has been minimized.

Copy link
Member

commented Nov 1, 2018

avr-gcc isn't present. You need to run util/qmk_install.sh from the qmk_firmware folder.

@daltanious

This comment has been minimized.

Copy link
Author

commented Nov 1, 2018

Thank you. I have done this and I get

The utils seem to already be downloaded.
The AVR toolchain is already installed.
The ARM toolchain is already installed.

I am running the make command from the same folder.
To be fair, I have been plagued by this issue for at least a year, and I'm not a programmer, so I'm slow on the uptake.

@drashna

This comment has been minimized.

Copy link
Member

commented Nov 1, 2018

run avr-gcc --version on the system, and report the output

@daltanious

This comment has been minimized.

Copy link
Author

commented Nov 1, 2018

Geez.

bash: avr-gcc: command not found

@drashna

This comment has been minimized.

Copy link
Member

commented Nov 1, 2018

okay, what OS is this?

@daltanious

This comment has been minimized.

Copy link
Author

commented Nov 1, 2018

Sorry, it's W10

@drashna

This comment has been minimized.

Copy link
Member

commented Nov 1, 2018

Okay. that's what I thought. Are you using MSYS2, or WSL/Bash for windows?

And if you're using MSYS2, what folder is it installed to?

@daltanious

This comment has been minimized.

Copy link
Author

commented Nov 1, 2018

Msys2 64bit

@daltanious

This comment has been minimized.

Copy link
Author

commented Nov 1, 2018

In the c: folder

@drashna

This comment has been minimized.

Copy link
Member

commented Nov 1, 2018

Head to c:\msys2\home(username), and make sure there is a qmk_utils folder. And there should be an avr-gcc-etc folder in that.

If there is, then re-run the script. At the end, it should ask this:

        "Do you want to add 'source ~/qmk_utils/activate_msys2.sh' to the end of your"
        ".bashrc file? Without this make won't find the needed utils, so if you don't"
        "want to do it automatically, then you have to do it manually later."
         "(Y/N)? "

Make sure you say "yes" to this. If not, then it will cause this.

Also, you may want to just try running: echo "source ~/qmk_utils/activate_msys2.sh" >> ~/.bashrc

In both cases, you'll need to exit MSYS2, and reload it (also, keep in mind that you want MINGW64 shortcut.

@daltanious

This comment has been minimized.

Copy link
Author

commented Nov 1, 2018

Many thanks. I'll try this after my commute is over tonight. Cheers

@daltanious

This comment has been minimized.

Copy link
Author

commented Nov 2, 2018

I don't have the avr-gcc-etc folder. Should I run the echo in the qmk_firmware dir?
image

@drashna

This comment has been minimized.

Copy link
Member

commented Nov 2, 2018

The correct name is avr8-gnu-toolchain, which you do appear to have.

And you should be able to run that echo command anywhere. ~ is the "home" directory (\MSYS2\home\(username)).

So yes, please do run it, and then exit MSYS and reload it.

@daltanious

This comment has been minimized.

Copy link
Author

commented Nov 2, 2018

Did that to no avail. I think I'm going to do a fresh install of msys2. What is the recommended file hierarchy? I was thinking c/keebs/qmk_firmware but where should I install msys2, also in keebs?

@drashna

This comment has been minimized.

Copy link
Member

commented Nov 2, 2018

in your home directory, find and open .bashrc. Make sure that's calling the activate_msys2.sh script. If not, then that's the problem.

@drashna

This comment has been minimized.

Copy link
Member

commented Nov 2, 2018

As for reinstalling MSYS, that's up to you. But using the default location should be fine. It has other uses. But that's up to you.

Also, ..... I do have some remote support software, and I could see about looking at your system directly. And see if I can get things working.

@daltanious

This comment has been minimized.

Copy link
Author

commented Nov 5, 2018

Looks like my gccversion isn't up to snuff. Tried to update it with pacman -S base-devel --needed and selected all, but there is nothing to do.

image

Also, pacman -S avr-gcc returns error: target not found: avr-gcc

@daltanious

This comment has been minimized.

Copy link
Author

commented Nov 5, 2018

I looked into the .bashrc file. Every line is commented out, except 19 [[ "$-" != *i* ]] && return so it looks to me like that is the problem, as you stated above.

@drashna

This comment has been minimized.

Copy link
Member

commented Nov 5, 2018

The rest of that stuff is fine, but you absolutely need source ~/qmk_utils/activate_msys2.sh at the end there, or somewhere there.

So definitely add that, save the file, and reopen the MSYS MINGW64 console. Once you do that, avr-gcc should work

@daltanious

This comment has been minimized.

Copy link
Author

commented Nov 5, 2018

I'm sorry I'm so dense. I'm on the verge of liking this, if I can get his to work.
Um, I've searched for the qmk_utils folder and I can't see it. I'm on install 5 of msys2 and the qmk_firmware, so I'm in the weeds here. Should it be in the msys2 folders or the qmk_firmware folder?

@drashna

This comment has been minimized.

Copy link
Member

commented Nov 6, 2018

qmk_utils should be in C:\msys64\home\(username)\qmk_utils.

If you have issues with that, .... I have some remote support software, and I can see about helping you get this set up and working properly more directly.

@daltanious

This comment has been minimized.

Copy link
Author

commented Nov 6, 2018

I got it to work. I'm a mess. I ended up pulling an old folder out of my recycling bin and had it work in there. I did run into some trouble, where the lower keys didn't have enough underscore spaces to compile correctly. Figured it out!

@daltanious daltanious closed this Nov 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.