Cant build DuetWifiServer



  • Hello,
    i cant build the DuetWifiServer, and eclipse send this error:

    make all
    Building file: ../src/HSPI.cpp
    /bin/sh: xtensa-lx106-elf-g++: command not found
    Invoking: Cross G++ Compiler
    xtensa-lx106-elf-g++ -std=c++0x -D__ets__ -DICACHE_FLASH -DF_CPU=80000000L -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12 -DARDUINO=10606 -U__STRICT_ANSI__ -I"/Users/xxx/Workspace/c++/CoreESP8266/cores/esp8266" -I"/Users/xxx/Workspace/c++/CoreESP8266/variants/nodemcu" -I"/Users/xxx/Workspace/c++/CoreESP8266/libraries/ESP8266WiFi/src" -I"/Users/xxx/Workspace/c++/CoreESP8266/libraries/ESP8266mDNS" -I"/Users/xxx/Workspace/c++/CoreESP8266/libraries/DNSServer/src" -I"/Users/xxx/Workspace/c++/CoreESP8266/libraries/EEPROM" -I"/Users/xxx/Workspace/c++/CoreESP8266/sdk/include" -Os -Wall -c -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -ffunction-sections -fdata-sections -MMD -MP -MF"src/HSPI.d" -MT"src/HSPI.o" -o "src/HSPI.o" "../src/HSPI.cpp"
    make: *** [src/HSPI.o] Error 127

    I have read , that i also need the CoreESP8266 in my eclipse workspace, but when i try to build this first, i get this errorMessage:

    make all
    Building file: ../libraries/ESP8266mDNS/ESP8266mDNS.cpp
    Invoking: Cross G++ Compiler
    xtensa-lx106-elf-g++ -std=gnu++11 -D__ets__ -DICACHE_FLASH -DF_CPU=80000000L -DARDUINO=10606 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266 -DESP8266 -I"/Users/xxx/Workspace/c++/CoreESP8266/cores/esp8266" -I"/Users/xxx/Workspace/c++/CoreESP8266/variants/nodemcu" -I"/Users/xxx/Workspace/c++/CoreESP8266/libraries/ESP8266WiFi/src" -I"/Users/xxx/Workspace/c++/CoreESP8266/libraries/ESP8266mDNS" -I"/Users/xxx/Workspace/c++/CoreESP8266/sdk/include" -Os -g -Wall -c -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -ffunction-sections -fdata-sections -MMD -MP -MF"libraries/ESP8266mDNS/ESP8266mDNS.d" -MT"libraries/ESP8266mDNS/ESP8266mDNS.o" -o "libraries/ESP8266mDNS/ESP8266mDNS.o" "../libraries/ESP8266mDNS/ESP8266mDNS.cpp"
    In file included from /Users/xxx/Workspace/c++/CoreESP8266/libraries/ESP8266WiFi/src/ESP8266WiFi.h:40:0,
    from ../libraries/ESP8266mDNS/ESP8266mDNS.h:46,
    from ../libraries/ESP8266mDNS/ESP8266mDNS.cpp:41:
    /Users/xxx/Workspace/c++/CoreESP8266/libraries/ESP8266WiFi/src/WiFiServer.h:28:39: fatal error: lwip/err.h: No such file or directory
    #include "lwip/err.h" // for err_t
    ^
    compilation terminated.
    make: *** [libraries/ESP8266mDNS/ESP8266mDNS.o] Error 1

    I think the main problem is, that eclipse cant find the command xtensa-lx106-elf-g++ . I already linked this to my environment variable , and my shell knows the command. Iam working with a mac and Eclipse IDE for C/C++ Developers. For the first steps , i used this manual : https://github.com/dc42/RepRapFirmware/blob/dev/BuildInstructions.md

    Best regards
    Erik


  • administrators

    You need the LwipESP8266 project in your Eclipse workspace too.



  • oh ok , thanks.
    but i get the error:

    /bin/sh: xtensa-lx106-elf-gcc: command not found

    how can i fix that ?


  • administrators

    @eberlin said in Cant build DuetWifiServer:

    oh ok , thanks.
    but i get the error:

    /bin/sh: xtensa-lx106-elf-gcc: command not found

    how can i fix that ?

    Make sure that the compiler is on your PATH. The earlier message indicates that it did find xtensa-lx106-elf-g++. I think you should have the xtensa-lx106-elf-gcc file in the same directory.



  • ok,
    I have built "LwipESP8266" at first and "CoreESP8266" at second.without any errors.
    but when i building "DuetWifiServer" i got this error:

    make all
    Building file: ../src/Parsing.cpp
    Invoking: Cross G++ Compiler
    xtensa-lx106-elf-g++ -std=c++0x -D__ets__ -DICACHE_FLASH -DF_CPU=80000000L -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12 -DARDUINO=10606 -U__STRICT_ANSI__ -I"/Users/xxx/Workspace/c++/CoreESP8266/cores/esp8266" -I"/Users/xxx/Workspace/c++/CoreESP8266/variants/nodemcu" -I"/Users/xxx/Workspace/c++/CoreESP8266/libraries/ESP8266WiFi/src" -I"/Users/xxx/Workspace/c++/CoreESP8266/libraries/ESP8266mDNS" -I"/Users/xxx/Workspace/c++/CoreESP8266/libraries/DNSServer/src" -I"/Users/xxx/Workspace/c++/CoreESP8266/libraries/EEPROM" -I"/Users/xxx/Workspace/c++/CoreESP8266/sdk/include" -Os -Wall -c -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -ffunction-sections -fdata-sections -MMD -MP -MF"src/Parsing.d" -MT"src/Parsing.o" -o "src/Parsing.o" "../src/Parsing.cpp"
    In file included from ../src/Parsing.cpp:23:0:
    /Users/xxx/Workspace/c++/CoreESP8266/libraries/ESP8266WiFi/src/WiFiServer.h:28:39: fatal error: lwip/err.h: No such file or directory
    #include "lwip/err.h" // for err_t
    ^
    compilation terminated.
    make: *** [src/Parsing.o] Error 1


  • administrators

    Project DuetWiFiServer is obsolete. Use project DuetWiFiSocketServer instead.



  • thanks a lot,

    I have built "LwipESP8266" and "CoreESP8266" , again without any errors, but when i building "DuetWifiSocketServer" i got his error message :

    Building target: DuetWiFiSocketServer.elf
    Invoking: Cross G++ Linker
    xtensa-lx106-elf-g++ -nostdlib -L"/Users/xxx/Workspace/c++/CoreESP8266/Release" -L"/Users/xxx/Workspace/c++/CoreESP8266/sdk/lib" -L"/Users/xxx/Workspace/c++/DuetWiFiSocketServer/src/ld" -TDuetWiFiSocketServer.ld -Wl,--no-check-sections -u call_user_start -u _printf_float -u _scanf_float -Wl,-static -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read -Wl,-Map,DuetWiFiSocketServer.map -o "DuetWiFiSocketServer.elf" -Wl,--start-group ./src/Connection.o ./src/HSPI.o ./src/Listener.o ./src/Misc.o ./src/SocketServer.o -lCoreESP8266 -lhal -lphy -lpp -lnet80211 -lLwipESP8266 -lwpa -lcrypto -lmain -lwps -laxtls -lespnow -lsmartconfig -lairkiss -lmesh -lwpa2 -lstdc++ -lm -lc -lgcc -Wl,--end-group
    /Users/xxx/Documents/esp8266-Arduino-master/esp8266com/esp8266/tools/macosx/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: cannot find -lLwipESP8266
    collect2: error: ld returned 1 exit status
    make: *** [DuetWiFiSocketServer.elf] Error 1


  • administrators

    I think you are using incompatible versions of the various GitHub projects. I am out of the office, but AFAIR you need to use the dev branches of the 3 projects.



  • ok , this makes sense , thank you.
    i tried to use the projects from the dev branches , and when i built the "duetWifiServerSocket" project, i got this error :

    Building target: DuetWiFiSocketServer.elf
    Invoking: Cross G++ Linker
    xtensa-lx106-elf-g++ -nostdlib -L"/Users/xxx/Workspace/c++/LwipESP8266/Release" -L"/Users/xxx/Workspace/c++/CoreESP8266/Release" -L"/Users/xxx/Workspace/c++/CoreESP8266/sdk/lib" -L"/Users/xxx/Workspace/c++/DuetWiFiSocketServer/src/ld" -TDuetWiFiSocketServer.ld -Wl,--no-check-sections -u call_user_start -u _printf_float -u _scanf_float -Wl,-static -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read -Wl,-Map,DuetWiFiSocketServer.map -o "DuetWiFiSocketServer.elf" -Wl,--start-group /Users/xxx/Workspace/c++/CoreESP8266/Release/cores/esp8266/heap.o ./src/Connection.o ./src/HSPI.o ./src/Listener.o ./src/Misc.o ./src/SocketServer.o -lCoreESP8266 -lhal -lphy -lpp -lnet80211 -lLwipESP8266 -lwpa -lcrypto -lmain -lwps -laxtls -lespnow -lsmartconfig -lairkiss -lwpa2 -lstdc++ -lm -lc -lgcc -Wl,--end-group
    /Users/xxx/Documents/Arduino/hardware/esp8266com/esp8266/tools/macosx/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: cannot find -lLwipESP8266
    collect2: error: ld returned 1 exit status
    make: *** [DuetWiFiSocketServer.elf] Error 1


  • administrators

    Check that you have file libLwipESP8266.a in the Release folder within the LwipESP8266 project. That is the output file from building that project.

    I confirm that you need to use the dev branch of all 3 projects to build version 1.21.



  • hmm ok ,
    but i already use the dev branches for each of the 3 projects and i have a file named : "libLwipESP8266.a in the release folder of the LwipESP8266 project.


  • administrators

    In that case I suggest you check what the library path is set to in the linker settings for project DuetWiFiSocketServer, because that folder should be included in it.



  • 0_1525255641221_Bildschirmfoto 2018-05-02 um 12.06.34.png

    do you mean this settings ?


  • administrators

    @eberlin said in Cant build DuetWifiServer:

    xtensa-lx106-elf-g++ -nostdlib -L"/Users/xxx/Workspace/c++/LwipESP8266/Release" -L"/Users/xxx/Workspace/c++/CoreESP8266/Release" -L"/Users/xxx/Workspace/c++/CoreESP8266/sdk/lib" -L"/Users/xxx/Workspace/c++/DuetWiFiSocketServer/src/ld" -TDuetWiFiSocketServer.ld -Wl,--no-check-sections -u call_user_start -u _printf_float -u _scanf_float -Wl,-static -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read -Wl,-Map,DuetWiFiSocketServer.map -o "DuetWiFiSocketServer.elf" -Wl,--start-group /Users/xxx/Workspace/c++/CoreESP8266/Release/cores/esp8266/heap.o ./src/Connection.o ./src/HSPI.o ./src/Listener.o ./src/Misc.o ./src/SocketServer.o -lCoreESP8266 -lhal -lphy -lpp -lnet80211 -lLwipESP8266 -lwpa -lcrypto -lmain -lwps -laxtls -lespnow -lsmartconfig -lairkiss -lwpa2 -lstdc++ -lm -lc -lgcc -Wl,--end-group

    Yes, that looks OK. Looking at your command line from one of your previous posts:

    xtensa-lx106-elf-g++ -nostdlib -L"/Users/xxx/Workspace/c++/LwipESP8266/Release" -L"/Users/xxx/Workspace/c++/CoreESP8266/Release" -L"/Users/xxx/Workspace/c++/CoreESP8266/sdk/lib" -L"/Users/xxx/Workspace/c++/DuetWiFiSocketServer/src/ld" -TDuetWiFiSocketServer.ld -Wl,--no-check-sections -u call_user_start -u _printf_float -u _scanf_float -Wl,-static -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read -Wl,-Map,DuetWiFiSocketServer.map -o "DuetWiFiSocketServer.elf" -Wl,--start-group /Users/xxx/Workspace/c++/CoreESP8266/Release/cores/esp8266/heap.o ./src/Connection.o ./src/HSPI.o ./src/Listener.o ./src/Misc.o ./src/SocketServer.o -lCoreESP8266 -lhal -lphy -lpp -lnet80211 -lLwipESP8266 -lwpa -lcrypto -lmain -lwps -laxtls -lespnow -lsmartconfig -lairkiss -lwpa2 -lstdc++ -lm -lc -lgcc -Wl,--end-group

    the settings concerned (in bold) look OK to me too. Did you check that the case of the letters in the actual output file in /Users/xxx/Workspace/c++/CoreLwipESP8266/Release was exactly correct? I build under Windows, so an error in the letter case wouldn't matter on my system.



  • should i search for a output file named : lLwipESP8266 in
    /Users/xxx/Workspace/c++/CoreESP8266/Release ?
    there is no such file. 0_1525258088670_Bildschirmfoto 2018-05-02 um 12.47.35.png


  • administrators

    Sorry, I meant /Users/xxx/Workspace/c++/LwipESP8266/Release.



  • ah ok , in this folder i got this files:

    0_1525260216051_Bildschirmfoto 2018-05-02 um 13.22.53.png


  • administrators

    Looks like it's got the right file there, assuming that it is a sensible file and not zero length or something like that. I suggest you clean and rebuild project LwipESP8266. After that, if DuetWiFiSocketServer still won't link, try copying the libLwipESP8266.a file into one of the other library search directories, and/or ask for help with Eclipse and/or gcc.



  • i cleaned an rebuilt the project, and it still dont work. i also copied the file into some search directories, but it returned the same error ...


  • administrators

    Wierd, it's finding -lCoreESP8266 but not -lLwipESP8266 which has a similar format and the same number of characters. Does the libLwipESP8266.a file look a sensible size, and does it have the correct date/time corresponding to when you built it? My copy of that file is 423 KB (433,816 bytes) long. Were any errors reported when you cleaned and built project LwipESP8266 ?

    EDIT: for reference, this is what I get:

    'Invoking: Cross G++ Linker'
    xtensa-lx106-elf-g++ -nostdlib -L"C:\Eclipse\Firmware/LwipESP8266/Release" -L"C:\Eclipse\Firmware/CoreESP8266/Release" -L"C:\Eclipse\Firmware/CoreESP8266/sdk/lib" -L"C:\Eclipse\Firmware/DuetWiFiSocketServer/src/ld" -TDuetWiFiSocketServer.ld -Wl,--no-check-sections -u call_user_start -u _printf_float -u _scanf_float -Wl,-static -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read -Wl,-Map,DuetWiFiSocketServer.map -o "DuetWiFiSocketServer.elf" -Wl,--start-group C:\Eclipse\Firmware/CoreESP8266/Release/cores/esp8266/heap.o ./src/Connection.o ./src/HSPI.o ./src/Listener.o ./src/Misc.o ./src/SocketServer.o -lCoreESP8266 -lhal -lphy -lpp -lnet80211 -lLwipESP8266 -lwpa -lcrypto -lmain -lwps -laxtls -lespnow -lsmartconfig -lairkiss -lwpa2 -lstdc++ -lm -lc -lgcc -Wl,--end-group
    'Finished building target: DuetWiFiSocketServer.elf'


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.