mailsend icon indicating copy to clipboard operation
mailsend copied to clipboard

Hello, has anyone compiled the latest version of the library for Mac Os ?

Open psapoznik opened this issue 2 years ago • 6 comments

I try to compile it and I get the following error:

mutils_time.c:26:8: error: call to undeclared function 'gettimeofday'

psapoznik avatar Jun 11 '23 09:06 psapoznik

At this time, please edit libs/libmutils/Makefile and add -DTIME_WITH_SYS_TIME=1 at the end of DEFS line. Then,

make clean
make

I will update the configure when get some time.

Thanks

muquit avatar Jun 11 '23 17:06 muquit

Hello, thanks for replying, now I get this error:

main.c:964:21: error: call to undeclared function 'show_mime_types'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] show_mime_types(); ^ main.c:964:21: note: did you mean 'get_mime_type'? ./mailsend.h:332:14: note: 'get_mime_type' declared here char *get_mime_type(char *path); ^ 1 error generated. make: *** [main.o] Error 1

psapoznik avatar Jun 11 '23 17:06 psapoznik

You are compiling without OpenSSL, the most SMTP servers require authentication, so the program will not be that useful if compiled without OpenSSL.

Anyway, this function was mistakenly inside HAVE_OPENSSL define. Edit mailsend.h and take the function show_mime_tyhpes() out of HAVE_OPENSSL block, like

#ifdef HAVE_OPENSSL
void        print_cert_info(SSL *ssl);
#endif /* HAVE_OPENSSL */
void        show_mime_types(void);

Thanks.

muquit avatar Jun 11 '23 23:06 muquit

Hello , is that when I try to compile openSSL in static mode on Mac ,

./config --prefix=/path/ssl110istatic -static

I get the following error:

ld: library not found for -lcrt0.o clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [link_app.] Error 1 make[1]: *** [openssl] Error 2 make: *** [build_apps] Error 1

psapoznik avatar Jun 12 '23 10:06 psapoznik

Please link with dynamic OpenSSL libs. Static linking in MacOS is not feasible. -static is used only for kernel in MacOS. man ld for details.

Thanks.

muquit avatar Jun 12 '23 17:06 muquit