I am having issues with the compiler resolving include files:
OS: Ubuntu 16.04.1 LTS
IDE: 1.6.12
After downloading the 32bit Linux .xz file, I opened it and copied the contents to: /usr/share/arduino
Then using a terminal opened at: /usr/share/arduino I executed the install script "./install.sh"
I am able to compile a simple sketch (BLANK for example), however when I attempt to compile a existing larger project I am receiving errors around #include directives.
I have reduced the problem to this example:
#include <arduino.h>
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
And receive this error while compiling:
/usr/share/arduino/arduino-builder -dump-prefs -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/dual-boots/.arduino15/packages -tools /usr/share/arduino/tools-builder -tools /usr/share/arduino/hardware/tools/avr -tools /home/dual-boots/.arduino15/packages -built-in-libraries /usr/share/arduino/libraries -libraries /home/dual-boots/Arduino/libraries -fqbn=arduino:avr:uno -ide-version=10612 -build-path /tmp/arduino_build_864060 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/usr/share/arduino/hardware/tools/avr -prefs=runtime.tools.avrdude.path=/usr/share/arduino/hardware/tools/avr -verbose /tmp/arduino_modified_sketch_705/sketch_sep23a.ino
/usr/share/arduino/arduino-builder -compile -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/dual-boots/.arduino15/packages -tools /usr/share/arduino/tools-builder -tools /usr/share/arduino/hardware/tools/avr -tools /home/dual-boots/.arduino15/packages -built-in-libraries /usr/share/arduino/libraries -libraries /home/dual-boots/Arduino/libraries -fqbn=arduino:avr:uno -ide-version=10612 -build-path /tmp/arduino_build_864060 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/usr/share/arduino/hardware/tools/avr -prefs=runtime.tools.avrdude.path=/usr/share/arduino/hardware/tools/avr -verbose /tmp/arduino_modified_sketch_705/sketch_sep23a.ino
Using board 'uno' from platform in folder: /usr/share/arduino/hardware/arduino/avr
Using core 'arduino' from platform in folder: /usr/share/arduino/hardware/arduino/avr
Detecting libraries used...
"/usr/share/arduino/hardware/tools/avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10612 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/tmp/arduino_build_864060/sketch/sketch_sep23a.ino.cpp" -o "/dev/null"
"/usr/share/arduino/hardware/tools/avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10612 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/standard" "/tmp/arduino_build_864060/sketch/sketch_sep23a.ino.cpp" -o "/tmp/arduino_build_864060/preproc/ctags_target_for_gcc_minus_e.cpp"
/tmp/arduino_modified_sketch_705/sketch_sep23a.ino:1:21: fatal error: arduino.h: No such file or directory
#include <arduino.h>
^
compilation terminated.
exit status 1
Error compiling for board Arduino/Genuino Uno.
Using the same version of Arduino on a Win7 machine the sample above produces no errors, and the existing larger project also compiles w/o any errors with the win7 install. I suspect this has to do with the pre-defined paths used in the Linux install, but I have been unable to search out the answer. Here is a dump from printenv
XDG_VTNR=7
XDG_SESSION_ID=c1
CLUTTER_IM_MODULE=xim
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/dual-boots
COMP_WORDBREAKS=
"'><;|&(:
SESSION=ubuntu
GPG_AGENT_INFO=/home/dual-boots/.gnupg/S.gpg-agent:0:1
TERM=xterm-256color
SHELL=/bin/bash
VTE_VERSION=4205
QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
WINDOWID=65014028
UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/1138
GNOME_KEYRING_CONTROL=
GTK_MODULES=gail:atk-bridge:unity-gtk-module
USER=dual-boots
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
QT_ACCESSIBILITY=1
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
DESKTOP_SESSION=ubuntu
QT_IM_MODULE=ibus
QT_QPA_PLATFORMTHEME=appmenu-qt5
XDG_SESSION_TYPE=x11
JOB=unity-settings-daemon
PWD=/usr/share/arduino
XMODIFIERS=@im=ibus
GNOME_KEYRING_PID=
LANG=en_US.UTF-8
GDM_LANG=en_US
MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path
NODE_PATH=/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript
IM_CONFIG_PHASE=1
COMPIZ_CONFIG_PROFILE=ubuntu
GDMSESSION=ubuntu
SESSIONTYPE=gnome-session
GTK2_MODULES=overlay-scrollbar
HOME=/home/dual-boots
XDG_SEAT=seat0
SHLVL=1
LANGUAGE=en_US
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
UPSTART_INSTANCE=
UPSTART_EVENTS=xsession started
XDG_SESSION_DESKTOP=ubuntu
LOGNAME=dual-boots
COMPIZ_BIN_PATH=/usr/bin/
QT4_IM_MODULE=xim
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-f5jK8LXBtU
LESSOPEN=| /usr/bin/lesspipe %s
INSTANCE=
UPSTART_JOB=unity7
XDG_RUNTIME_DIR=/run/user/1000
DISPLAY=:0
XDG_CURRENT_DESKTOP=Unity
GTK_IM_MODULE=ibus
LESSCLOSE=/usr/bin/lesspipe %s %s
XAUTHORITY=/home/dual-boots/.Xauthority
OLDPWD=/usr/share
_=/usr/bin/printenv
dual-boots@dualboots-ThinkPad-T43p:/usr/share/arduino$
Any hints would be greatly appreciated ![]()
Thank you,
-al-