There's a new build up (as of post #10) - I think this fixes the existing problems... excited to hear whether it works...
I don't have any desktop mac/linux systems available. DxCore supports processors not yet supported by the latest Arduino toolchain package. I made my own, but it didn't work correctly under linux last round. I think I've fixed the problem - but I would really like someone to verify.
So - in 2 minutes, you can help contribute to DxCore
I need 1 mac, 1 linux test (Ideal would be one test each on x86-64, x86 (i686, that is, 32-bit x86), ARM32, and ARM64 (aarch64))...
The instructions are trivial
Use 1.8.13 of Arduino
File -> Preferences
Under Show Verbose Output During, check the "Compile" box.
Tools -> Board -> Boards Manager. Move the window so that you can see the Arduino console (that's where any errors will appear)
Scroll to the bottom, and find DxCore_avrgcctest. Install it
Note: After you first click it , the window may scroll all the way back up to the top. I don't know if it's me-specific, windows specific, or what, but it always does that for me...
Also Note: install won't be instantaneous, it's downloading a 40mb tarball and expanding that to a 250mb toolchain package
If it errored, copy the error messages and post them here - thanks!
Assuming it installed without errors, Tools -> Boards -> DxCore_avrgcctest -> AVR DA-series
File -> Examples -> Basics -> Blink
Compile it ("Verify", Sketch -> Verify/compile, GUI button, or Ctrl+R)
If it fails, copy the error messages and post them here.
If that worked, Tools -> Board -> DxCore_avrgcctest -> AVR DB-serues
Tools -> Chip -> AVR32DB28
Compile with that chip selected.
If it fails, copy the error messages and post them here.
Whether or not anything failed, please post:
Linux Distro
Architecture: (x86-64 (typical modern PC), i686 (old PC) , ARM32, or ARM64.
Much thanks in advance!
DxCore 1.3.0 is planned for release basically as soon as I get successful test results here!
[guest@localhost ~]$ cat /etc/fedora-release
Fedora release 32 (Thirty Two)
[guest@localhost ~]$ uname -a
Linux localhost.localdomain 5.9.16-100.fc32.x86_64 #1 SMP Mon Dec 21 14:10:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Error detected parsing the header
java.lang.RuntimeException: java.io.IOException: Error detected parsing the header
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:175)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Error detected parsing the header
at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:316)
at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextEntry(TarArchiveInputStream.java:583)
at cc.arduino.utils.ArchiveExtractor.extract(ArchiveExtractor.java:119)
at cc.arduino.utils.ArchiveExtractor.extract(ArchiveExtractor.java:82)
at cc.arduino.contributions.packages.ContributionInstaller.install(ContributionInstaller.java:146)
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:172)
... 1 more
Caused by: java.lang.IllegalArgumentException: At offset 124, 12 byte binary number exceeds maximum signed long value
at org.apache.commons.compress.archivers.tar.TarUtils.parseBinaryBigInteger(TarUtils.java:213)
at org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:177)
at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1307)
at org.apache.commons.compress.archivers.tar.TarArchiveEntry.<init>(TarArchiveEntry.java:428)
at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:314)
... 6 more
From what I can tell, it seems like the tarball is corrupted. If you want to recreate the file and update the size and checksum accordingly in the package index I'm happy to try again.
I was just about to try to see if I could provide any further symptoms and clicked the install button again...magically the cached files installed without complaint. ??
Step 6 then failed with:
fork/exec /home/guest/.arduino15/packages/DxCore_avrgcctest/tools/avr-gcc/7.3.0-atmel3.6.1-azduino1/bin/avr-g++: no such file or directory
Error compiling for board AVR DA-series (Optiboot).
And the /home/guest/.arduino15/packages/DxCore_avrgcctest/tools/avr-gcc/7.3.0-atmel3.6.1-azduino1 directory is empty, so maybe the installation didn't go as planned and further errors were suppressed.
Yeah, this is a weakness of Boards Manager. If an installation fails, it doesn't clean up the folders it created at the start of the installation process. When doing an installation, it first checks whether the tool is already installed by checking if the folder exists. So after the first bad installation, if you try to install again it just skips the tool installation altogether because it thinks the tool is already installed. But it's really just an empty folder left over from the first bad installation. So when the builder tries to use that tool you get this "fork/exec ... no such file or directory" error.
The only fix is to manually delete the folder. To make things simple, we often just tell people to delete the entire .arduino15 folder when this happens.
So deeper investigation showed me that the error comes from..... trying to untar a .tar.gz but telling apache compress library it's a .tar?
Huh... Exact same error too...
Okay, so what I'd done is manually make the tar file, with -f to specify the file... but also .z, so while I intended to make a tar, I was actually making .tar.gz files named .tar. Which I then bzip'ed
Okay! Round 2! "1.2.1" and "1.2.2" - These have a correctly packed toolchain. 1.2.2 is bzipped, 1.2.1 is gzipped. Assuming the bzips now work, bzip is preferable as the packages are a full 20% smaller. But if anyone has problems with them, gzip all day.
Error downloading https://github.com/SpenceKonde/DxCore/archive/1.2.0.tar.gz
java.lang.RuntimeException: java.lang.Exception: Error downloading https://github.com/SpenceKonde/DxCore/archive/1.2.0.tar.gz
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:175)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.Exception: Error downloading https://github.com/SpenceKonde/DxCore/archive/1.2.0.tar.gz
at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:149)
at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:83)
at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:60)
at cc.arduino.contributions.packages.ContributionInstaller.install(ContributionInstaller.java:105)
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:172)
... 1 more
Caused by: java.io.IOException: Premature EOF
at sun.net.www.http.ChunkedInputStream.readAheadBlocking(ChunkedInputStream.java:565)
at sun.net.www.http.ChunkedInputStream.readAhead(ChunkedInputStream.java:609)
at sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:696)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3444)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3437)
at cc.arduino.utils.network.FileDownloader.readStreamCopyTo(FileDownloader.java:268)
at cc.arduino.utils.network.FileDownloader.openConnectionAndFillTheFile(FileDownloader.java:247)
at cc.arduino.utils.network.FileDownloader.downloadFile(FileDownloader.java:182)
at cc.arduino.utils.network.FileDownloader.download(FileDownloader.java:129)
at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:147)
... 5 more
1.2.2 installed for me without complaint. Failure at step 7 though with the following:
/usr/bin/arduino-builder -dump-prefs -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/guest/.arduino15/packages -tools /home/guest/.arduino15/packages -libraries /home/guest/Arduino/libraries -fqbn=DxCore_avrgcctest:megaavr:avrdbopti:chip=32DB28,clock=24internal,serialevent=no,bodvoltage=1v9,bodmode=disabled,resetpin=reset,millis=tcb2,mvio=enabled,startuptime=8,timeout=1sec,bootloaderusart=ser0 -ide-version=10813 -build-path /tmp/arduino_build_99919 -warnings=all -build-cache /tmp/arduino_cache_263731 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=/home/guest/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/home/guest/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.avr-gcc.path=/home/guest/.arduino15/packages/DxCore_avrgcctest/tools/avr-gcc/7.3.0-atmel3.6.1-azduino2bz -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-azduino2bz.path=/home/guest/.arduino15/packages/DxCore_avrgcctest/tools/avr-gcc/7.3.0-atmel3.6.1-azduino2bz -prefs=runtime.tools.avrdude.path=/home/guest/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino18 -prefs=runtime.tools.avrdude-6.3.0-arduino18.path=/home/guest/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino18 -verbose /usr/share/arduino/examples/01.Basics/Blink/Blink.ino
/usr/bin/arduino-builder -compile -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/guest/.arduino15/packages -tools /home/guest/.arduino15/packages -libraries /home/guest/Arduino/libraries -fqbn=DxCore_avrgcctest:megaavr:avrdbopti:chip=32DB28,clock=24internal,serialevent=no,bodvoltage=1v9,bodmode=disabled,resetpin=reset,millis=tcb2,mvio=enabled,startuptime=8,timeout=1sec,bootloaderusart=ser0 -ide-version=10813 -build-path /tmp/arduino_build_99919 -warnings=all -build-cache /tmp/arduino_cache_263731 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=/home/guest/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/home/guest/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.avr-gcc.path=/home/guest/.arduino15/packages/DxCore_avrgcctest/tools/avr-gcc/7.3.0-atmel3.6.1-azduino2bz -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-azduino2bz.path=/home/guest/.arduino15/packages/DxCore_avrgcctest/tools/avr-gcc/7.3.0-atmel3.6.1-azduino2bz -prefs=runtime.tools.avrdude.path=/home/guest/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino18 -prefs=runtime.tools.avrdude-6.3.0-arduino18.path=/home/guest/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino18 -verbose /usr/share/arduino/examples/01.Basics/Blink/Blink.ino
Using board 'avrdbopti' from platform in folder: /home/guest/.arduino15/packages/DxCore_avrgcctest/hardware/megaavr/1.2.2
Using core 'dxcore' from platform in folder: /home/guest/.arduino15/packages/DxCore_avrgcctest/hardware/megaavr/1.2.2
Build options changed, rebuilding all
Detecting libraries used...
"/home/guest/.arduino15/packages/DxCore_avrgcctest/tools/avr-gcc/7.3.0-atmel3.6.1-azduino2bz/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing  -flto -w -x c++ -E -CC -mmcu=avr32db28 -DF_CPU=24000000L -DARDUINO=10813 -DARDUINO_avrdb -DARDUINO_ARCH_MEGAAVR -DDXCORE=1.1.1 -DDXCORE_MAJOR=1UL -DDXCORE_MINOR=2UL -DDXCORE_PATCH=0UL -DDXCORE_RELEASED=1  -DMILLIS_USE_TIMERB2 -DCLOCK_SOURCE=0 "-I/home/guest/.arduino15/packages/DxCore_avrgcctest/hardware/megaavr/1.2.2/cores/dxcore/api/deprecated" "-I/home/guest/.arduino15/packages/DxCore_avrgcctest/hardware/megaavr/1.2.2/cores/dxcore" "-I/home/guest/.arduino15/packages/DxCore_avrgcctest/hardware/megaavr/1.2.2/variants/28pin-standard" "/tmp/arduino_build_99919/sketch/Blink.ino.cpp" -o "/dev/null"
Generating function prototypes...
"/home/guest/.arduino15/packages/DxCore_avrgcctest/tools/avr-gcc/7.3.0-atmel3.6.1-azduino2bz/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing  -flto -w -x c++ -E -CC -mmcu=avr32db28 -DF_CPU=24000000L -DARDUINO=10813 -DARDUINO_avrdb -DARDUINO_ARCH_MEGAAVR -DDXCORE=1.1.1 -DDXCORE_MAJOR=1UL -DDXCORE_MINOR=2UL -DDXCORE_PATCH=0UL -DDXCORE_RELEASED=1  -DMILLIS_USE_TIMERB2 -DCLOCK_SOURCE=0 "-I/home/guest/.arduino15/packages/DxCore_avrgcctest/hardware/megaavr/1.2.2/cores/dxcore/api/deprecated" "-I/home/guest/.arduino15/packages/DxCore_avrgcctest/hardware/megaavr/1.2.2/cores/dxcore" "-I/home/guest/.arduino15/packages/DxCore_avrgcctest/hardware/megaavr/1.2.2/variants/28pin-standard" "/tmp/arduino_build_99919/sketch/Blink.ino.cpp" -o "/tmp/arduino_build_99919/preproc/ctags_target_for_gcc_minus_e.cpp"
avr-g++: error: device-specs/specs-avr32db28: No such file or directory
exit status 1
Error compiling for board AVR DB-series (Optiboot).
The /home/guest/.arduino15/packages/DxCore_avrgcctest/tools/avr-gcc/7.3.0-atmel3.6.1-azduino2bz/lib/gcc/avr/7.3.0/device-specs directory does not contain the specs-avr32db28 file and I don't see it anywhere else under DxCore_avrgcctest.
Can you guys confirm that the 1.2.3 packages do not work?
It's a pity - the Arduino archive extraction code checks for xz - and that compression algorithm really does well with this data ( the archives are a third the size! Definitely doesn't work on windows) but it looks like they don't have the class to unpack them bundled with the IDE?
If I can get tiny archives on linux, but not windows, hey, that's something.
org/tukaani/xz/XZInputStream
java.lang.NoClassDefFoundError: org/tukaani/xz/XZInputStream
at cc.arduino.utils.ArchiveExtractor.extract(ArchiveExtractor.java:103)
at cc.arduino.utils.ArchiveExtractor.extract(ArchiveExtractor.java:82)
at cc.arduino.contributions.packages.ContributionInstaller.install(ContributionInstaller.java:146)
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:172)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.tukaani.xz.XZInputStream
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 5 more
DrAzzy:
What a pity, man...
The xzip algorithm absolutely CRUSHES these toolchain packages...
Well, there is always a trade-off. Less download time may mean more resource usage for decompression.
I noticed this in the man page for xz :
Memory usage
The memory usage of xz varies from a few hundred kilobytes to several gigabytes depending on the compression settings. The settings used when compressing a file determine the memory requirements of the decompressor.
Typically the decompressor needs 5 % to 20 % of the amount of memory that the compressor needed when creating the file. For example, decompressing a file created with xz -9 currently requires 65 MiB of memory. Still,
it is possible to have .xz files that require several gigabytes of memory to decompress.
Especially users of older systems may find the possibility of very large memory usage annoying. To prevent uncomfortable surprises, xz has a built-in memory usage limiter, which is disabled by default. While some
operating systems provide ways to limit the memory usage of processes, relying on it wasn't deemed to be flexible enough (e.g. using ulimit(1) to limit virtual memory tends to cripple mmap(2)).
The memory usage limiter can be enabled with the command line option --memlimit=limit. Often it is more convenient to enable the limiter by default by setting the environment variable XZ_DEFAULTS, e.g.
XZ_DEFAULTS=--memlimit=150MiB. It is possible to set the limits separately for compression and decompression by using --memlimit-compress=limit and --memlimit-decompress=limit. Using these two options outside
XZ_DEFAULTS is rarely useful because a single run of xz cannot do both compression and decompression and --memlimit=limit (or -M limit) is shorter to type on the command line.
If the specified memory usage limit is exceeded when decompressing, xz will display an error and decompressing the file will fail. If the limit is exceeded when compressing, xz will try to scale the settings down so
that the limit is no longer exceeded (except when using --format=raw or --no-adjust). This way the operation won't fail unless the limit is very small. The scaling of the settings is done in steps that don't match the
compression level presets, e.g. if the limit is only slightly less than the amount required for xz -9, the settings will be scaled down only a little, not all the way down to xz -8.
So you might want to ensure that you don't make the package uninstallable on a RPi for example.
my compression tool saaaid it would only take about 60-some-odd mb - but in any event, it's academic since the Arduino IDE can't unpack them. The scale of the compression gain is just mindblowing though - back in the good old days, people would have "holy war" type argiuments over rar vs ace vs... whatever the other one that people liked back then was...