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

Cannot compile #258

Closed
willbelr opened this issue Mar 30, 2023 · 6 comments
Closed

Cannot compile #258

willbelr opened this issue Mar 30, 2023 · 6 comments

Comments

@willbelr
Copy link

Settings

Board: LGT8F328
Clock source: Internal
Clock: 32 MHz
Variant: 328P-LQFP32
Arduino as ISP: default (64)
Programmer: AVR-ISP

LGT8FX version: 2.0.1
Arduino IDE: 1:1.8.19-2
OS: Linux 6.2.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 22 Mar 2023 22:52:35 +0000 x86_64 GNU/Linux

When trying to compile any code for that board, I get this error:

/home/user/.arduino15/packages/lgt8fx/hardware/avr/2.0.1/cores/lgt8f/main.cpp:168:10: error: #elif with no expression
     #elif
          ^
Using library Arduino-IRremote at version 2.2.1 in folder: /home/user/Arduino/libraries/Arduino-IRremote 
exit status 1
Error compiling for board LGT8F328.

Hence, I edited main.cpp so line 168 becomes "#elif F_DIC <= 256" instead of just "#elif". Then it compile a little further and end up with that error:

fork/exec /home/user/.arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/bin/avr-gcc-ar: permission denied
Error compiling for board LGT8F328.
@LaZsolt
Copy link
Collaborator

LaZsolt commented Mar 30, 2023

In the line 168 should only contain #else

But there must be another error somewhere.

@dbuezas
Copy link
Owner

dbuezas commented Mar 30, 2023

This has been there since v2.0.0. I assume the issue may be a different compiler version?
I'll take a look this evening

@willbelr
Copy link
Author

This fixed the problem: MCUdude/MicroCore#21 (comment)
Then I reinstalled LG boards along with "Arduino AVR Boards", changed the elif to else, restarted the IDE and it works!

@LaZsolt
Copy link
Collaborator

LaZsolt commented Mar 30, 2023

Again?
Almost the same strange error occured when 2.0.0 released, but with a different error message: #244 (comment)

@dbuezas
Copy link
Owner

dbuezas commented Mar 30, 2023

It must be using a different compiler for some reason. In the meanwhile, I'm releasing v2.0.2 with the #elif replaced with an #else

@dbuezas
Copy link
Owner

dbuezas commented Mar 30, 2023

v2.0.2 released. It's so convenient now, merge a PR and there's a new version deployed in a minute :)

I'll link to that solution in a pinned comment

@dbuezas dbuezas closed this as completed Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants