Molorius/esp32-websocket

Linking errors _binary_root_html_end_

cnlohr opened this issue · 3 comments

Not sure how to get past this... Am I missing a step?

Toolchain version: crosstool-ng-1.22.0-80-g6c4433a
Compiler version: 5.2.0
Python requirements from /home/cnlohr/esp/esp-idf/requirements.txt are satisfied.

App "websockets_esp_idf" version: e8fad4b-dirty
LD build/websockets_esp_idf.elf
/home/cnlohr/git/WebSockets-ESP-IDF/build/main/libmain.a(main.o):(.literal.http_serve+0x0): undefined reference to `_binary_root_html_end'
/home/cnlohr/git/WebSockets-ESP-IDF/build/main/libmain.a(main.o):(.literal.http_serve+0x4): undefined reference to `_binary_root_html_start'
/home/cnlohr/git/WebSockets-ESP-IDF/build/main/libmain.a(main.o):(.literal.http_serve+0x8): undefined reference to `_binary_test_js_end'
/home/cnlohr/git/WebSockets-ESP-IDF/build/main/libmain.a(main.o):(.literal.http_serve+0xc): undefined reference to `_binary_test_js_start'
/home/cnlohr/git/WebSockets-ESP-IDF/build/main/libmain.a(main.o):(.literal.http_serve+0x10): undefined reference to `_binary_test_css_end'
/home/cnlohr/git/WebSockets-ESP-IDF/build/main/libmain.a(main.o):(.literal.http_serve+0x14): undefined reference to `_binary_test_css_start'
/home/cnlohr/git/WebSockets-ESP-IDF/build/main/libmain.a(main.o):(.literal.http_serve+0x18): undefined reference to `_binary_favicon_ico_end'
/home/cnlohr/git/WebSockets-ESP-IDF/build/main/libmain.a(main.o):(.literal.http_serve+0x1c): undefined reference to `_binary_favicon_ico_start'
/home/cnlohr/git/WebSockets-ESP-IDF/build/main/libmain.a(main.o):(.literal.http_serve+0x20): undefined reference to `_binary_error_html_end'
/home/cnlohr/git/WebSockets-ESP-IDF/build/main/libmain.a(main.o):(.literal.http_serve+0x24): undefined reference to `_binary_error_html_start'
collect2: error: ld returned 1 exit status
/home/cnlohr/esp/esp-idf/make/project.mk:481: recipe for target '/home/cnlohr/git/WebSockets-ESP-IDF/build/websockets_esp_idf.elf' failed
make: *** [/home/cnlohr/git/WebSockets-ESP-IDF/build/websockets_esp_idf.elf] Error 1

I assume you're using a modified version of the example code code? That error has to do with embedding binary data, which is part of the esp-idf build system. It is how I include the files that the web page serves, and is not technically part of this websocket component.

EDIT: That error just means that it can't find those files to be embedded in the esp32's flash memory. In that example, look under main/component.mk and main/server/component.mk for an example on how I was able to embed those files.

Hmm Ok. will look later. Going to want to use a few different options to try to compare performance.

Okay. I'm going to close this because it doesn't fit with this component, but feel free to open an issue in the above-linked example code.