me-no-dev / RasPiArduino

Arduino Framework for RaspberryPI
332 stars 75 forks source link

<built-in>:0:0: fatal error: opening dependency file /dev/null.d: Permission denied #99

Open marcmerlin opened 5 years ago

marcmerlin commented 5 years ago

Hi @me-no-dev. Is this project still known to work with recent arduino IDEs? I never used it until now, so I don't know if I got anything wrong.

Also, my rPi does not show up in ports, but I'm not sure what the debugging steps, are. sshd is listening on port 22 over wifi, I can ssh in, but the instructions say to install an avahi service also running on tcp port 22, which can't be working at the same time, so I'm a bit confused how it could work.

With arduino 1.8.9, I can't get anything to upload:

:0:0: fatal error: opening dependency file /dev/null.d: Permission denied I have /dev/null with proper permissions, but /dev/null.d does not exist. Apparently others have seen this too: https://forum.arduino.cc/index.php?topic=571976.0 ``` /var/local/arduino-1.8.9/arduino-builder -dump-prefs -logger=machine -hardware /var/local/arduino-1.8.9/hardware -hardware /home/merlin/.arduino15/packages -hardware /home/merlin/Arduino/hardware -tools /var/local/arduino-1.8.9/tools-builder -tools /var/local/arduino-1.8.9/hardware/tools/avr -tools /home/merlin/.arduino15/packages -built-in-libraries /var/local/arduino-1.8.9/libraries -libraries /home/merlin/Arduino/libraries -fqbn=RaspberryPi:piduino:bplus:SerialDestination=enabled,GDBDebug=disabled -vid-pid=10C4_EA60 -ide-version=10809 -build-path /tmp/arduino_build_844378 -warnings=all -build-cache /tmp/arduino_cache_573087 -prefs=build.warn_data_percentage=75 -verbose /home/merlin/Arduino/hardware/RaspberryPi/piduino/libraries/Bridge/examples/TimeCheck/TimeCheck.ino /var/local/arduino-1.8.9/arduino-builder -compile -logger=machine -hardware /var/local/arduino-1.8.9/hardware -hardware /home/merlin/.arduino15/packages -hardware /home/merlin/Arduino/hardware -tools /var/local/arduino-1.8.9/tools-builder -tools /var/local/arduino-1.8.9/hardware/tools/avr -tools /home/merlin/.arduino15/packages -built-in-libraries /var/local/arduino-1.8.9/libraries -libraries /home/merlin/Arduino/libraries -fqbn=RaspberryPi:piduino:bplus:SerialDestination=enabled,GDBDebug=disabled -vid-pid=10C4_EA60 -ide-version=10809 -build-path /tmp/arduino_build_844378 -warnings=all -build-cache /tmp/arduino_cache_573087 -prefs=build.warn_data_percentage=75 -verbose /home/merlin/Arduino/hardware/RaspberryPi/piduino/libraries/Bridge/examples/TimeCheck/TimeCheck.ino Using board 'bplus' from platform in folder: /home/merlin/Arduino/hardware/RaspberryPi/piduino Using core 'piduino' from platform in folder: /home/merlin/Arduino/hardware/RaspberryPi/piduino /home/merlin/Arduino/hardware/RaspberryPi/piduino/tools/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -I/home/merlin/Arduino/hardware/RaspberryPi/piduino/tools/compat/include -D_GNU_SOURCE -O3 -c -MD -pipe -w -x c++ -E -CC -w -DARDUINO=10809 -DARDUINO_RASPI -DARDUINO_ARCH_PIDUINO -DRASPI -DSERIAL_TO_CONSOLE -I/home/merlin/Arduino/hardware/RaspberryPi/piduino/cores/piduino -I/home/merlin/Arduino/hardware/RaspberryPi/piduino/variants/bplus /tmp/arduino_build_844378/sketch/TimeCheck.ino.cpp -o /dev/null /home/merlin/Arduino/hardware/RaspberryPi/piduino/tools/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -I/home/merlin/Arduino/hardware/RaspberryPi/piduino/tools/compat/include -D_GNU_SOURCE -O3 -c -MD -pipe -w -x c++ -E -CC -w -DARDUINO=10809 -DARDUINO_RASPI -DARDUINO_ARCH_PIDUINO -DRASPI -DSERIAL_TO_CONSOLE -I/home/merlin/Arduino/hardware/RaspberryPi/piduino/cores/piduino -I/home/merlin/Arduino/hardware/RaspberryPi/piduino/variants/bplus -I/home/merlin/Arduino/hardware/RaspberryPi/piduino/libraries/Bridge/src /tmp/arduino_build_844378/sketch/TimeCheck.ino.cpp -o /dev/null Multiple libraries were found for "Process.h" :0:0: fatal error: opening dependency file /dev/null.d: Permission denied Used: /home/merlin/Arduino/hardware/RaspberryPi/piduino/libraries/Bridge compilation terminated. Not used: /var/local/arduino-1.8.9/libraries/Bridge Using library Bridge at version 1.6.0 in folder: /home/merlin/Arduino/hardware/RaspberryPi/piduino/libraries/Bridge exit status 1 Error compiling for board RaspberryPI B+/2. ```
marcmerlin commented 5 years ago

Verified that it builds with an older arduino IDE, namely 1.5.8. Just checked that 1.8.5 works too. but 1.8.6 and 1.8.8 do not work. (for building that is) Still have to figure out the uploading part.

marcmerlin commented 5 years ago

Mmh, only a single build works (build, not upload). First build works:

"/home/merlin/Arduino/hardware/RaspberryPi/piduino/tools/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-ar" cru  "/tmp/arduino_build_360862/arduino.ar" "/tmp/arduino_build_360862/core/cbuf.cpp.o"
"/home/merlin/Arduino/hardware/RaspberryPi/piduino/tools/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-ar" cru  "/tmp/arduino_build_360862/arduino.ar" "/tmp/arduino_build_360862/core/stdlib_noniso.cpp.o"
"/home/merlin/Arduino/hardware/RaspberryPi/piduino/tools/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-ar" cru  "/tmp/arduino_build_360862/arduino.ar" "/tmp/arduino_build_360862/core/wiring_main.cpp.o"
Archiving built core (caching) in: /tmp/arduino_cache_972970/core/core_RaspberryPi_piduino_bplus_SerialDestination_enabled,GDBDebug_disabled_8a6ae3da3f0da67ee00993dd1eaf6d82.a
Linking everything together...
"/home/merlin/Arduino/hardware/RaspberryPi/piduino/tools/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++" -o "/tmp/arduino_build_360862/ConsoleAsciiTable.ino.hex"   -Wl,--start-group "/tmp/arduino_build_360862/sketch/ConsoleAsciiTable.ino.cpp.o" "/tmp/arduino_build_360862/libraries/Bridge/Bridge.cpp.o" "/tmp/arduino_build_360862/libraries/Bridge/BridgeClient.cpp.o" "/tmp/arduino_build_360862/libraries/Bridge/BridgeServer.cpp.o" "/tmp/arduino_build_360862/libraries/Bridge/BridgeUdp.cpp.o" "/tmp/arduino_build_360862/libraries/Bridge/FileIO.cpp.o" "/tmp/arduino_build_360862/libraries/Bridge/HttpClient.cpp.o" "/tmp/arduino_build_360862/libraries/Bridge/Mailbox.cpp.o" "/tmp/arduino_build_360862/libraries/Bridge/Process.cpp.o" "/tmp/arduino_build_360862/arduino.ar" -lpthread -lm -Wl,--end-group "-L/tmp/arduino_build_360862"
Multiple libraries were found for "Bridge.h"
 Used: /home/merlin/Arduino/hardware/RaspberryPi/piduino/libraries/Bridge
 Not used: /var/local/arduino-1.8.5/libraries/Bridge
Using library Bridge at version 1.6.0 in folder: /home/merlin/Arduino/hardware/RaspberryPi/piduino/libraries/Bridge 

2nd build fails:

"/home/merlin/Arduino/hardware/RaspberryPi/piduino/tools/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++" "-I/home/merlin/Arduino/hardware/RaspberryPi/piduino/tools/compat/include" -D_GNU_SOURCE -O3  -c -MD -pipe -w -x c++ -E -CC -w -DARDUINO=10805 -DARDUINO_RASPI -DARDUINO_ARCH_PIDUINO  -DRASPI -DSERIAL_TO_CONSOLE "-I/home/merlin/Arduino/hardware/RaspberryPi/piduino/cores/piduino" "-I/home/merlin/Arduino/hardware/RaspberryPi/piduino/variants/bplus" "/tmp/arduino_build_360862/sketch/ConsoleAsciiTable.ino.cpp" -o "/dev/null"
"/home/merlin/Arduino/hardware/RaspberryPi/piduino/tools/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++" "-I/home/merlin/Arduino/hardware/RaspberryPi/piduino/tools/compat/include" -D_GNU_SOURCE -O3  -c -MD -pipe -w -x c++ -E -CC -w -DARDUINO=10805 -DARDUINO_RASPI -DARDUINO_ARCH_PIDUINO  -DRASPI -DSERIAL_TO_CONSOLE "-I/home/merlin/Arduino/hardware/RaspberryPi/piduino/cores/piduino" "-I/home/merlin/Arduino/hardware/RaspberryPi/piduino/variants/bplus" "-I/home/merlin/Arduino/hardware/RaspberryPi/piduino/libraries/Bridge/src" "/tmp/arduino_build_360862/sketch/ConsoleAsciiTable.ino.cpp" -o "/dev/null"
"/home/merlin/Arduino/hardware/RaspberryPi/piduino/tools/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++" "-I/home/merlin/Arduino/hardware/RaspberryPi/piduino/tools/compat/include" -D_GNU_SOURCE -O3  -c -MD -pipe -w -x c++ -E -CC -w -DARDUINO=10805 -DARDUINO_RASPI -DARDUINO_ARCH_PIDUINO  -DRASPI -DSERIAL_TO_CONSOLE "-I/home/merlin/Arduino/hardware/RaspberryPi/piduino/cores/piduino" "-I/home/merlin/Arduino/hardware/RaspberryPi/piduino/variants/bplus" "-I/home/merlin/Arduino/hardware/RaspberryPi/piduino/libraries/Bridge/src" "/tmp/arduino_build_360862/sketch/ConsoleAsciiTable.ino.cpp" -o "/tmp/arduino_build_360862/preproc/ctags_target_for_gcc_minus_e.cpp"
panic: runtime error: index out of range

goroutine 1 [running]:
panic(0x556bc0, 0xc420010120)
    /home/jenkins/go/src/runtime/panic.go:500 +0x1a1
arduino.cc/builder.findIncludesUntilDone(0xc420036c00, 0xc420516270, 0x556f40, 0xc42050d1d0, 0xc42033c707, 0xa, 0x0, 0x0)
    /home/jenkins/workspace/arduino-builder-all-cross/src/arduino.cc/builder/container_find_includes.go:321 +0x138f
arduino.cc/builder.(*ContainerFindIncludes).Run(0x64d248, 0xc420036c00, 0x41bc3c3c, 0x0)
    /home/jenkins/workspace/arduino-builder-all-cross/src/arduino.cc/builder/container_find_includes.go:149 +0x5e4
arduino.cc/builder.runCommands(0xc420036c00, 0xc420461ae8, 0x22, 0x22, 0x1, 0x0, 0x0)
    /home/jenkins/workspace/arduino-builder-all-cross/src/arduino.cc/builder/builder.go:191 +0xcd
arduino.cc/builder.(*Builder).Run(0xc420461d38, 0xc420036c00, 0xc420047d88, 0x562240)
    /home/jenkins/workspace/arduino-builder-all-cross/src/arduino.cc/builder/builder.go:124 +0xb9c
arduino.cc/builder.RunBuilder(0xc420036c00, 0xc420047d88, 0x64d248)
    /home/jenkins/workspace/arduino-builder-all-cross/src/arduino.cc/builder/builder.go:222 +0x35
main.main()
    /home/jenkins/workspace/arduino-builder-all-cross/src/arduino.cc/arduino-builder/main.go:338 +0x99c
/var/local/arduino-1.8.5/arduino-builder returned 2
Error compiling for board RaspberryPI B+/2.

That said, if I take the binary from the first build and manually copy it over and run it, it does work.

marcmerlin commented 5 years ago

moved the upload issue to a different issue: https://github.com/me-no-dev/RasPiArduino/issues/100