zevv / nim-arduino

Trying to get Nim integrated into arduino IDE
55 stars 2 forks source link

missing file #3

Open mhessler97 opened 3 years ago

mhessler97 commented 3 years ago

I decided to attempt compilation on windows again now that nim 1.4 is out to see if might work this time and I'm getting a new error. https://pastebin.com/s1NixkZz appapently i am missing a file called nimbase.h. i'm not where that should be coming from as it isn't stated anywhere in the nim-arduino project what that is. any help would be appreciated. thank you

zevv commented 3 years ago

Quoting mhessler97 (2020-10-17 21:21:19)

I decided to attempt compilation on windows again now that nim 1.4 is out to see if might work this time and I'm getting a new error. https://pastebin.com/s1NixkZz appapently i am missing a file called nimbase.h. i'm not where that should be coming from as it isn't stated anywhere in the nim-arduino project what that is. any help would be appreciated. thank you

nimbase.h is part of the Nim distro, it lives in lib/nimbase.h. Afaik it has always been there and nothing has changed for v1.4.0.

Can you share the compiler invocation command line that gets logged, I believe it's the lines starting with '>>>'. There should be an include path in there pointing to your Nim base. (Your nim path does not happen to have a space in the file name, does it?)

-- :wq ^X^Cy^K^X^C^C^C^C

mhessler97 commented 3 years ago

`C:\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Arduino\hardware -tools C:\Arduino\tools-builder -tools C:\Arduino\hardware\tools\avr -built-in-libraries C:\Arduino\libraries -libraries C:\Users\matth\OneDrive\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=2341_0001 -ide-version=10813 -build-path C:\Users\matth\AppData\Local\Temp\arduino_build_148725 -warnings=none -build-cache C:\Users\matth\AppData\Local\Temp\arduino_cache_260224 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Arduino\hardware\tools\avr -verbose C:\Users\matth\OneDrive\Documents\Arduino\nim_blink\nim_blink.ino C:\Arduino\arduino-builder -compile -logger=machine -hardware C:\Arduino\hardware -tools C:\Arduino\tools-builder -tools C:\Arduino\hardware\tools\avr -built-in-libraries C:\Arduino\libraries -libraries C:\Users\matth\OneDrive\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=2341_0001 -ide-version=10813 -build-path C:\Users\matth\AppData\Local\Temp\arduino_build_148725 -warnings=none -build-cache C:\Users\matth\AppData\Local\Temp\arduino_cache_260224 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Arduino\hardware\tools\avr -verbose C:\Users\matth\OneDrive\Documents\Arduino\nim_blink\nim_blink.ino Using board 'uno' from platform in folder: C:\Arduino\hardware\arduino\avr Using core 'arduino' from platform in folder: C:\Arduino\hardware\arduino\avr Detecting libraries used... nim_arduino macros "--nimflags=\"--cpu:avr" --os:any --gc:arc --exceptions:goto --noMain -d:noSignalHandler -d:danger "-d:useMalloc\"" "--compiler=\"C:\Arduino\hardware\tools\avr/bin/avr-g++\"" "--cppflags=\"-c" -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Arduino\hardware\arduino\avr\variants\standard\"" "--input=\"C:\Users\matth\AppData\Local\Temp\arduino_build_148725\sketch\nim_blink.ino.cpp\"" "--output=\"nul\"" -DARDUINO_LIB_DISCOVERY_PHASE

macros --nimflags="--cpu:avr --os:any --gc:arc --exceptions:goto --noMain -d:noSignalHandler -d:danger -d:useMalloc" --compiler="C:\Arduino\hardware\tools\avr/bin/avr-g++" --cppflags="-c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Arduino\hardware\arduino\avr\cores\arduino -IC:\Arduino\hardware\arduino\avr\variants\standard" --input="C:\Users\matth\AppData\Local\Temp\arduino_build_148725\sketch\nim_blink.ino.cpp" --output="nul" -DARDUINO_LIB_DISCOVERY_PHASE nim cpp -c --nimcache:C:\Users\matth\AppData\Local\Temp\arduino_build_148725\sketch\nimcache --cpu:avr --os:any --gc:arc --exceptions:goto --noMain -d:noSignalHandler -d:danger -d:useMalloc C:\Users\matth\AppData\Local\Temp\arduino_build_148725\sketch\sketch.nim C:\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Arduino\hardware\arduino\avr\cores\arduino -IC:\Arduino\hardware\arduino\avr\variants\standard -IC:\Users\matth\scoop\apps\nim\1.2.0\lib C:\Users\matth\AppData\Local\Temp\arduino_build_148725\sketch\nimcache\@m..@s..@s..@s..@s..@s.nimble@spkgs@sarduino-0.1.0@sarduino.nim.cpp Error running command C:\Users\matth\AppData\Local\Temp\arduino_build_148725\sketch\nimcache\@m..@s..@s..@s..@s..@s.nimble@spkgs@sarduino-0.1.0@sarduino.nim.cpp:8:10: fatal error: nimbase.h: No such file or directory

include "nimbase.h"

^~~

Error while detecting libraries included by C:\Users\matth\AppData\Local\Temp\arduino_build_148725\sketch\nim_blink.ino.cpp Generating function prototypes... nim_arduino macros "--nimflags=\"--cpu:avr" --os:any --gc:arc --exceptions:goto --noMain -d:noSignalHandler -d:danger "-d:useMalloc\"" "--compiler=\"C:\Arduino\hardware\tools\avr/bin/avr-g++\"" "--cppflags=\"-c" -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Arduino\hardware\arduino\avr\variants\standard\"" "--input=\"C:\Users\matth\AppData\Local\Temp\arduino_build_148725\sketch\nim_blink.ino.cpp\"" "--output=\"C:\Users\matth\AppData\Local\Temp\arduino_build_148725\preproc\ctags_target_for_gcc_minus_e.cpp\"" -DARDUINO_LIB_DISCOVERY_PHASE

macros --nimflags="--cpu:avr --os:any --gc:arc --exceptions:goto --noMain -d:noSignalHandler -d:danger -d:useMalloc" --compiler="C:\Arduino\hardware\tools\avr/bin/avr-g++" --cppflags="-c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Arduino\hardware\arduino\avr\cores\arduino -IC:\Arduino\hardware\arduino\avr\variants\standard" --input="C:\Users\matth\AppData\Local\Temp\arduino_build_148725\sketch\nim_blink.ino.cpp" --output="C:\Users\matth\AppData\Local\Temp\arduino_build_148725\preproc\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE nim cpp -c --nimcache:C:\Users\matth\AppData\Local\Temp\arduino_build_148725\sketch\nimcache --cpu:avr --os:any --gc:arc --exceptions:goto --noMain -d:noSignalHandler -d:danger -d:useMalloc C:\Users\matth\AppData\Local\Temp\arduino_build_148725\sketch\sketch.nim C:\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Arduino\hardware\arduino\avr\cores\arduino -IC:\Arduino\hardware\arduino\avr\variants\standard -IC:\Users\matth\scoop\apps\nim\1.2.0\lib C:\Users\matth\AppData\Local\Temp\arduino_build_148725\sketch\nimcache\@m..@s..@s..@s..@s..@s.nimble@spkgs@sarduino-0.1.0@sarduino.nim.cpp Error running command C:\Users\matth\AppData\Local\Temp\arduino_build_148725\sketch\nimcache\@m..@s..@s..@s..@s..@s.nimble@spkgs@sarduino-0.1.0@sarduino.nim.cpp:8:10: fatal error: nimbase.h: No such file or directory

include "nimbase.h"

^~~

exit status 1 Error compiling for board Arduino Uno.`

this is the full error log

zevv commented 3 years ago

I see this include path in the cmdline:

-IC:\Users\matth\scoop\apps\nim\1.2.0\lib 

The C:\Users\matth\scoop\apps\nim\1.2.0 comes from Nims getCurrentCompilerExe(), so I assume your Nim binary is in there. Typically, in the lib subdirectory you should find your nimbase.h. Is it anywhere to be found in that directory or any of its subdirs?

mhessler97 commented 3 years ago

i figured out what it was. the original installation of nim-arduino was pointing to an incorrect nim path that no longer existed so I recompiled the package again and that error is gone. although so far it still seems to be hanging indefinitely but that is a different already known issue.