espressif / esp-wolfssl

WolfSSL port for ESP-IDF & ESP8266_RTOS_SDK
38 stars 13 forks source link

make: *** No rule to make target #10

Closed ghenry closed 3 years ago

ghenry commented 3 years ago

Hi all,

What have we missed?

https://github.com/revk/SolarSystem/issues/67#issuecomment-881218710

Thanks.

revk commented 3 years ago

Thanks. I found the instructions for including WolfSSL in ESP IDF to be a bit lacking, but I thought this should have worked...

Any help appreciated

mahavirj commented 3 years ago

@ghenry @revk

You may refer to instructions at https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/protocols/esp_tls.html#how-to-use-wolfssl-with-esp-idf

revk commented 3 years ago

Thanks, that is what I was following (option 1)

  1. does the git clone not need --recursive
  2. make menuconfig works and allows me to select WolfSSL, good
  3. the build then fails.
igrr commented 3 years ago

@mahavirj I think the issue is that in https://github.com/espressif/esp-wolfssl/commit/901dd90f9a6c3d1cd4aed0774a2c20cbd9b3ae6f we have updated CMakeLists.txt but haven't updated component.mk (for the legacy GNU Make based build system), which is what the issue reporter is using.

ghenry commented 3 years ago

autotools isn't legacy :-)

revk commented 3 years ago

@mahavirj I think the issue is that in 901dd90 we have updated CMakeLists.txt but haven't updated component.mk (for the legacy GNU Make based build system), which is what the issue reporter is using.

What is the right (non legacy) way to make for ESP IDF then? I just type make.

mahavirj commented 3 years ago

We recommend using CMake build system, you may find getting-started instructions at:

https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html

For the missing "Make" build system support for wolfssl component, we will update and provide fix soon.

igrr commented 3 years ago

for the legacy GNU Make based build system

autotools isn't legacy :-)

@ghenry apologies for not being clear. I was referring to the build system of ESP-IDF project, not to GNU Make itself. Up until ESP-IDF v3.3, the build system of that project was written in Make. In v3.3, we have added a new build system, based on CMake, and made it the default on in v4.0. We still maintain support for the original Make-based build system in ESP-IDF, and plan to remove it in a future v5.0 version (around next year).

revk commented 3 years ago

Thanks for clarifying - I have never used cmake. But then I have been using make for many decades. I'll try wolfssl again, with make, ones this is updated.

mahavirj commented 3 years ago

@revk @ghenry

Can you please try replacing component.mk with one from fix_make_build_with_wolfssl_src_repo.tar.gz?

Let me know if that helps to fix problem for you.

revk commented 3 years ago

Well, progress.

A warning:

/projects/github/SolarSystem/ESP32/components/esp-wolfssl/wolfssl/src/ssl.c: In function 'wolfSSL_BN_get_word_1':
/projects/github/SolarSystem/ESP32/components/esp-wolfssl/wolfssl/src/ssl.c:51357:13: warning: left shift count >= width of type [-Wshift-count-overflow]
         ret <<= (WOLFSSL_BN_ULONG)DIGIT_BIT;

And undefined references to LowResTimer now. I'll go google that...

revk commented 3 years ago

Yeh, getting a but stuck on missing LowResTimer...

mahavirj commented 3 years ago

@revk

I do not see this issue locally on my side, can you please confirm that wolfssl submodule pointer is correct on your side?

$ cd esp-wolfssl
$ git submodule 
3f13b49fa318fbd3216d7da36d942e7c276d3413 ../../wolfssl (v4.3.0-stable)
revk commented 3 years ago

Hmm +b9c707511b3c7b583a70322726292270a528c4bb wolfssl (v4.8.0-stable-32-gb9c707511)

I'll look at that!

revk commented 3 years ago

OK it builds now... Thank you...

It seems to run too, thank you.

mahavirj commented 3 years ago

Thanks for confirming. Fixed with https://github.com/espressif/esp-wolfssl/commit/c68ecec495cf056b35999b6f1602a1bed9b60aad

ghenry commented 3 years ago

Great turnaround on this! Thanks!

revk commented 3 years ago

Yes, thank you.

revk commented 3 years ago

FYI, I have gone back to mbedTLS for now as seeing corrupted data using wolfssl. Not investigated further but not a problem simply rebuilding with mbedTLS.