SandboxElectronics / LoRaGoDOCK-Gateway

Source code for single-channel LoRaWAN Gateway based on LoRaGo DOCK (ESP8266 and SX1276)
MIT License
33 stars 14 forks source link

undefined reference to `base64_enc_len(int)' #12

Open koos147 opened 3 years ago

koos147 commented 3 years ago

Good day,

I try to re-flash my single channel gateway. the ArduinoJson 6 gave me an error about no longer compatible. so i downgraded to ArduinoJson 5.13.5. however as you can see things are not going as smooth as expected.

However my knowledge great enough to understand what is going wrong.

Arduino: 1.8.10 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, All Flash Contents, 115200"

c:/users/mark/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: sketch\LoRaGoDOCK-Gateway-0.8.2.ino.cpp.o:(.text._Z11buildPacketjPhS_cb+0x94): undefined reference to `base64_enc_len(int)'

c:/users/mark/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: sketch\LoRaGoDOCK-Gateway-0.8.2.ino.cpp.o:(.text._Z11buildPacketjPhS_cb+0x98): undefined reference to `base64_encode(char*, char*, int)'

c:/users/mark/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: sketch\LoRaGoDOCK-Gateway-0.8.2.ino.cpp.o: in function `buildPacket(unsigned int, unsigned char*, unsigned char*, char, bool)':

K:\HomeAutomation\LoRa\LoRaGoDOCK-Gateway-0.8.2/_loraModem.ino:815: undefined reference to `base64_enc_len(int)'

c:/users/mark/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: K:\HomeAutomation\LoRa\LoRaGoDOCK-Gateway-0.8.2/_loraModem.ino:816: undefined reference to `base64_encode(char*, char*, int)'

c:/users/mark/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: K:\HomeAutomation\LoRa\LoRaGoDOCK-Gateway-0.8.2/_loraModem.ino:898: undefined reference to `base64_enc_len(int)'

c:/users/mark/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: K:\HomeAutomation\LoRa\LoRaGoDOCK-Gateway-0.8.2/_loraModem.ino:900: undefined reference to `base64_encode(char*, char*, int)'

Multiple libraries were found for "TimeLib.h"
c:/users/mark/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: sketch\LoRaGoDOCK-Gateway-0.8.2.ino.cpp.o:(.text._Z10sendPacketPhh+0x78): undefined reference to `base64_dec_len(char*, int)'

 Used: K:\Documents\Arduino\libraries\arduino_436460
Multiple libraries were found for "ESP8266mDNS.h"
 Used: C:\Users\mark\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266mDNS
Multiple libraries were found for "Streaming.h"
 Used: K:\Documents\Arduino\libraries\Streaming
Multiple libraries were found for "SPI.h"
 Used: C:\Users\mark\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\SPI
Multiple libraries were found for "DNSServer.h"
 Used: C:\Users\mark\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\DNSServer
Multiple libraries were found for "SimpleTimer.h"
 Used: K:\Documents\Arduino\libraries\SimpleTimer
Multiple libraries were found for "ESP8266httpUpdate.h"
 Used: C:\Users\mark\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266httpUpdate
Multiple libraries were found for "ESP8266HTTPClient.h"
 Used: C:\Users\mark\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266HTTPClient
Multiple libraries were found for "ArduinoOTA.h"
c:/users/mark/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: sketch\LoRaGoDOCK-Gateway-0.8.2.ino.cpp.o:(.text._Z10sendPacketPhh+0x7c): undefined reference to `base64_decode(char*, char*, int)'

 Used: C:\Users\mark\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ArduinoOTA
Multiple libraries were found for "ESP8266WebServer.h"
 Used: C:\Users\mark\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WebServer
Multiple libraries were found for "ESP8266WiFi.h"
 Used: C:\Users\mark\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi
c:/users/mark/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: sketch\LoRaGoDOCK-Gateway-0.8.2.ino.cpp.o: in function `sendPacket(unsigned char*, unsigned char)':

sketch\ArduinoJson-5.13.5\src/ArduinoJson/JsonVariantImpl.hpp:53: undefined reference to `base64_dec_len(char*, int)'

c:/users/mark/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: sketch\LoRaGoDOCK-Gateway-0.8.2.ino.cpp.o: in function `sendPacket(unsigned char*, unsigned char)':

sketch\ArduinoJson-5.13.5\src/ArduinoJson/Polyfills/parseInteger.hpp:18: undefined reference to `base64_decode(char*, char*, int)'

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
b-bernier commented 2 years ago

I "bypass" this issue by adding a file Base64.cpp and Base64.h with the code from gBase64 provided in the documentation