dingo35 / SmartEVSE-3.5

Smart Electric Vehicle Charging Station (EVSE)
MIT License
48 stars 21 forks source link

Unable to compile using instructions provided #108

Closed wouterbouvy closed 4 months ago

wouterbouvy commented 4 months ago

Describe the bug After following the instructions in the configuration.md I'm unable to compile due to errors in the mongoose webserver. Same goes for stable version.

Upload your config PlatformIO Core, version 6.1.15 on MacOS 14.5

Upload a debug log

.....omitted.....
Linking .pio/build/release/firmware.elf
/Users/wouter/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/release/src/mongoose.c.o:(.literal.packed_open+0x0): undefined reference to `mg_unpack'
/Users/wouter/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/release/src/mongoose.c.o:(.literal.packed_stat+0x0): undefined reference to `mg_unlist'
/Users/wouter/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/release/src/mongoose.c.o: in function `packed_open':
/Users/wouter/temp/SmartEVSE-3.5/SmartEVSE-3/src/mongoose.c:1893: undefined reference to `mg_unpack'
/Users/wouter/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/release/src/mongoose.c.o: in function `packed_stat':
/Users/wouter/temp/SmartEVSE-3.5/SmartEVSE-3/src/mongoose.c:1863: undefined reference to `mg_unpack'
/Users/wouter/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /Users/wouter/temp/SmartEVSE-3.5/SmartEVSE-3/src/mongoose.c:1865: undefined reference to `mg_unlist'
/Users/wouter/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/release/src/mongoose.c.o: in function `mg_unpacked':
/Users/wouter/temp/SmartEVSE-3.5/SmartEVSE-3/src/mongoose.c:1850: undefined reference to `mg_unpack'
/Users/wouter/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/release/src/mongoose.c.o: in function `packed_list':
/Users/wouter/temp/SmartEVSE-3.5/SmartEVSE-3/src/mongoose.c:1877: undefined reference to `mg_unlist'
collect2: error: ld returned 1 exit status
*** [.pio/build/release/firmware.elf] Error 1
========================== [FAILED] Took 9.45 seconds ==========================

To Reproduce Install PlatformIO Clone repo Build with pio run

Expected behavior A shiny new built firmware

Screenshots Scherm­afbeelding 2024-07-23 om 17 24 42

dingo35 commented 4 months ago

I'm sorry, I cannot reproduce this, in both Linux and Windows it compiles fine, so you will have to look for the problem in your dev environment.....

If you look at the error messages you can see that they are unjust, since e.g. mg_unpack is defined.

Try pio run -t clean and retry?!?

wouterbouvy commented 4 months ago

Running you command didn't help unfortunately. I tried this on 2 different MacOS machines without success. So I thought I might be MacOS related.

However, after installing a fresh Ubuntu 24.04 LTS VM, installing platformio and trying to compile, I run into the same issue.

dingo35 commented 4 months ago

If you look at the repository, in .github/workflows/*.yaml, you see how every push Ubuntu is installed, platformio is installed, and compilation is performed.

Follow the scripts....

wouterbouvy commented 4 months ago

I already looked to that before but that didn't help. However I found the issue by looking better at the logs.

sh: 1: python: not found

I had to create an alias to python3. Which can be done on Ubuntu with: sudo apt install python-is-python3

Also works on MacOS after following these instructions: https://opensource.com/article/19/5/python-3-default-mac