Looking for help with component.mk warnings in libesphttpd

cmorgan
Posts: 89
Joined: Thu Aug 24, 2017 12:52 am

Looking for help with component.mk warnings in libesphttpd

Postby cmorgan » Wed Sep 20, 2017 4:57 pm

Hi all.

I've added support for https (ssl) to libesphttpd and I'm looking to solve some errors that are popping up with the latest esp-idf master. I suspect these errors are due to improvements in variable detection in master and are issues in libesphttpd/component.mk

Branch is at https://github.com/chmorgan/libesphttpd ... f_chmorgan

...
/home/cmorgan/projects/esp-idf/components/libesphttpd/component.mk:44: warning: undefined variable 'Q'
/home/cmorgan/projects/esp-idf/components/libesphttpd/component.mk:45: warning: undefined variable 'Q'
/home/cmorgan/projects/esp-idf/components/libesphttpd/component.mk:45: warning: undefined variable 'USE_HEATSHRINK'
/home/cmorgan/projects/esp-idf/components/libesphttpd/component.mk:45: warning: undefined variable 'GZIP_COMPRESSION'
/home/cmorgan/projects/esp-idf/components/libesphttpd/component.mk:34: warning: undefined variable 'Q'
index.html (102%, none)
wifi/140medley.min.js (100%, none)
wifi/connecting.html (100%, none)
wifi/icons.png (100%, none)
wifi/style.css (100%, none)
wifi/wifi.tpl (100%, none)
websocket/index.html (100%, none)
/home/cmorgan/projects/esp-idf/components/libesphttpd/component.mk:38: warning: undefined variable 'Q'
/home/cmorgan/projects/esp-idf/components/libesphttpd/component.mk:39: warning: undefined variable 'Q'
/home/cmorgan/projects/esp-idf/components/libesphttpd/component.mk:40: warning: undefined variable 'Q'
...

I'm a bit lost as to where to go from here. I know there is something not quite right in the libesphttpd/component.mk file but I'm not sure where to start. Any ideas?

I can create an example app that contains esp-idf master and adds libesphttpd as a component to make it easier to reproduce these errors if that would be helpful. Let me know if that would be helpful.

Chris

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: Looking for help with component.mk warnings in libesphttpd

Postby ESP_igrr » Wed Sep 20, 2017 5:33 pm

All these warnings are harmless, but the component.mk file needs to be updated to take latest IDF changes into account.

cmorgan
Posts: 89
Joined: Thu Aug 24, 2017 12:52 am

Re: Looking for help with component.mk warnings in libesphttpd

Postby cmorgan » Wed Sep 20, 2017 6:21 pm

ESP_igrr wrote:All these warnings are harmless, but the component.mk file needs to be updated to take latest IDF changes into account.
Hi ESP_igrr, would you have any pointers to what changes might have to be made or another file I can borrow from? libesphttpd has more logic in it than most component.mk files and I've tried to find similar examples but still aren't sure how to resolve the issue.

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: Looking for help with component.mk warnings in libesphttpd

Postby ESP_igrr » Wed Sep 20, 2017 6:52 pm

1. Usage of undefined variables now triggers warnings, ifdef/ifndef should be used to check variables before usage:
http://esp-idf.readthedocs.io/en/latest ... -variables

2. $(Q) needs to be replaced with $(summary)

(as in https://github.com/espressif/esp-idf/bl ... ct.mk#L359)

This is needed because of two changes:
https://github.com/espressif/esp-idf/co ... 0fa674ecb6
https://github.com/espressif/esp-idf/co ... 72765386ee

cmorgan
Posts: 89
Joined: Thu Aug 24, 2017 12:52 am

Re: Looking for help with component.mk warnings in libesphttpd

Postby cmorgan » Wed Sep 20, 2017 11:17 pm

ESP_igrr wrote:1. Usage of undefined variables now triggers warnings, ifdef/ifndef should be used to check variables before usage:
http://esp-idf.readthedocs.io/en/latest ... -variables

2. $(Q) needs to be replaced with $(summary)

(as in https://github.com/espressif/esp-idf/bl ... ct.mk#L359)

This is needed because of two changes:
https://github.com/espressif/esp-idf/co ... 0fa674ecb6
https://github.com/espressif/esp-idf/co ... 72765386ee

Ahh thank you, that is very helpful! Let me nail those and take a look at the ifdef checks and then see what else pops up.

cmorgan
Posts: 89
Joined: Thu Aug 24, 2017 12:52 am

Re: Looking for help with component.mk warnings in libesphttpd

Postby cmorgan » Sat Sep 23, 2017 8:06 pm

This helped a ton. I was able to fix those issues and additional ones, most of them cleanly even! Thank you again.

dkaufmann
Posts: 24
Joined: Wed May 17, 2017 9:06 am

Re: Looking for help with component.mk warnings in libesphttpd

Postby dkaufmann » Wed Oct 04, 2017 3:33 pm

Hi everyone,

thanks for your effort to make libesphttpd compatible with ESP32 and SSL/TLS. it is exactly what I need. I added the libesphttpd as component in my esp-idf. it appears no in the menuconfig as new component where I can do the component settings.

But how can I use the library now? Is there an example (like esphttpd for ESP8266) running on ESP-IDF? I was not able to get it running.

any help is very appreciated.

Thank you!

grooves
Posts: 12
Joined: Fri Aug 25, 2017 2:51 pm

Re: Looking for help with component.mk warnings in libesphttpd

Postby grooves » Thu Oct 26, 2017 3:29 pm

Hi,

here an example how to use libesphttpd with IDF project
It is based on Spritetm git examples,
the original one's with cat pictures, :-)
with removed warnings and working heatshrink compression

Regards,
Grooves
Attachments
libesphttpd_example.zip
(253.99 KiB) Downloaded 640 times

Who is online

Users browsing this forum: Google [Bot] and 87 guests