Repository navigation
Closed
Description
I have downloaded FastLED 3.3 from source, given it a legal name and installed it in /home/sketchbook on my Linux Debian Buster Machine. Opening the example DemoReel100, I get tons of errors:
In file included from DemoReel100.ino:1:0:
/home/phil/sketchbook/libraries/FastLED3_3_3/FastLED.h:14:21: note: #pragma message: FastLED version 3.003.003
# pragma message "FastLED version 3.003.003"
^
In file included from /home/phil/sketchbook/libraries/FastLED3_3_3/platforms/avr/fastled_avr.h:6:0,
from /home/phil/sketchbook/libraries/FastLED3_3_3/platforms.h:39,
from /home/phil/sketchbook/libraries/FastLED3_3_3/FastLED.h:52,
from DemoReel100.ino:1:
/home/phil/sketchbook/libraries/FastLED3_3_3/platforms/avr/clockless_trinket.h: In static member function ‘static void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::showRGBInternal(PixelController<RGB_ORDER>&)’:
/home/phil/sketchbook/libraries/FastLED3_3_3/platforms/avr/clockless_trinket.h:326:24: error: expected primary-expression before ‘__attribute__’
#define FL_FALLTHROUGH __attribute__ ((fallthrough));
^
/home/phil/sketchbook/libraries/FastLED3_3_3/platforms/avr/clockless_trinket.h:409:55: note: in expansion of macro ‘FL_FALLTHROUGH’
case 4: _D2(0) LO1 _D3(0) HI1 _D1(1) QLO2(b0,0) FL_FALLTHROUGH
^
/home/phil/sketchbook/libraries/FastLED3_3_3/platforms/avr/clockless_trinket.h:326:24: error: expected primary-expression before ‘__attribute__’
#define FL_FALLTHROUGH __attribute__ ((fallthrough));
^
/home/phil/sketchbook/libraries/FastLED3_3_3/platforms/avr/clockless_trinket.h:410:55: note: in expansion of macro ‘FL_FALLTHROUGH’
case 3: _D2(0) LO1 _D3(0) HI1 _D1(1) QLO2(b0,0) FL_FALLTHROUGH
^
/home/phil/sketchbook/libraries/FastLED3_3_3/platforms/avr/clockless_trinket.h:326:24: error: expected primary-expression before ‘__attribute__’
#define FL_FALLTHROUGH __attribute__ ((fallthrough));
^
/home/phil/sketchbook/libraries/FastLED3_3_3/platforms/avr/clockless_trinket.h:411:55: note: in expansion of macro ‘FL_FALLTHROUGH’
case 2: _D2(0) LO1 _D3(0) HI1 _D1(1) QLO2(b0,0) FL_FALLTHROUGH
^
/home/phil/sketchbook/libraries/FastLED3_3_3/platforms/avr/clockless_trinket.h:326:24: error: expected primary-expression before ‘__attribute__’
#define FL_FALLTHROUGH __attribute__ ((fallthrough));
^
/home/phil/sketchbook/libraries/FastLED3_3_3/platforms/avr/clockless_trinket.h:425:55: note: in expansion of macro ‘FL_FALLTHROUGH’
case 4: _D2(0) LO1 _D3(0) HI1 _D1(1) QLO2(b0,0) FL_FALLTHROUGH
^
/home/phil/sketchbook/libraries/FastLED3_3_3/platforms/avr/clockless_trinket.h:326:24: error: expected primary-expression before ‘__attribute__’
#define FL_FALLTHROUGH __attribute__ ((fallthrough));
^
/home/phil/sketchbook/libraries/FastLED3_3_3/platforms/avr/clockless_trinket.h:426:55: note: in expansion of macro ‘FL_FALLTHROUGH’
case 3: _D2(0) LO1 _D3(0) HI1 _D1(1) QLO2(b0,0) FL_FALLTHROUGH
^
/home/phil/sketchbook/libraries/FastLED3_3_3/platforms/avr/clockless_trinket.h:326:24: error: expected primary-expression before ‘__attribute__’
#define FL_FALLTHROUGH __attribute__ ((fallthrough));
^
/home/phil/sketchbook/libraries/FastLED3_3_3/platforms/avr/clockless_trinket.h:427:55: note: in expansion of macro ‘FL_FALLTHROUGH’
case 2: _D2(0) LO1 _D3(0) HI1 _D1(1) QLO2(b0,0) FL_FALLTHROUGH
^
/home/phil/sketchbook/libraries/FastLED3_3_3/platforms/avr/clockless_trinket.h:326:24: error: expected primary-expression before ‘__attribute__’
#define FL_FALLTHROUGH __attribute__ ((fallthrough));
^
/home/phil/sketchbook/libraries/FastLED3_3_3/platforms/avr/clockless_trinket.h:444:55: note: in expansion of macro ‘FL_FALLTHROUGH’
case 4: _D2(0) LO1 _D3(0) HI1 _D1(1) QLO2(b0,0) FL_FALLTHROUGH
^
/home/phil/sketchbook/libraries/FastLED3_3_3/platforms/avr/clockless_trinket.h:326:24: error: expected primary-expression before ‘__attribute__’
#define FL_FALLTHROUGH __attribute__ ((fallthrough));
^
/home/phil/sketchbook/libraries/FastLED3_3_3/platforms/avr/clockless_trinket.h:445:55: note: in expansion of macro ‘FL_FALLTHROUGH’
case 3: _D2(0) LO1 _D3(0) HI1 _D1(1) QLO2(b0,0) FL_FALLTHROUGH
^
/home/phil/sketchbook/libraries/FastLED3_3_3/platforms/avr/clockless_trinket.h:326:24: error: expected primary-expression before ‘__attribute__’
#define FL_FALLTHROUGH __attribute__ ((fallthrough));
^
/home/phil/sketchbook/libraries/FastLED3_3_3/platforms/avr/clockless_trinket.h:446:55: note: in expansion of macro ‘FL_FALLTHROUGH’
case 2: _D2(0) LO1 _D3(0) HI1 _D1(1) QLO2(b0,0) FL_FALLTHROUGH
Is this an issue on my end somehow? I didn't find an issue similar to mine. However, compiling other examples from other libraries, including NeoPixel Strandtest.
Metadata
Metadata
Assignees
Labels
No labels
Activity
kriegsman commentedon Feb 11, 2020
Hi and thanks very much for this report. What version of avr-gcc are you using to compile the sketch? I think we have a problem with “older” versions of gcc; knowing your version will help us figure this out quickly.
Coulomb-f commentedon Feb 11, 2020
gcc --versiongcc (Debian 8.3.0.6) 8.3.0I will update to 9.2 as it is the current stable version, according to Wikipedia. Will report back.
Edit: Reason, update.
I've removed the official gcc version of buster and installed 9.2 from a testing branch. The result is the same, trying to compile DemoReel100, I get:
kriegsman commentedon Feb 11, 2020
Thanks for replying. The "regular" installed version of gcc is not the one used to compile Arduino sketches. Instead, a special version usually called "avr-gcc" is used, and it is probably not in your shell's regular search path. It's usually installed underneath the Arduino IDE tree somewhere.
Anyway, the version number that would be helpful is the version number of whatever version of avr-gcc is installed on your system. Also, do you know the version number of Arduino IDE that you are using? That might help also.
Coulomb-f commentedon Feb 11, 2020
Of course, more than happy to help. So I did some research on how to find out what version of what compiler is used, here is the output:
This was a bit confusing to me, some said that different boards even use different compiler-versions. But the files pertaining to avr-gcc in the arduino tree are all symlinks.
And I'm using the arduino version from the stable branch of Buster-stable (but other repositories seem to have the same version, and usually on debian I'm not going to try experimental repos.)
https://packages.debian.org/buster/arduino
so it is version arduino (2:1.0.5+dfsg2-4.1)
also see https://packages.debian.org/buster/arduino
kriegsman commentedon Feb 11, 2020
Ah thank you.
You might want to pull the latest code from git again. Just merged a change that might help.
Coulomb-f commentedon Feb 12, 2020
Thank you very much. Now after pulling the latest commit, one issue resolved, another one emerged :)
The error message pertaining to clockless_trinket.h went away. However, there is another error massage preventing me from successfully compiling my sketch:
There is a function in DemoReel100
rainbowWithGlitterwhich uses fract8 as an argument.The code:
The error I get:
Now I read that fract8 is the same as a byte, and weirdly enough, repacing fract8 with byte successfully compiles.
On my Windows machine using fract8 does not throw that error.
And
fract8is unsigned wherasbyteisnt.EDIT:
I did find someone with a similar issue and they offered the solution to "move stuff around" - so on Linux I have to declare constants and variables - apparently all precompiler related things - after
#include "FastLED.h"- otherwise it won't work. I'm not sure if that is a bug, but it is only happening on the Arduino IDE on Linux. Probably due to it not being the latest version.kriegsman commentedon Feb 12, 2020
Thank you for the Update there at the end! The script that the Arduino IDE uses to build projects definitely has had problems over the years, and has had a bunch of updates.
fract8 is definitely defined as a type in FastLED,
FastLED/lib8tion.h
Line 336 in 9ead847
So if the build process isn't "seeing" it, it probably is related to the order of includes or something similar.
I'm going to mark this issue as Closed, since there's a fix for the 'fall through' checked in now with 4e5f325
If we hit other compiler related issues, we can open a new ticket for them.
Thank you for the help with this!