GreaseWeazle and XCode 12
Those of us who are using Keir Frasers amazing GreaseWeazle on macOS, may run into some issues from today 17th September 2020, if your macOS has updated to XCode 12.
When trying to run GreaseWeazle on my iMac, using the same scripts and commands I used only a few hours before… I received an error message, suggesting that bitarray, crcmod and pyserial modules were missing.
This seemed odd, and on trying to reinstall these modules, multiple errors were experienced, reporting missing architecture and type size definitions being incorrect (moving from 32Bit to 128Bit)
After a brief messenger chat with Keir, and further investigation it seems that XCode 12 has a new Python3 compiler which takes priority, overriding the version that was previously configured.
The solution (for me) was to download Python3 from https://www.python.org and install the latest package 3.8.5.
Thankfully it doesn’t overwrite the XCode12 packages in /usr/bin instead the compatible compiler will be located in /usr/local/bin/
You can check the versions by using /usr/bin/python3 and /usr/local/bin/python3, the first thing is the CLANG version.
To reinstall the modules you need to use the following command :-
/usr/local/bin/python3 -m pip install --user bitarray crcmod pyserial
This will install the correct modules and you should see the following
Collecting bitarray Using cached bitarray-1.5.3.tar.gz (54 kB) Using legacy 'setup.py install' for bitarray, since package 'wheel' is not installed. Installing collected packages: bitarray Running setup.py install for bitarray ... done Successfully installed bitarray-1.5.3
I finally edited the GreaseWeazle script gw to explicitly state which version of Python3 to use
#!/usr/bin/env /usr/local/bin/python3 import sys, os if sys.version_info < (3,0,0): print('** FATAL ERROR: Greaseweazle requires Python 3') sys.exit(1) # Update the search path and import the real script sys.path = os.path.join(sys.path, "scripts") import gw # Execute the real script gw.main(sys.argv)
Finally, GreaseWeazle is back up and running!
I also downloaded the latest version of GW Software from the official GitHub repository https://github.com/keirf/Greaseweazle/wiki/Downloads which at the time of writing is V0.21. I installed that (explained in my previous article https://muckypaws.com/2020/09/03/greaseweazle/ ) and I was informed that the Firmware is now out of date on my F7 Plus module. I was running V0.20
** Greaseweazle v0.20 [F7], Host Tools v0.21 Firmware is out of date: Require v0.21 Run "update <update_file>"
Thankfully upgrading the firmware was easy.
From the command line :-
jason@Jasons-iMac GreaseWeazle % ./gw update ** Greaseweazle v0.20 [F7], Host Tools v0.21 Updating Main Firmware to v0.21... Done. jason@Jasons-iMac GreaseWeazle %
The process couldnt have been made easier. Now my GreaseWeazle is fully up to date, and working in Parallel to XCode 12.