Skip to content

Compiler hangs on error in include file #3282

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

Closed
nickgammon opened this issue Jun 4, 2015 · 6 comments
Closed

Compiler hangs on error in include file #3282

nickgammon opened this issue Jun 4, 2015 · 6 comments
Assignees
Labels
Milestone

Comments

@nickgammon
Copy link

Using IDE 1.6.4, Windows XP (64 bit). Build target: Arduino Uno.

Make a sketch as follows:

#include "foo.h"

void setup() { }
void loop() { }

Make a new tab in the IDE called "foo.h". Place this inside it:

../foo.h

The compile process hangs indefinitely with this verbose output:


Build options changed, rebuilding all

C:\Documents and Settings\Nick\Desktop\arduino-1.6.4\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10604 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Documents and Settings\Nick\Desktop\arduino-1.6.4\hardware\arduino\avr\cores\arduino -IC:\Documents and Settings\Nick\Desktop\arduino-1.6.4\hardware\arduino\avr\variants\standard C:\DOCUME~1\Nick\LOCALS~1\Temp\build1865759335466738571.tmp\sketch_jun04a.cpp -o C:\DOCUME~1\Nick\LOCALS~1\Temp\build1865759335466738571.tmp\sketch_jun04a.cpp.o 
@nickgammon
Copy link
Author

A similar issue (with a larger sketch) was reported in the forum at http://forum.arduino.cc/index.php?topic=327636.0

The user there reported using Windows 8.1 (and IDE 1.6.4).

My example above is a small sketch which reproduces the issue.

@nickgammon
Copy link
Author

Compiling under Ubuntu (64-bit) gives a more reasonable error message:

Build options changed, rebuilding all
In file included from sketch_jun04a.ino:1:0:
foo.h:1: error: expected unqualified-id before '.' token
 ../foo.h
 ^

Plus a whole lot more errors which I am uncertain of the reason for - possibly a side-effect.

@ffissore ffissore self-assigned this Jun 4, 2015
@ffissore ffissore added this to the Release 1.6.5 milestone Jun 4, 2015
@ffissore
Copy link
Contributor

ffissore commented Jun 4, 2015

It's a bug solved in 8a1e6c8. It showed up as a hung compilation when warning levels were anything but "none". See #3124 and #3115
Fix is available with latest hourly build http://www.arduino.cc/en/Main/Software#hourly

@curiegupta
Copy link

../foo.h

Hello Sir,
Not able to follow this. Can you please elaborate?

Thanks.

@curiegupta
Copy link

Using IDE 1.6.4, Windows XP (64 bit). Build target: Arduino Uno.

Make a sketch as follows:

#include "foo.h"

void setup() { }
void loop() { }

Make a new tab in the IDE called "foo.h". Place this inside it:

../foo.h

The compile process hangs indefinitely with this verbose output:


Build options changed, rebuilding all

C:\Documents and Settings\Nick\Desktop\arduino-1.6.4\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10604 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Documents and Settings\Nick\Desktop\arduino-1.6.4\hardware\arduino\avr\cores\arduino -IC:\Documents and Settings\Nick\Desktop\arduino-1.6.4\hardware\arduino\avr\variants\standard C:\DOCUME~1\Nick\LOCALS~1\Temp\build1865759335466738571.tmp\sketch_jun04a.cpp -o C:\DOCUME~1\Nick\LOCALS~1\Temp\build1865759335466738571.tmp\sketch_jun04a.cpp.o 

Hi.
Can you please elaborate this?

Thanks.

@per1234
Copy link
Collaborator

per1234 commented Mar 25, 2020

@curie31 this is about a bug that was fixed 5 years ago. There's nothing to elaborate. Hundreds of people get an email every time you comment on one of our issues. That's fine if you have something constructive to add, but that's not the case here.

@arduino arduino locked as resolved and limited conversation to collaborators Mar 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants