Sys/pgmspace.h no such file

I'm using Arch Linux. When I try to compile code, it output error:

In file included from /home/guts/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266/Arduino.h:283,
                 from sketch/sketch_may20a.ino.cpp:1:
/home/guts/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266/pgmspace.h:8:10: fatal error: sys/pgmspace.h: No such file or directory
 #include <sys/pgmspace.h>
          ^~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

Hi @hiusv. I have moved your topic to a more appropriate forum category.

Please only use the "Arduino IDE 2.0 beta" forum category for questions or feedback specific to the Arduino IDE 2.0.0 release candidate. If you would like to give it a try, you can download it from the "Software" page:

https://www.arduino.cc/en/software#future-version-of-the-arduino-ide

Or better yet, try the nightly build from the links provided here:

https://github.com/arduino/arduino-ide#nightly-builds

I see a <pgmspace.h> in the core, and an <avr/pgmspace.h> for compatibility, but no <sys/pgmspace.h>

I've changed pgmspace.h from #include<sys/pgmspace.h> to #include <avr/pgmspace.h> and it output:

/home/guts/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266/avr/../pgmspace.h:8:26: error: #include nested too deeply
 #include <avr/pgmspace.h>
                          ^
/home/guts/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266/avr/../pgmspace.h:12:21: error: #include nested too deeply
 #include "ets_sys.h"
                     ^
/home/guts/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266/avr/../pgmspace.h:13:19: error: #include nested too deeply
 #include "osapi.h"
                   ^
exit status 1

pgmspace.h:

//pgmspace.h stub
//This file's contents have been moved to newlib.  This file simply
// includes the newlib pgmspace file as well as some ets headers
// to preserve backwards compatibility
// current source: https://github.com/earlephilhower/newlib-xtensa/blob/xtensa-4_0_0-lock-arduino/newlib/libc/sys/xtensa/sys/pgmspace.h 
#include <avr/pgmspace.h>
#ifdef __ets__
#include "ets_sys.h"
#include "osapi.h"
#endif

It should be in the GCC package.

Windows 10 / Cygwin

# %LOCALAPPDATA%/Arduino15/packages/esp8266 

% find -name 'pgmspace*'
./hardware/esp8266/3.0.2/cores/esp8266/avr/pgmspace.h
./hardware/esp8266/3.0.2/cores/esp8266/pgmspace.h
./hardware/esp8266/3.0.2/tests/host/sys/pgmspace.h
./hardware/esp8266/3.0.2/tools/sdk/ssl/bearssl/inc/pgmspace.h
./tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/xtensa-lx106-elf/include/sys/pgmspace.h

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.