nesper icon indicating copy to clipboard operation
nesper copied to clipboard

Error while running esp_build on windows

Open Vince-LD opened this issue 2 years ago • 2 comments

Hello,

This issue is from copy of a post on this thread.

I have been following the installation guide on your github page and having an issue with nimbe esp_setup that throws out this error:

C:\Users\[user]\.nimble\pkgs2\nesper-0.6.1-9d526d2ec182747c58d820da1742d7a0d3d4647d\nesper\build_utils\tasks.nim(71, 5) Error: unhandled exception: error running getting Nesper path using: `%#` [ValueError]
nimscriptwrapper.nim(160) execScript
    
    Error:  Exception raised during nimble script execution

I have a fresh version of esp-idf, I am running on windows 10. I tried multiple things like uninstalling and reinstalling nesper, running the command in both powershell and normal terminal . When I copy line 67-69 to a new .nim file and execute it I don't get any error...

Vince-LD avatar Apr 09 '23 16:04 Vince-LD

I managed to fix the error by manually writing the nesper path in the tasks.nim file.

What I did is remove line 68-71 in nesper/build_utils/tasks and directly setup the variable nesperPath to the escaped string returned by nimble --silent path nesper when I excute it in my terminal.

All of this makes me thinks it's probably an error due to running on windows... :/

Vince-LD avatar Apr 09 '23 17:04 Vince-LD

Just a short update. I had a load of problems trying to make it work on windows so I decided to re-setup everything on WSL2. I could get Nesper 0.6.1 to compile (nimble esp_build always fails) so unfortunately I had to go back to version 0.6.0.

With this version the compilation starts but fails after some time:

[...]
/home/vincent/Documents/Nim/MCU/esp32_nim_example/main/nimcache/nimbase.h:589:64: note: in definition of macro 'nimSubInt'
  589 |     #define nimSubInt(a, b, res) __builtin_ssub_overflow(a, b, res)
      |                                                                ^~~
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /home/vincent/Documents/Nim/MCU/esp32_nim_example/build/log/idf_py_stderr_output_10947 and /home/vincent/Documents/Nim/MCU/esp32_nim_example/build/log/idf_py_stdout_output_10947
stack trace: (most recent call last)
/tmp/nimblecache-201274792/nimscriptapi_2043490750.nim(187, 16)
/home/vincent/.nimble/pkgs/nesper-0.6.0/nesper/build_utils/tasks.nim(236, 7) esp_buildTask
/home/vincent/.choosenim/toolchains/nim-1.6.12/lib/system/nimscript.nim(273, 7) exec
/home/vincent/.choosenim/toolchains/nim-1.6.12/lib/system/nimscript.nim(273, 7) Error: unhandled exception: FAILED: idf.py build [OSError]

Vince-LD avatar Apr 09 '23 21:04 Vince-LD