ThisSmartHouse / CoogleIOT

A ESP8266 Library for easy IOT device development
https://www.thissmarthouse.net/coogleiot/
Other
120 stars 29 forks source link

Linking problems with DNSServer with arduino-mk #18

Open flohoff opened 5 years ago

flohoff commented 5 years ago

Hi, when building with the Arduino IDE everythings fine - But building with arduino-mk fails with a linker error concerning DNSServer:

/home/flo/projects/arduino/tempsensor/Esp8266-Arduino-Makefile/esp8266-2.4.2/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc -g -Os -nostdlib -Wl,--no-check-sections -u call_user_start -u _printf_float -u _scanf_float -Wl,-static -L/home/flo/projects/arduino/tempsensor/Esp8266-Arduino-Makefile/esp8266-2.4.2/tools/sdk/lib -L/home/flo/projects/arduino/tempsensor/Esp8266-Arduino-Makefile/esp8266-2.4.2/tools/sdk/ld -L/home/flo/projects/arduino/tempsensor/Esp8266-Arduino-Makefile/esp8266-2.4.2/tools/sdk/libc/xtensa-lx106-elf/lib -Teagle.flash.4m1m.ld -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read -o build.nodemcu-2.4.2/tempsensor.elf -Wl,--start-group ./build.nodemcu-2.4.2/tempsensor.ino.cpp.o ./build.nodemcu-2.4.2/libraries/CoogleEEPROM.cpp.o ./build.nodemcu-2.4.2/libraries/CoogleIOTWebserver.cpp.o ./build.nodemcu-2.4.2/libraries/CoogleIOT.cpp.o ./build.nodemcu-2.4.2/libraries/DNSServer.cpp.o ./build.nodemcu-2.4.2/libraries/LUrlParser.cpp.o ./build.nodemcu-2.4.2/libraries/PubSubClient.cpp.o ./build.nodemcu-2.4.2/libraries/DNSServer.cpp.o ./build.nodemcu-2.4.2/libraries/EEPROM.cpp.o ./build.nodemcu-2.4.2/libraries/ESP8266HTTPClient.cpp.o ./build.nodemcu-2.4.2/libraries/Parsing.cpp.o ./build.nodemcu-2.4.2/libraries/ESP8266WebServer.cpp.o ./build.nodemcu-2.4.2/libraries/ESP8266WebServerSecureBearSSL.cpp.o ./build.nodemcu-2.4.2/libraries/ESP8266WebServerSecureAxTLS.cpp.o ./build.nodemcu-2.4.2/libraries/mimetable.cpp.o ./build.nodemcu-2.4.2/libraries/BearSSLHelpers.cpp.o ./build.nodemcu-2.4.2/libraries/ESP8266WiFiScan.cpp.o ./build.nodemcu-2.4.2/libraries/ESP8266WiFiSTA.cpp.o ./build.nodemcu-2.4.2/libraries/ESP8266WiFiAP.cpp.o ./build.nodemcu-2.4.2/libraries/CertStoreBearSSL.cpp.o ./build.nodemcu-2.4.2/libraries/WiFiServerSecureBearSSL.cpp.o ./build.nodemcu-2.4.2/libraries/ESP8266WiFiMulti.cpp.o ./build.nodemcu-2.4.2/libraries/ESP8266WiFi.cpp.o ./build.nodemcu-2.4.2/libraries/ESP8266WiFiGeneric.cpp.o ./build.nodemcu-2.4.2/libraries/WiFiUdp.cpp.o ./build.nodemcu-2.4.2/libraries/WiFiServer.cpp.o ./build.nodemcu-2.4.2/libraries/WiFiClient.cpp.o ./build.nodemcu-2.4.2/libraries/WiFiServerSecureAxTLS.cpp.o ./build.nodemcu-2.4.2/libraries/WiFiClientSecureBearSSL.cpp.o ./build.nodemcu-2.4.2/libraries/WiFiClientSecureAxTLS.cpp.o ./build.nodemcu-2.4.2/libraries/ESP8266httpUpdate.cpp.o ./build.nodemcu-2.4.2/libraries/ESP8266mDNS.cpp.o ./build.nodemcu-2.4.2/core/core.a -lhal -lphy -lpp -lnet80211 -llwip_gcc -lwpa -lcrypto -lmain -lwps -laxtls -lespnow -lsmartconfig -lairkiss -lwpa2 -lstdc++ -lm -lc -lgcc -Wl,--end-group -L./build.nodemcu-2.4.2
./build.nodemcu-2.4.2/libraries/DNSServer.cpp.o: In function `DNSServer::setTTL(unsigned int const&)':
/home/flo/projects/arduino/tempsensor/Esp8266-Arduino-Makefile/esp8266-2.4.2/libraries/DNSServer/src/DNSServer.cpp:6: multiple definition of `DNSServer::DNSServer()'
./build.nodemcu-2.4.2/libraries/DNSServer.cpp.o:/home/flo/projects/arduino/tempsensor/Esp8266-Arduino-Makefile/esp8266-2.4.2/libraries/DNSServer/src/DNSServer.cpp:6: first defined here
./build.nodemcu-2.4.2/libraries/DNSServer.cpp.o: In function `DNSServer::setTTL(unsigned int const&)':
/home/flo/projects/arduino/tempsensor/Esp8266-Arduino-Makefile/esp8266-2.4.2/libraries/DNSServer/src/DNSServer.cpp:6: multiple definition of `DNSServer::DNSServer()'
./build.nodemcu-2.4.2/libraries/DNSServer.cpp.o:/home/flo/projects/arduino/tempsensor/Esp8266-Arduino-Makefile/esp8266-2.4.2/libraries/DNSServer/src/DNSServer.cpp:6: first defined here
./build.nodemcu-2.4.2/libraries/DNSServer.cpp.o: In function `String::operator+=(char)':
/home/flo/projects/arduino/tempsensor/Esp8266-Arduino-Makefile/esp8266-2.4.2/libraries/DNSServer/src/DNSServer.cpp:28: multiple definition of `DNSServer::setErrorReplyCode(DNSReplyCode const&)'
./build.nodemcu-2.4.2/libraries/DNSServer.cpp.o:/home/flo/projects/arduino/tempsensor/Esp8266-Arduino-Makefile/esp8266-2.4.2/libraries/DNSServer/src/DNSServer.cpp:28: first defined here
./build.nodemcu-2.4.2/libraries/DNSServer.cpp.o: In function `DNSServer::processNextRequest()':

I trying to build with various combinations of

ARDUINO_LIBS=DNSServer CoogleIOT ESP8266HTTPClient ESP8266WiFi USER_DEFINE=-DARDUINO_ESP8266_ESP01 -DMQTT_MAX_PACKET_SIZE=512

Flo