keyboardio / Model01-Firmware

The "standard" Keyboardio Model 01 Firmware sketch.
GNU General Public License v3.0
172 stars 302 forks source link

Error building after upgrading to Catalina: bad CPU type in executable #104

Closed fredcallaway closed 4 years ago

fredcallaway commented 4 years ago

make produces the following:

BOARD_HARDWARE_PATH="/Users/fred/Documents/Arduino/hardware" /Users/fred/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/bin//kaleidoscope-builder build-all
Building output/Model01-Firmware/Model01-Firmware (0.0.0-gv1.22-21-g643d-dirty) ...
fork/exec /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++: bad CPU type in executable

I think I was previously running macOS 10.12, and I originally cloned this repo maybe two years ago, will try running from a fresh clone, but I wanted to document this error first.

obra commented 4 years ago

Hi Fred,

What version of the Arduino IDE are you using?

On May 30, 2020, at 11:02 PM, Fred Callaway notifications@github.com wrote:

 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

fredcallaway commented 4 years ago

Wow, quick response! After updating Arduino with brew, the GUI says 1.8.12 (can't say what it was before though—or if the update actually affected the executable in /Applications). However, I am now able to "Verify" a fresh clone of this repo with Arduino.

Unfortunately, I can't compile my previous Model01-Firmware.ino file because Kaleidoscope-HostPowerManagement.h is missing, will try to take stuff out until it compiles successfully.

Another issue is that make still doesn't work for me (with the fresh copy that does work in the IDE). It produces an very long (13k lines) error message which you can find here.

fredcallaway commented 4 years ago

It seems that several of the plugins I was using (e.g. https://github.com/keyboardio/Kaleidoscope-Qukeys) are no longer available?

fredcallaway commented 4 years ago

I tried copying copying my back up of /Documents/Arduino/hardware/keyboardio/avr/libraries into the fresh install and now I'm getting errors compiling in the IDE:

Arduino: 1.8.12 (Mac OS X), Board: "Keyboardio Model 01"

Multiple libraries were found for "HID.h"
Model01-Firmware:67:10: fatal error: Kaleidoscope-HardwareTestMode.h: No such file or directory
 Used: /Users/fred/Library/Arduino15/packages/keyboardio/hardware/avr/1.22.0/libraries/HID
 #include "Kaleidoscope-HardwareTestMode.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
 Not used: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/HID
exit status 1
Kaleidoscope-HardwareTestMode.h: No such file or directory

I'm going to leave this be until I get more guidance. It's not super critical because I can still use my keyboard (just can't change any of the settings)

Here is my previous Model01-Firmware.ino

gedankenexperimenter commented 4 years ago

It seems that several of the plugins I was using (e.g. https://github.com/keyboardio/Kaleidoscope-Qukeys) are no longer available?

That plugin has been incorporated into the main Kaleidoscope repository, along with many others. You should be able to see that the standalone repository has been archived.

fredcallaway commented 4 years ago

@gedankenexperimenter OK, so in the version that I initially downloaded that were separate libraries alongside Kaledoscope, but are now files within Kaleidoscope. Thanks!

@obra I was able to address the "Multiple libraries" issue by uninstalling Arduino (critically, rm -r ~/Library/Arduino15). I am now again able to compile the default .ino file, and am slowly and steadily adding back pieces of my previous configuration. On top of that, make works! 🎉

Solution for future reference: Remove and reinstall /Applications/Arduino.app (from the website) AND remove ~/Library/Arduino15