Topic: Building WolfSSL with with_libz option

Hi All,
I have to use the compression from the wolfssl. I have gone through the documents which suggest using the with_libz option.

I am getting this error while compiling wolfssl-

"C:/wolfssl/tirtos/../wolfssl/internal.h", line 151: fatal error: cannot open source file "zlib.h"
1 catastrophic error detected in the compilation of "C:/wolfssl/tirtos/../src/internal.c".
Compilation terminated.

>> Compilation failure
gmake[1]: *** [package/lib/lib/wolfssl/src/internal.oem4f] Error 1
xdctools_3_32_00_06_core\gmake.exe: *** [packages/ti/net/wolfssl,.libraries] Error 2
gmake: *** [all] Error 2

The things I did-
1. I have defined the #define HAVE_LIBZ in settings.h
2. In the configure file (wolfssl\configure), I have given with_libz = C:\ti\TivaWare_C_Series-2.1.4.178\third_party\windows\fltk-1.1.10\zlib\zlib.h    where other things are given like enable_fastmath, enable_fasthugemath, enable_examples etc.
    I have zlib.h at the location provided above.
Can anyone help me to resolve this issue?

Thank you

Share

2 (edited by akhi_gangwar 2020-03-18 06:40:31)

Re: Building WolfSSL with with_libz option

HI,
I resolved this issue by including the whole path C:\ti\TivaWare_C_Series-2.1.4.178\third_party\windows\fltk-1.1.10\zlib\zlib.h instead of just #include "zlib.h". But I dont think this is a good solution. But after this I can build my wolfssl.
But-
When I use the function wc_Compress(), I am getting the linking issue in my project even after I included these 3 headers-
#include <wolfssl/wolfcrypt/compress.h>
#include <wolfssl/ssl.h>
#include <wolfssl/wolfcrypt/settings.h>
Error is Description    Resource    Path    Location    Type
unresolved symbol wc_Compress, first referenced in ./modules/utils/test.obj   

Can anyone help me? Where to define HAVE_LIBZ????

Share

Re: Building WolfSSL with with_libz option

akhi_gangwar,

Please make sure you include wolfssl/wolfcrypt/settings.h BEFORE all other wolfSSL headers so the settings are in place when the other headers get included.

Next instead of doing the whole path to zlib.h in the include line update your configuration to have C:\ti\TivaWare_C_Series-2.1.4.178\third_party\windows\fltk-1.1.10\zlib in the include path so that when #include "zlib.h" is compiled it can be located by the compiler.

You stated:

2. In the configure file (wolfssl\configure), I have given with_libz = C:\ti\TivaWare_C_Series-2.1.4.178\third_party\windows\fltk-1.1.10\zlib\zlib.h    where other things are given like enable_fastmath, enable_fasthugemath, enable_examples etc.
    I have zlib.h at the location provided above.

Notice how you have the header itself in the path there, try modifying that rule to simply:

2with_libz = C:\ti\TivaWare_C_Series-2.1.4.178\third_party\windows\fltk-1.1.10\zlib

and let us know if that resolves it.

Warm Regards,

K

Re: Building WolfSSL with with_libz option

Hi Kaleb,
I tried but still getting the same error.

Share

Re: Building WolfSSL with with_libz option

Can you double check the compiler output, is it actually using that path the way you intend?

Also try running make clean first to ensure everything re-links and uses any updates to the makefiles.