muquit / mailsend

A program to send mail via SMTP from command line
Other
294 stars 68 forks source link

Will not compile with openssl #96

Closed simonpie closed 8 years ago

simonpie commented 8 years ago

Hello,

I am trying to compile mailsend with openssl. I installed a brand new version from github which installed just fine.

[Ananke:: 21:01] [NBN/Messagerie/mailsend] > /usr/local/bin/openssl
OpenSSL> version
OpenSSL 1.1.0-pre5-dev  xx XXX xxxx
OpenSSL> quit
[Ananke:: 21:03] [NBN/Messagerie/mailsend] > 

But when I compile, I get a few deprecated error which I have no clue how to fix :

[Ananke:: 21:01] [NBN/Messagerie/mailsend] > make
make -C libs/libmutils
make[1]: Nothing to be done for `all'.
make -C libs/libmsock
make[1]: Nothing to be done for `all'.
make -C libs/libsll
make[1]: Nothing to be done for `all'.
rm -f utils.o
gcc -g -O2 -Wall -I. -I./libs/libmutils -I./libs/libmsock -I./libs/libsll -I/usr/local//include -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRING_H=1 -DHAVE_STRINGS_H=1 -DHAVE_MEMORY_H=1 -DHAVE_UNISTD_H=1 -DHAVE_CTYPE_H=1 -DHAVE_STDINT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_STDLIB_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_SYSLIMITS_H=1 -DHAVE_FLOCK=1 -DHAVE_SOCKET=1 -DHAVE_HTONL=1 -DHAVE_GETHOSTNAME=1 -DHAVE_GETHOSTBYADDR=1 -DHAVE_YP_GET_DEFAULT_DOMAIN=1 -DHAVE_RES_SEARCH=1 -DHAVE_INET_ATON=1 -DHAVE_DN_SKIPNAME=1 -DHAVE_MKSTEMP=1 -DHAVE_GETADDRINFO=1 -DHAVE_OPENSSL=1 -DUNIX -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MATH_H=1 -c utils.c
utils.c:795:9: error: variable has incomplete type 'HMAC_CTX' (aka 'struct hmac_ctx_st')
        ctx;
        ^
/usr/local//include/openssl/ossl_typ.h:145:16: note: forward declaration of 'struct hmac_ctx_st'
typedef struct hmac_ctx_st HMAC_CTX;
               ^
utils.c:835:5: warning: implicit declaration of function 'HMAC_CTX_init' is invalid in C99
      [-Wimplicit-function-declaration]
    HMAC_CTX_init(&ctx);
    ^
utils.c:836:5: warning: 'HMAC_Init' is deprecated [-Wdeprecated-declarations]
    HMAC_Init(&ctx,secret,strlen(secret),md5);
    ^
/usr/local//include/openssl/hmac.h:75:31: note: 'HMAC_Init' has been explicitly marked deprecated
      here
DEPRECATEDIN_1_1_0(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
                              ^
2 warnings and 1 error generated.
make: *** [utils.o] Error 1
[Ananke:: 21:01] [NBN/Messagerie/mailsend] > 

Here is the output of the configure step :

[Ananke:: DING!] [NBN/Messagerie/mailsend] > ./configure -with-openssl=/usr/local                    checking for ranlib... ranlib
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for memory.h... (cached) yes
checking malloc.h usability... no
checking malloc.h presence... no
checking for malloc.h... no
checking for unistd.h... (cached) yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking for stdint.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for stdlib.h... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking sys/syslimits.h usability... yes
checking sys/syslimits.h presence... yes
checking for sys/syslimits.h... yes
checking for strip... /usr/bin/strip
checking for flock... yes
checking for socket... yes
checking for htonl... yes
checking for gethostname... yes
checking for gethostbyaddr... yes
checking for yp_get_default_domain... yes
checking for res_search... yes
checking for inet_aton... yes
checking for dn_skipname... no
checking for __dn_skipname... yes
checking for mkstemp... yes
checking for getaddrinfo... yes
checking for OpenSSL... yes
checking whether linking with OpenSSL requires -ldl... unknown
OpenSSL has unsupported dynamic loading
checking if masterkey should be generated... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libs/libmsock/Makefile
config.status: creating libs/libmutils/mkey.c
config.status: creating libs/libmutils/Makefile
config.status: creating libs/libsll/Makefile
[Ananke:: 21:00] [NBN/Messagerie/mailsend] >

Any help would be appreciated.

muquit commented 8 years ago

Please use a stable version of OpenSSL for example 1.0.2g. Apparently OpenSSL API has changed in the beta version and mailsend has to be updated to support that.

Thanks.